2

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)?

smuseus
  • 31
  • 1
  • 4
  • Maybe try a PPA like https://launchpad.net/~jacob/+archive/ubuntu/virtualisation, also see https://askubuntu.com/questions/4983/what-are-ppas-and-how-do-i-use-them?s=1|1.2557 – muru Aug 04 '17 at 08:08
  • Thanks, that worked, I added the ppa and upgraded the packages. – smuseus Aug 11 '17 at 10:40

1 Answers1

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.

pomsky
  • 67,112
  • 21
  • 233
  • 243
  • Small adjustment: QEMU (in the latest version at the time this was written) supports Hyper-V time without having to use the `qemu:arg` notation. Replace the second `qemu:arg` with `` and add ``` ``` - found [here](https://bugzilla.redhat.com/show_bug.cgi?id=1056205) – mdip Jan 07 '20 at 13:44