QubesOS / qubes-issues

The Qubes OS Project issue tracker
https://www.qubes-os.org/doc/issue-tracking/
532 stars 46 forks source link

Document requirements related to `qubes-usb-proxy` and `usbip` #8864

Open SaswatPadhi opened 8 months ago

SaswatPadhi commented 8 months ago

Qubes OS release

R4.2

Brief summary

I'm not sure if this is an issue with Fedora 39 in general or just the minimal template, but dom0 is refusing to expose USB devices from my sys-usb AppVM using fedora-39-minimal TemplateVM, although it has qubes-usb-proxy installed!

[user@dom0 ~]$ qvm-usb a sys-usb-eth sys-usb:3-5
qubes-usb-proxy not installed in the VM
[user@dom0 ~]$ qvm-run --pass-io --user root sys-usb -- "dnf list --installed | grep qubes-usb-proxy"
qubes-usb-proxy.noarch                  1.1.5-1.fc39                    @qubes-vm-r4.2-current           

Steps to reproduce

In dom0:

  1. qvm-template install fedora-39-minimal
  2. qvm-create --template fedora-39-minimal --label red sys-usb

In sys-usb as root user:

  1. dnf install qubes-usb-proxy qubes-input-proxy-sender

In dom0:

  1. qvm-usb to list usb devices
  2. qvm-usb a sys-usb-eth sys-usb:<X-Y> -- replace <X-Y> with desired device

Expected behavior

USB device is attached from sys-usb to the target qube.

Actual behavior

Spurious error about missing qubes-usb-proxy package.

marmarek commented 8 months ago

Is qubes-usb-proxy installed in the sys-usb-eth (or its template)? It needs to be present on both ends of the qvm-usb connection.

SaswatPadhi commented 8 months ago

Ah I see, thanks @marmarek! That was it.

I installed qubes-usb-proxy in sys-usb-eth and then I was getting modprobe errors about missing usbip-host module. So I had to install usbip in both templates as well. And then everything worked as expected.

  1. Shouldn't qubes-usb-proxy depend on usbip (in Fedora, not sure about the Debian package name)?

  2. The instructions at https://www.qubes-os.org/doc/templates/minimal/ say:

USB qube, such as the template for sys-usb: qubes-usb-proxy to provide USB devices to other Qubes and qubes-input-proxy-sender to provide keyboard or mouse input to dom0.

So, my understanding was that it's only necessary in the USB qube, and not in the other qubes. The "USB qubes" page (https://www.qubes-os.org/doc/usb-qubes/) doesn't say anything more about qubes-usb-proxy requirements either.

We might want to clarify this bit in the minimal templates instructions, or elsewhere.

Thanks again!

marmarek commented 8 months ago
  1. Shouldn't qubes-usb-proxy depend on usbip (in Fedora, not sure about the Debian package name)?

Not really, usbip modules are included in the dom0-provided kernel, so if you use that, no need to install any kernel modules in the template. I'm not sure about package split in Fedora or Debian here, but the usbip modules are part of upstream kernel, and are usually enabled in various distributions.

andrewdavidwong commented 8 months ago

It sounds like this boils down to a documentation issue in the end, so I'm updating this issue to be about this part:

  1. The instructions at https://www.qubes-os.org/doc/templates/minimal/ say:

USB qube, such as the template for sys-usb: qubes-usb-proxy to provide USB devices to other Qubes and qubes-input-proxy-sender to provide keyboard or mouse input to dom0.

So, my understanding was that it's only necessary in the USB qube, and not in the other qubes. The "USB qubes" page (https://www.qubes-os.org/doc/usb-qubes/) doesn't say anything more about qubes-usb-proxy requirements either.

We might want to clarify this bit in the minimal templates instructions, or elsewhere.

SaswatPadhi commented 8 months ago

Thanks @marmarek and @andrewdavidwong.

@andrewdavidwong: We might also want to clarify what Marek mentioned about the usbip module requirements for using qubes-usb-proxy with in-kernel VMs (https://www.qubes-os.org/doc/managing-vm-kernels/#using-kernel-installed-in-the-vm).