0

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.

1 Answer 1

0

After restarting my host, libvritd was running again.

However, I had deleted /etc/libvirtd before purging and reinstalling qemu and virt-manager. This meant that I lost access to my default NAT network.

So I restored the folder from a backup and needed to follow this guide as a result: https://www.systutorials.com/cannot-start-vm-with-error-no-network-with-matching-name-default/

running sudo systemctl reload libvirtd restored everything, all works again (still no GPU passthrough, though.)

If anyone has a comment about what may have gone wrong, I can go back to working on passthrough. It's for work, not gaming lol. Would greatly appreciate it.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.