Sample Header Ad - 728x90

libvirtd not starting after unsuccessful GPU passthrough

0 votes
1 answer
199 views
I attempted to follow this guide on Ubuntu 22.04: https://wiki.gentoo.org/wiki/GPU_passthrough_with_libvirt_qemu_kvm I didn't need to change my BIOS or my Kernel, and I skipped the step involving the GRUB bootloader. The guide also suggested to create a file /etc/modprobe.d/vfio.conf and add "options vfio-pci ids=xxxx:xxxx,xxxx:xxxx" with the proper IDs for my nVidia gpu (and onboard gpu audio) devices, which I did. Then I copied the steps involving libvirt's home directory, in this section of the guide: https://wiki.gentoo.org/wiki/GPU_passthrough_with_libvirt_qemu_kvm#Libvirt ... changing the libvirt-qemu user's home directory to /home/qemu, where my 'pulse' config folder was copied to using cp -r. I also made the recommended changes to /etc/libvirt/qemu.conf, in the cgroup_acl_device[] section, listing all four device entries for my Logitech kb and mouse. Then, I added the host nVidia hardware (gpu video + gpu sound) via the qemu graphical interface, and edited the XML to include evdev entries under , following the guide exactly. This is where the guide stopped being relevant to my Ubuntu 22.04 setup, so I tried starting the Windows domain. Qemu immediately became unresponsive, and libvirtd crashed after hanging for a moment. The first attempt to restart the service through systemctl hanged for a good minute without any output from the command, I had to ctrl+C it and try again. Now trying to restart the service via systemctl fails much more quickly, and it simply returns "exit-code" each time. **Troubleshooting attempted:** I removed all of the changes to /etc/libvirt/qemu.conf, restoring it to defaults. libvirtd still wouldn't load. Then, I removed all of the changes to the domain's xml by editing /etc/libvirt/qemu/win11.xml and removing the evdev entries for kb and mouse, but also the hostdevice entries for the two PCI devices on my nVidia GPU. Still no changes. Then, I deleted the vfio.conf file I created under /etc/modprobe.d, and still broken, systelctl can't reload libvirtd. Finally, I ran sudo apt install --reinstall qemu, after backing up all of my images and xml. It still doesn't work! Same goes after a purge / install. I don't know what to try next.
Asked by adamlaughlin (11 rep)
May 25, 2024, 08:05 PM
Last activity: May 25, 2024, 08:36 PM