Of course, the device is “exposed” by sys-usb to disk-mnt, and is not re-exported.
If you want to use it in dom0, detach from disk-mnt and attach it from sys-usb:
I followed your instructions exactly, with the following results:
[root@dom0 ~]# qvm-block
BACKEND:DEVID DESCRIPTION USED BY
sys-usb:sda1 RTL9210B-CG (HD_DUCK01)
sys-usb:sda2 RTL9210B-CG ()
Below is the error received:
[root@dom0 ~]# qvm-block attach dom0 sys-usb:sda2
Got empty response from qubesd. See journalctl in dom0 for details.
journalctl shows the following:
Jan 21 15:04:20 dom0 libvirtd[2332]: internal error: libxenlight failed to attach disk 'xvdi'
Jan 21 15:04:20 dom0 qubesd[2289]: unhandled exception while calling src=b'dom0' meth=b'admin.vm.device.block.Attach' dest=b'dom0' arg=b'sys-usb+sda2' len(untrusted_payload)=0
Jan 21 15:04:20 dom0 qubesd[2289]: Traceback (most recent call last):
Jan 21 15:04:20 dom0 qubesd[2289]: File "/usr/lib/python3.11/site-packages/qubes/api/__init__.py", line 297, in respond
Jan 21 15:04:20 dom0 qubesd[2289]: response = await self.mgmt.execute(
Jan 21 15:04:20 dom0 qubesd[2289]: ^^^^^^^^^^^^^^^^^^^^^^^^
Jan 21 15:04:20 dom0 qubesd[2289]: File "/usr/lib/python3.11/site-packages/qubes/api/admin.py", line 1306, in vm_device_attach
Jan 21 15:04:20 dom0 qubesd[2289]: await self.dest.devices[devclass].attach(assignment)
Jan 21 15:04:20 dom0 qubesd[2289]: File "/usr/lib/python3.11/site-packages/qubes/devices.py", line 251, in attach
Jan 21 15:04:20 dom0 qubesd[2289]: await self._vm.fire_event_async('device-pre-attach:' + self._bus,
Jan 21 15:04:20 dom0 qubesd[2289]: File "/usr/lib/python3.11/site-packages/qubes/events.py", line 227, in fire_event_async
Jan 21 15:04:20 dom0 qubesd[2289]: sync_effects, async_effects = self._fire_event(event,
Jan 21 15:04:20 dom0 qubesd[2289]: ^^^^^^^^^^^^^^^^^^^^^^^
Jan 21 15:04:20 dom0 qubesd[2289]: File "/usr/lib/python3.11/site-packages/qubes/events.py", line 164, in _fire_event
Jan 21 15:04:20 dom0 qubesd[2289]: effect = func(self, event, **kwargs)
Jan 21 15:04:20 dom0 qubesd[2289]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 21 15:04:20 dom0 qubesd[2289]: File "/usr/lib/python3.11/site-packages/qubes/ext/block.py", line 282, in on_device_pre_attached_block
Jan 21 15:04:20 dom0 qubesd[2289]: vm.libvirt_domain.attachDevice(
Jan 21 15:04:20 dom0 qubesd[2289]: File "/usr/lib/python3.11/site-packages/qubes/app.py", line 107, in wrapper
Jan 21 15:04:20 dom0 qubesd[2289]: return getattr(self._vm, attrname)(*args, **kwargs)
Jan 21 15:04:20 dom0 qubesd[2289]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 21 15:04:20 dom0 qubesd[2289]: File "/usr/lib64/python3.11/site-packages/libvirt.py", line 691, in attachDevice
Jan 21 15:04:20 dom0 qubesd[2289]: raise libvirtError('virDomainAttachDevice() failed')
Jan 21 15:04:20 dom0 qubesd[2289]: libvirt.libvirtError: internal error: libxenlight failed to attach disk 'xvdi'
Jan 21 15:04:41 dom0 kernel: xenbus_probe_frontend: Waiting for devices to initialise: 25s...20s...15s...10s...5s...0s...
Jan 21 15:05:11 dom0 systemd-udevd[932]: vbd-51840: Worker [14737] processing SEQNUM=5678 is taking a long time
sys-usb was shutdown and restarted with same results.