need Qubes to forget a "--persistent" attached USB device

52 views
Skip to first unread message

Sven Semmler

unread,
Dec 5, 2019, 5:36:10 PM12/5/19
to qubes...@googlegroups.com
So I got myself into a corner:

* Usually I attach the entire USB controller to my app-dev (debian 9) qube. But in that case this qube can only have 2048 MB of memory (for some reason that's the limit when the USB controller is attached; any more and things crash ... same with Windows qube and fedora qubes; it's a HW thing I supose).

* I needed more memory, so I cloned my app-dev qube (that has all the udev rules etc) to sys-usb-special. Set sys-usb-special to use 1024 MB memory and attached the USB controller to it.

* Then I used qvm-usb attach app-dev --persistent sys-usb-special:... on a whole bunch of devices

* This seemed to work according to lsusb in app-dev and some of the devices worked (Beagle I2C/SPI analyzer, some USB-RS232 connections) and other wouldn't (debuggers, RealICE etc).

* So in frustration I shut everything down. Reassigned the USB controller to app-dev, decreased the memory to 2048 and removed sys-usb-special (<-- BIG MISTAKE!!!)

* Now when I want to start app-dev I get the following error: app-dev: usb device sys-usb-special:2-1.4.4.1 not available ... this is because I persistently attached that device to app-dev but that qube doesn't exist anymore

* cloneing app-dev again and attaching / detaching the respecitve devices doesn't solve the issue. I assue qubes have unique IDs and even though I did the same thing with another qube called sys-usb-special, the result was additive and didn't overwrite.

* if I do 'qvm-usb ls app-dev' I get:

[user@dom0 ~]$ qvm-usb ls app-dev
Traceback (most recent call last):
File "/usr/bin/qvm-usb", line 5, in <module>
sys.exit(main())
File "/usr/lib/python3.5/site-packages/qubesadmin/tools/qvm_device.py", line 287, in main
args.func(args)
File "/usr/lib/python3.5/site-packages/qubesadmin/tools/qvm_device.py", line 86, in list_devices
for dev in domain.devices[args.devclass].attached():
File "/usr/lib/python3.5/site-packages/qubesadmin/devices.py", line 221, in attached
for assignment in self.assignments():
File "/usr/lib/python3.5/site-packages/qubesadmin/devices.py", line 212, in assignments
backend_domain = self._vm.app.domains[backend_domain]
File "/usr/lib/python3.5/site-packages/qubesadmin/app.py", line 91, in __getitem__
raise KeyError(item)
KeyError: 'sys-usb-special'

So ... now what? Where does Qubes keep a record of this. What can I do to 'detach' this and the other USB devices from app-dev?

/Sven

--
public key: https://www.svensemmler.org/0x8F541FB6.asc
fingerprint: D7CA F2DB 658D 89BC 08D6 A7AA DA6E 167B 8F54 1FB6

signature.asc

Sven Semmler

unread,
Dec 5, 2019, 5:51:52 PM12/5/19
to qubes...@googlegroups.com
On Thu, Dec 05, 2019 at 04:35:57PM -0600, Sven Semmler wrote:
> So ... now what? Where does Qubes keep a record of this. What can I do to 'detach' this and the other USB devices from app-dev?

qvm-clone app-dev app-dev2
qvm-remove app-dev
qvm-clone app-dev2 app-dev
qvm-remove app-dev2

... did the trick.
signature.asc
Reply all
Reply to author
Forward
0 new messages