Public bug reported:

On Focal, I created a new KVM machine using virt-manager. Nothing
special, just a bionic guest.

Upon examining the qemu-system-x86_64 process that got spawned, /usr/bin
/qemu-system-x86_64 was executed directly, and my override in
/usr/local/bin/qemu-system-x86_64 was not executed, and upon further
examination of the qemu command line, -enable-kvm was missing:

$ps ax | grep qemu-system
/usr/bin/qemu-system-x86_64 -name guest=ubuntu18.04
<snip>

I then looked at the libvirt XML generated with:

$ virsh edit ubuntu18.04

Under the <devices> section, I see:

<devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>

On bionic and xenial, this was set to:

<devices>
    <emulator>/usr/bin/kvm-spice</emulator>

/usr/bin/kvm-spice is a symlink to /usr/bin/kvm, which contains the
following script:

#!/bin/sh
exec qemu-system-x86_64 -enable-kvm "$@"

This is where -enable-kvm is added to the command line, and qemu-system-
x86_64 is called from $PATH, and is not hardcoded.

If you set the <emulator> tag back to /usr/bin/kvm-spice, everything
works as expected, just like it did on xenial and bionic.

$ps ax | grep qemu-system
/usr/bin/qemu-system-x86_64 -enable-kvm -name guest=ubuntu18.04
<snip>

My question is, was this change intentional, or is it a bug? By
hardcoding the emulator to /usr/bin/qemu-system-x86_64, we no longer get
-enable-kvm on the qemu command line, and we cannot use other qemu-
system-x86_64 from a higher priority directory from $PATH.

Output of kvm-ok seems fine:

$ kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used

Software versions:

qemu-kvm 1:4.2-3ubuntu2
libvirt-daemon-system 6.0.0-0ubuntu5
libvirt-clients 6.0.0-0ubuntu5
virt-manager 1:2.2.1-3ubuntu1

** Affects: libvirt (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: libvirt (Ubuntu Focal)
     Importance: Undecided
         Status: New

** Also affects: libvirt (Ubuntu Focal)
   Importance: Undecided
       Status: New

** Description changed:

- On Focal, I created a new KVM machine using virt-manager. Nothing special, 
just
- a bionic guest.
+ On Focal, I created a new KVM machine using virt-manager. Nothing
+ special, just a bionic guest.
  
  Upon examining the qemu-system-x86_64 process that got spawned, /usr/bin
  /qemu-system-x86_64 was executed directly, and my override in
  /usr/local/bin/qemu-system-x86_64 was not executed, and upon further
  examination of the qemu command line, -enable-kvm was missing:
  
  $ps ax | grep qemu-system
  /usr/bin/qemu-system-x86_64 -name guest=ubuntu18.04
  <snip>
  
  I then looked at the libvirt XML generated with:
  
  $ virsh edit ubuntu18.04
  
  Under the <devices> section, I see:
  
  <devices>
-     <emulator>/usr/bin/qemu-system-x86_64</emulator>
+     <emulator>/usr/bin/qemu-system-x86_64</emulator>
  
  On bionic and xenial, this was set to:
  
  <devices>
-     <emulator>/usr/bin/kvm-spice</emulator>
+     <emulator>/usr/bin/kvm-spice</emulator>
  
- /usr/bin/kvm-spice is a symlink to /usr/bin/kvm, which contains the following
- script:
+ /usr/bin/kvm-spice is a symlink to /usr/bin/kvm, which contains the
+ following script:
  
  #!/bin/sh
  exec qemu-system-x86_64 -enable-kvm "$@"
  
  This is where -enable-kvm is added to the command line, and qemu-system-
  x86_64 is called from $PATH, and is not hardcoded.
  
  If you set the <emulator> tag back to /usr/bin/kvm-spice, everything
  works as expected, just like it did on xenial and bionic.
  
  $ps ax | grep qemu-system
  /usr/bin/qemu-system-x86_64 -enable-kvm -name guest=ubuntu18.04
  <snip>
  
  My question is, was this change intentional, or is it a bug? By
  hardcoding the emulator to /usr/bin/qemu-system-x86_64, we no longer get
  -enable-kvm on the qemu command line, and we cannot use other qemu-
  system-x86_64 from a higher priority directory from $PATH.
  
  Output of kvm-ok seems fine:
  
  $ kvm-ok
  INFO: /dev/kvm exists
  KVM acceleration can be used
  
  Software versions:
  
  qemu-kvm 1:4.2-3ubuntu2
  libvirt-daemon-system 6.0.0-0ubuntu5
  libvirt-clients 6.0.0-0ubuntu5
  virt-manager 1:2.2.1-3ubuntu1

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1868029

Title:
  focal not using /usr/bin/kvm-spice as default emulator

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1868029/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to