VM Deploy: PCI passthrough error

Hi all,

I’m trying to pass a GPU to a VM on OpenNebula 6.10 CE with KVM, but I keep hitting the following error during deployment: DEPLOY FAILURE: Failed to create domain XML error: Invalid PCI address 0000:01:01.0. slot must be <= 0 .

I searched the forum and found the exact issue already reported on github where it is marked as closed and added to milestone 6.8.2. I also tried to deploy the VM from corrected deployment file but Nebula keeps overwriting it on every reboot so this approach is useless. I also tried Opennebula 7.0 CE but also without success.

So my question is: was this bug fixed only for enterprise editions or am i doing something wrong? If so, is there some legitimate workaround for CEs to make the gpu passthrough work?

Thanks in advance

Hi @Andrew22457

We had the same issue some weeks ago with 6.10, the xml has the wrong index for PCI addresses and libvirt complains about that.

We found that it only happens when you use any q35 machine type by default with your VM. Our workaround is just to set explicitly the KVM machine type in the VM template itself, within VM’s OS section, as example:

OS=[
MACHINE=“q35” ]

or any MACHINE (checking with onehost show <hyp>) that you use from your hyps.

I hope this will help.

Cheers

Álvaro

Hi @alvaro_simongarcia

thanks for such a quick respond.. your suggested workaround works well.

Thank you very much

Andrew