1

I need to install QEMU 2.5.0 and libvirt 1.3.3 to get around Nvidia driver issues (Code 43) when doing GPU passthrough on a windows VM. See first article under troubleshooting in src for details.

I've installed KVM using sudo apt-get install qemu-kvm qemu-utils qemu-efi ovmf libvirt-bin libvirt-de, they this gives me older versions.

With virsh the version command prints out:

Compiled against library: libvirt 1.3.1
Using library: libvirt 1.3.1
Using API: QEMU 1.3.1
Running hypervisor: QEMU 2.5.0

I've fairly new to Ubuntu, so could someone explain how I upgrade or install QEMU 2.5.0 and libvirt 1.3.3 (or a later version)?

0

It's probably not an issue related to the version you have/had. There's a few changes to your VM's config (xml file) you have to make to workaround nvidia's deliberate attempt to brick VM functionality on their mainstream/non workstation cards. Make sure there's no virtual display attached to the VM with the virt-manager tool, then

  1. Shut down your vm and virt manager

  2. Open up a command prompt and type:

    sudo virsh edit vmnamehere
    
  3. Replace the very first line with:

    <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
    

    (You can find the code here: https://paste.ubuntu.com/p/HtXhxTTvjS/)

  4. Scroll to the very end of the config file and right before </domain>, insert:

    <qemu:commandline>
      <qemu:arg value='-cpu'/>
      <qemu:arg value='host,hv_time,kvm=off,hv_vendor,hv_vendor_id=null'/>
    </qemu:commandline>
    

    (You can find the code here: https://paste.ubuntu.com/p/HtXhxTTvjS/)

  5. Save + exit whatever editor you used

  6. Restart the virt-manager application

This works for me every time. Hope you didn't give up on this, as I see this is an old post. A good way to see if you're doing things right is to try GPU passthrough on an OS that will for sure work, like a Linux / Ubuntu / Debian VM.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.