1. 10 Feb, 2022 1 commit
    • Christian Ehrhardt's avatar
      d/kvm-spice: fix when acceleration is already defined on the commandline · 5bc09016
      Christian Ehrhardt authored
      Issue:
      
      + lxc exec testkvm-impish-from -- virsh migrate --unsafe --live kvmguest-bionic-normal qemu+ssh://10.104.227.250/system
      error: internal error: process exited while connecting to monitor: /usr/bin/kvm-spice: W: this is an old compat wrapper script for qemu-system-x86_64 -enable-kvm
      /usr/bin/kvm-spice: W: please use qemu-system-x86_64 instead of /usr/bin/kvm-spice
      2022-02-07T15:16:56.765786Z qemu-system-x86_64: The -accel and "-machine accel=" options are incompatible
      
      Original check since qemu 5.0
      commit 6f6e1698
      Author: Paolo Bonzini <pbonzini@redhat.com>
      Date:   Wed Nov 13 10:10:47 2019 +0100
      
          vl: configure accelerators from -accel options
      
      But since recent commit (qemu 6.1)
      
      commit dadafe67
      
      
      Author: Jason Andryuk <jandryuk@gmail.com>
      Date:   Mon Jul 12 22:15:52 2021 -0400
      
          vl: Parse legacy default_machine_opt
      
      Combined with our fallback legacy kvm-spice wrapper that does
        exec qemu-system-x86_64 -enable-kvm "$@"
      
      It can happen that we have -enable-kvm added by our wrapper (e.g. a guest
      created on Bionic has that set as emulator, migrating to a new system).
      Then the wrapper adds -enable-kvm.
      Internally that is mapped to QEMU_OPTION_enable_kvm which becomes
        qdict_put_str(machine_opts_dict, "accel", "kvm")
      that is equivalent to '-accel kvm'
      
      But if libvirt is already passing the new style '-machine accel=kvm' then the
      above older check triggers and rightfully complains about the duplication.
      
      Repro, on jammy spawn a guest and set <emulator>/usr/bin/kvm-spice</emulator>
      Then starting it will fail with above message.
      
      An example arg might look like:
      -machine none,accel=kvm:tcg
      -machine none,accel=tcg
      -machine accel=tcg
      -accel kvm
      -accel tcg
      
      In that case we can not add -enable-kvm without breaking it.
      
      To resolve that split kvm-spice and qemu-system-x86_64-spice, set the wanted
      permissions and check in kvm-spice for that pattern and skip adding -enable-kvm.
      This also allows to eliminate quite some d/rules magic that is no more
      needed.
      
      Signed-off-by: Christian Ehrhardt's avatarChristian Ehrhardt <christian.ehrhardt@canonical.com>
      5bc09016
  2. 20 Jan, 2022 4 commits
  3. 19 Jan, 2022 5 commits
  4. 11 Jan, 2022 1 commit
  5. 09 Jan, 2022 11 commits
  6. 19 Dec, 2021 1 commit
  7. 14 Dec, 2021 1 commit
  8. 08 Dec, 2021 1 commit
  9. 07 Dec, 2021 4 commits
  10. 06 Dec, 2021 6 commits
  11. 03 Dec, 2021 3 commits
  12. 02 Dec, 2021 2 commits