USB Controller - qvm-block: error: backend vm 'APPVM' doesn't expose device xvdX

Hi QuBers,

I am sorry if this is a simple solution, but I am testing a HP EliteBook 840 G8 with Qubes 4.2

This laptop has a couple of usb controllers but only one (00:14.0 USB controller) is attached to sys-usb .

I am considering that maybe i have to add the other controller into the sys-usb, as well, to cure this issue.

Should I add the other USB controllers into sys-usb ?
is it relate to the issue ?

The block device is the second partition of an external USB nvme storage, and it was correctly mounted using the widget to an appvm named: disk-mnt

[root@dom0 ~]# qvm-block list
BACKEND:DEVID  DESCRIPTION               USED BY
sys-usb:sda1   RTL9210B-CG (HD_DUCK01)  
sys-usb:sda2   RTL9210B-CG ()            disk-mnt (read-only=no, frontend-dev=xvdi)

however, when i try to attach this to dom0 with:

[root@dom0 ~]# qvm-block attach dom0 disk-mnt:xvdi
qvm-block: error: backend vm 'disk-mnt' doesn't expose device 'xvdi'

and, it throws the above error.

below is the spec of the laptop - including the USB controllers

[root@dom0 ~]# lspci
00:00.0 Host bridge: Intel Corporation 11th Gen Core Processor Host Bridge/DRAM Registers (rev 01)
00:02.0 VGA compatible controller: Intel Corporation TigerLake-LP GT2 [Iris Xe Graphics] (rev 01)
00:04.0 Signal processing controller: Intel Corporation TigerLake-LP Dynamic Tuning Processor Participant (rev 01)
00:07.0 PCI bridge: Intel Corporation Tiger Lake-LP Thunderbolt 4 PCI Express Root Port #0 (rev 01)
00:07.1 PCI bridge: Intel Corporation Tiger Lake-LP Thunderbolt 4 PCI Express Root Port #1 (rev 01)
00:0a.0 Signal processing controller: Intel Corporation Tigerlake Telemetry Aggregator Driver (rev 01)
00:0d.0 USB controller: Intel Corporation Tiger Lake-LP Thunderbolt 4 USB Controller (rev 01)
00:0d.2 USB controller: Intel Corporation Tiger Lake-LP Thunderbolt 4 NHI #0 (rev 01)
00:0e.0 RAID bus controller: Intel Corporation Volume Management Device NVMe RAID Controller
00:14.0 USB controller: Intel Corporation Tiger Lake-LP USB 3.2 Gen 2x1 xHCI Host Controller (rev 20)
00:14.2 RAM memory: Intel Corporation Tiger Lake-LP Shared SRAM (rev 20)
00:14.3 Network controller: Intel Corporation Wi-Fi 6 AX201 (rev 20)
00:15.0 Serial bus controller: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #0 (rev 20)
00:16.0 Communication controller: Intel Corporation Tiger Lake-LP Management Engine Interface (rev 20)
00:1d.0 PCI bridge: Intel Corporation Tiger Lake-LP PCI Express Root Port #9 (rev 20)
00:1f.0 ISA bridge: Intel Corporation Tiger Lake-LP LPC Controller (rev 20)
00:1f.3 Multimedia audio controller: Intel Corporation Tiger Lake-LP Smart Sound Technology Audio Controller (rev 20)
00:1f.4 SMBus: Intel Corporation Tiger Lake-LP SMBus Controller (rev 20)
00:1f.5 Serial bus controller: Intel Corporation Tiger Lake-LP SPI Controller (rev 20)
55:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller PM9A1/PM9A3/980PRO

Thus, i would appreciate some assistance to identify the issue.

Thanks for your time,

1 Like

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:

qvm-block attach dom0 sys-usb:sda2
1 Like

thanks @barto

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.

1 Like

I have no idea why this happens. It works fine for me.

1 Like

After rebooting the laptop, it solved the issue.

Let’s put it down to a random act.

Thanks,

2 Likes