How to auto-attach USB device to AppVM from sys-usb?

42 views
Skip to first unread message

heinrich...@googlemail.com

unread,
Dec 27, 2018, 6:29:23 PM12/27/18
to qubes-users
I'm using Qubes 4 with USB VM (sys-usb) which is working well.

When attaching USB devices I currently have to manually assign them to AppVMs via the top right "Qubes Devices" dropdown menu. Which is also working well.

But: I want to automate that.

Using a trigger in /usr/lib/udev/rules.d/ in sys-usb I can detect when the USB device gets plugged in (tested, works). Now ideally I'd like to call qvm-usb inside sys-usb to attach this device to a specific AppVM. Two ways come to mind:

- call "qvm-usb attach" from sys-usb -> I assumed there must be a package that I can dnf install and then configure some qrexec policy in com0 to allow the call but I could not figure out how to install qvm-usb in sys-usb (ist this possible?)
- send an event from sys-usb to dom0 to trigger a script that calls "qvm-usb attach" -> I looked into the Qubes eventing mechanism but failed to find a quick solution

Can somebody give me some hints on how I could automate "qvm-usb'ing" from sys-usb to auto-attach my USB device?

awokd

unread,
Jan 6, 2019, 7:19:11 PM1/6/19
to qubes...@googlegroups.com
heinrich.ulbricht via qubes-users wrote on 12/27/18 11:29 PM:
I remember some discussion on the list a while back about eventing from
a qube to dom0. In some ways it breaks the security model, but I can't
remember the specifics.

Reply all
Reply to author
Forward
0 new messages