libvirt.libvirtError: internal error: libxenlight failed to attach pci device 0000:04:00.0

I created a windows VM, did all the steps in the gaming HVM guide, and then try to passthrough the GPU, and this error comes up – I’ve also tried this in a non-manual way, using ‘qubes-install-windows-qube’, and it still gave the same error. I looked it up and I only found one result that fits what I’m running into and it was pretty far from my current setup. What should I try to do? I really miss gaming, it’s been so long.

And to state it so you guys know, I do have secondary gpu, and I do have another monitor attached to that second GPU, of which no other displays are attached to.

This is far from enough to give a tip. What device 04 is at all?

But my wild guess based on what you wrote is that you didn’t pass GPU’s audio device to a HVM as well.

Be prepared to give a lot more info in order to be helped, anyway (exact steps, commands, configuration, etc…).

1 Like

my bad - 04 is the secondary gpu to passthrough. that said, i followed the guide step by step.

Ah, ok now. Please let us know when you take steps you’ve been suggested for.

1 Like

will do. here’s the guide i followed: Create a Gaming HVM

If after attaching GPU’s audio device to HVM it still doesn’t work, next step would be to do the strict reset (there’s a button for it, and select both devices in a window that button opens - sorry to be trivial, I don’t know anything about the level of your skills).

np, i don’t really have much experience with qubes. I’ll try this when i wake up in the morning… it’s 6 am for me, having a restless night with cptsd.

1 Like

Alright. So where do I reset them? Also I think part of the issue may be I didn’t pci block the audio device (was I supposed to???) – that may be part of it, after sleeping on it.

Your GPU can consist of several PCI devices and you need to passthrough all of them:

I do know all of the PCI devices that my GPU has, I just didn’t pass all of them through – just the GPU itself. My bad. Let me go edit my grub and see if it makes it work. Ty.

added the devices to the hvm, and now it’s giving the error: “qrexec-daemon startup failed: 2023-12-29 15:12:41.637 qrexec-daem,on[8642]: qrexec-daemon.c:144:sigchld_parent_handler: Connection to the VM failed” whenever I try to boot up the Windows HVM

And it says this message -immediately- after booting up, then closes down. I did try the button you were talking about, the strict reset button – and I tried it on both pci devices, and still nothing.

though I will say – when it does show for the 1 second it’s up, it says “guest not initialized” – looking into this now

going to try to use the qvm-create-windows-qube again – this time manually installing the windows tools

Nope. Still doesn’t work, even with the qvm-create-windows-qube setup.

Set the qube memory to 2 GB and try to boot for a test.

the qube boots fine without the pci devices. just, when I add them, it says that connection message

Try to boot qube with PCI devices and memory set to 2 GB.

I’ll try that tomorrow - ty

If it runs with let’s say 1848MB RAM, after that you want to patch xen.xml and related: