You are not logged in.

#1 2021-11-12 12:21:22

vn-ck
Member
Registered: 2021-11-12
Posts: 3

virt-manager: no USB/PCI devices listed in "Add New Virtual Hardware"

Hi!

I've been trying to create a PCI/GPU passthrough VM setup (as many others before me) and I've ran into something rather interesting: in virt-manager, when I'm configuring hardware for the VM, I would like to set up USB (and obviously later PCI) passthrough for some devices. (notably a keyboard / mouse, duh)
But on the VM details -> Virtual hardware details -> Add Hardware -> USB Host Device menu I have an empty list, with only a "No Devices Available" text.

I'm probably missing something trivial, but I can't figure out what;

lsmod | grep vfio:
vfio_virqfd            16384  0
vfio_iommu_type1       45056  0
vfio                   45056  1 vfio_iommu_type1

IOMMU groups:

IOMMU Group 0:
	00:01.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge [1022:1452]
IOMMU Group 1:
	00:01.3 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe GPP Bridge [1022:1453]
IOMMU Group 2:
	00:02.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge [1022:1452]
IOMMU Group 3:
	00:03.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge [1022:1452]
IOMMU Group 4:
	00:03.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe GPP Bridge [1022:1453]
IOMMU Group 5:
	00:04.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge [1022:1452]
IOMMU Group 6:
	00:07.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge [1022:1452]
IOMMU Group 7:
	00:07.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Internal PCIe GPP Bridge 0 to Bus B [1022:1454]
IOMMU Group 8:
	00:08.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge [1022:1452]
IOMMU Group 9:
	00:08.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Internal PCIe GPP Bridge 0 to Bus B [1022:1454]
IOMMU Group 10:
	00:14.0 SMBus [0c05]: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller [1022:790b] (rev 59)
	00:14.3 ISA bridge [0601]: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge [1022:790e] (rev 51)
IOMMU Group 11:
	00:18.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 0 [1022:1460]
	00:18.1 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 1 [1022:1461]
	00:18.2 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 2 [1022:1462]
	00:18.3 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 3 [1022:1463]
	00:18.4 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 4 [1022:1464]
	00:18.5 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 5 [1022:1465]
	00:18.6 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 6 [1022:1466]
	00:18.7 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 7 [1022:1467]
IOMMU Group 12:
	03:00.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset USB 3.1 XHCI Controller [1022:43d5] (rev 01)
	03:00.1 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset SATA Controller [1022:43c8] (rev 01)
	03:00.2 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Bridge [1022:43c6] (rev 01)
	20:00.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port [1022:43c7] (rev 01)
	20:01.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port [1022:43c7] (rev 01)
	20:04.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port [1022:43c7] (rev 01)
	22:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)
	25:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] [1002:67df] (rev ef)
	25:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590] [1002:aaf0]
IOMMU Group 13:
	26:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] [1002:67df] (rev e7)
	26:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590] [1002:aaf0]
IOMMU Group 14:
	27:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Zeppelin/Raven/Raven2 PCIe Dummy Function [1022:145a]
IOMMU Group 15:
	27:00.2 Encryption controller [1080]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Platform Security Processor [1022:1456]
IOMMU Group 16:
	27:00.3 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Zeppelin USB 3.0 Host controller [1022:145f]
IOMMU Group 17:
	28:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Zeppelin/Renoir PCIe Dummy Function [1022:1455]
IOMMU Group 18:
	28:00.2 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] [1022:7901] (rev 51)
IOMMU Group 19:
	28:00.3 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) HD Audio Controller [1022:1457]

The device on 25:00.0 is an RX 570, the one on 26:00.0 is an RX 580, they have the same hardware ID [1002:67df]. (I would like to pass through the latter, but this is currently only relevant as an explanation on why I use the aforementioned vfio-bind script)

libvirtd enabled, started:

sudo systemctl status libvirtd
● libvirtd.service - Virtualization daemon
     Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: disabled)
     Active: active (running) since Fri 2021-11-12 12:35:11 UTC; 4s ago
TriggeredBy: ● libvirtd-ro.socket
             ● libvirtd.socket
             ● libvirtd-admin.socket
       Docs: man:libvirtd(8)
             https://libvirt.org
   Main PID: 6212 (libvirtd)
      Tasks: 19 (limit: 32768)
     Memory: 8.7M
        CPU: 401ms
     CGroup: /system.slice/libvirtd.service
             └─6212 /usr/bin/libvirtd --timeout 120

"virsh -c qemu:///system" (and 'session') connects a-okay.

Thank you for reading

Last edited by vn-ck (2021-11-12 12:55:21)

Offline

#2 2021-11-12 16:08:01

vn-ck
Member
Registered: 2021-11-12
Posts: 3

Re: virt-manager: no USB/PCI devices listed in "Add New Virtual Hardware"

Update:
My suspicion was that I did not have certain permissions to list these devices; but having tried again with my user added to "root" "render" "input" groups, I don't think that is the case. (I have since removed myself from these groups)
I should also add that I (was during my previous tries, and still) am a member of the "kvm" group.

Offline

#3 2021-11-13 03:31:48

Soultrigger
Member
From: Brazil
Registered: 2021-11-04
Posts: 31

Re: virt-manager: no USB/PCI devices listed in "Add New Virtual Hardware"

I am a noob, so it might not be helpful, but I did install it here like this:

pacman -S virt-manager qemu ebtables iptables-nft bridge-utils openbsd-netcat dnsmasq dmidecode ovmf

sudo usermod -G libvirt -a yourusername

systemctl enable ebtables

systemctl enable dnsmasq

systemctl enable libvirtd

And everything works out of the box. Did you add your user to the libvirt group?

Offline

#4 2021-11-13 10:35:09

vn-ck
Member
Registered: 2021-11-12
Posts: 3

Re: virt-manager: no USB/PCI devices listed in "Add New Virtual Hardware"

Hi, thanks for the reply
I just reinstalled the packages, and re-enabled the services just to make sure, and yeah, I have my user added to "libvirt" group, sadly no success.

Since nobody else seems to have a problem with this, I'm starting to think this might be a non-explicit dependency problem, maybe an optdep one?
I am running a rather minimal setup with sway on wayland, and a fresh install too, so it's easy to imagine that I'm missing a few packages that others have had already installed when they started using virt-manager.

I'll try looking into this angle next - but I'm all ears to any ideas out there, I would like to get this setup working this weekend...

Offline

#5 2022-11-03 07:07:34

threefour
Member
Registered: 2022-07-25
Posts: 20

Re: virt-manager: no USB/PCI devices listed in "Add New Virtual Hardware"

I had the same problem. All I needed to do was run

sudo systemctl start virtnodedevd
sudo systemctl enable virtnodedevd

From the service name, I'm guessing it's the daemon responsible for handling "passthroughable" device related tasks.

I know this is a very old thread, but the solution for me may help others reading down the line.

Offline

#6 2022-12-01 08:11:29

malevolent
Member
From: Barcelona
Registered: 2011-09-20
Posts: 15
Website

Re: virt-manager: no USB/PCI devices listed in "Add New Virtual Hardware"

threefour wrote:

I had the same problem. All I needed to do was run

sudo systemctl start virtnodedevd
sudo systemctl enable virtnodedevd

From the service name, I'm guessing it's the daemon responsible for handling "passthroughable" device related tasks.

I know this is a very old thread, but the solution for me may help others reading down the line.

Yes, sorry moderators if we're necrobumping this thread, but I was also having this issue, and it was driving me crazy.
I just want to let everyone know that enabling virtnodedevd just worked on my setup as well, and there is no reference to this on the wiki, so thank you very much threeforur!

Offline

#7 2022-12-01 14:53:42

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 18,993

Re: virt-manager: no USB/PCI devices listed in "Add New Virtual Hardware"

Hey, not all 'necrobumping' is bad wink   This was on point, the thread had not been solved, and it seemed to address the problem of the OP while relevant dependencies seem not to have changed much over the lifetime of the thread.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB