Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
qemu-2.0.0 upgrade results in unsupported CPU model
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
aluin
n00b
n00b


Joined: 16 Jul 2014
Posts: 2

PostPosted: Wed Jul 16, 2014 9:02 pm    Post subject: qemu-2.0.0 upgrade results in unsupported CPU model Reply with quote

Currently, I'm using libvirt-1.2.3 with qemu-1.5.3 on a 3.7.0-hardened kernel and an i7-3770 CPU. I have several KVM VMs running. For the upcoming upgrade to qemu-2.0.0, I'm trying to replace the emulator tag in the libvirt XML files of the VMs from the deprecated wrapper /usr/bin/qemu-kvm to /usr/bin/qemu-system-x86_64, as instructed by the emerge message and the other forum posts about this subject.

However, starting the VMs with virsh start and the new emulator tag (still on qemu-1.5.3), I get the following "error: unsupported configuration: CPU model SandyBridge is not supported by hypervisor". Similar error for other the CPU models I tried.

The VMs start again if I change the CPU model to host-passthrough (don't want to use that) or completely remove the CPU tag from the XML file. In the latter case, the VMs start with QEMU Virtual CPU version 1.5.3 which I definitely don't want to use.

I didn't change anything besides the emulator tags. Any idea what I'm missing to adapt?

thanks
Martin

Code:

[ebuild   R    ] app-emulation/libvirt-1.2.3:0/1.2.3  USE="caps fuse libvirtd nls qemu udev virt-network -audit -avahi -firewalld -iscsi -lvm -lxc -macvtap -nfs -numa -openvz -parted -pcap -phyp -policykit -rbd -sasl (-selinux) -systemd -uml -vepa -virtualbox -xen"
[ebuild   R    ] app-emulation/qemu-1.5.3  USE="aio caps curl filecaps jpeg ncurses png python seccomp tci threads uuid vhost-net vnc -accessibility -alsa -bluetooth -debug -fdt (-glusterfs) -gtk -iscsi -mixemu -opengl -pulseaudio -rbd -sasl -sdl (-selinux) -smartcard -spice -static -static-softmmu -static-user -systemtap {-test} -tls -usbredir -vde -virtfs -xattr -xen -xfs" PYTHON_TARGETS="python2_7 (-python2_6%)" QEMU_SOFTMMU_TARGETS="x86_64 -alpha -arm -cris -i386 -lm32 -m68k -microblaze -microblazeel -mips -mips64 -mips64el -mipsel -moxie -or32 -ppc -ppc64 -ppcemb -s390x -sh4 -sh4eb -sparc -sparc64 -unicore32 -xtensa -xtensaeb" QEMU_USER_TARGETS="x86_64 -alpha -arm -armeb -cris -i386 -m68k -microblaze -microblazeel -mips -mips64 -mips64el -mipsel -mipsn32 -mipsn32el -or32 -ppc -ppc64 -ppc64abi32 -s390x -sh4 -sh4eb -sparc -sparc32plus -sparc64 -unicore32"


Example VM:
Code:

<domain type='kvm'>
  <name>PRD_admin</name>
  <uuid>9be19e2a-ff96-e633-3227-11f89605b600</uuid>
  <memory unit='KiB'>524288</memory>
  <currentMemory unit='KiB'>524288</currentMemory>
  <memoryBacking>
    <hugepages/>
  </memoryBacking>
  <vcpu placement='static'>1</vcpu>
  <os>
    <type arch='x86_64' machine='pc-1.3'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <cpu mode='custom' match='exact'>
    <model fallback='allow'>SandyBridge</model>
    <vendor>Intel</vendor>
    <topology sockets='1' cores='4' threads='2'/>
    <feature policy='require' name='erms'/>
    <feature policy='require' name='smep'/>
    <feature policy='require' name='fsgsbase'/>
    <feature policy='require' name='rdrand'/>
    <feature policy='require' name='f16c'/>
    <feature policy='require' name='osxsave'/>
    <feature policy='require' name='pcid'/>
    <feature policy='require' name='pdcm'/>
    <feature policy='require' name='xtpr'/>
    <feature policy='require' name='tm2'/>
    <feature policy='require' name='est'/>
    <feature policy='require' name='smx'/>
    <feature policy='require' name='vmx'/>
    <feature policy='require' name='ds_cpl'/>
    <feature policy='require' name='monitor'/>
    <feature policy='require' name='dtes64'/>
    <feature policy='require' name='pbe'/>
    <feature policy='require' name='tm'/>
    <feature policy='require' name='ht'/>
    <feature policy='require' name='ss'/>
    <feature policy='require' name='acpi'/>
    <feature policy='require' name='ds'/>
    <feature policy='require' name='vme'/>
  </cpu>
  <clock offset='utc'/>
    <on_poweroff>destroy</on_poweroff>
    <on_reboot>restart</on_reboot>
    <on_crash>restart</on_crash>
    <devices>
      <emulator>/usr/bin/qemu-kvm</emulator>   <-- working
      <emulator>/usr/bin/qemu-system-x86_64</emulator>   <-- error
...


virsh capabilities
Code:

<capabilities>
  <host>
    <uuid>4980f860-93ba-46f5-99f2-1cc0d0b8d7ee</uuid>
    <cpu>
      <arch>x86_64</arch>
      <model>SandyBridge</model>
      <vendor>Intel</vendor>
      <topology sockets='1' cores='4' threads='2'/>
      <feature name='erms'/>
      <feature name='smep'/>
      <feature name='fsgsbase'/>
      <feature name='rdrand'/>
      <feature name='f16c'/>
      <feature name='osxsave'/>
      <feature name='pcid'/>
      <feature name='pdcm'/>
      <feature name='xtpr'/>
      <feature name='tm2'/>
      <feature name='est'/>
      <feature name='smx'/>
      <feature name='vmx'/>
      <feature name='ds_cpl'/>
      <feature name='monitor'/>
      <feature name='dtes64'/>
      <feature name='pbe'/>
      <feature name='tm'/>
      <feature name='ht'/>
      <feature name='ss'/>
      <feature name='acpi'/>
      <feature name='ds'/>
      <feature name='vme'/>
    </cpu>
    <power_management/>
    <migration_features>
      <live/>
      <uri_transports>
        <uri_transport>tcp</uri_transport>
      </uri_transports>
    </migration_features>
    <topology>
      <cells num='1'>
        <cell id='0'>
          <memory unit='KiB'>16387748</memory>
          <cpus num='8'>
            <cpu id='0' socket_id='0' core_id='0' siblings='0'/>
            <cpu id='1' socket_id='0' core_id='0' siblings='1'/>
            <cpu id='2' socket_id='0' core_id='1' siblings='2'/>
            <cpu id='3' socket_id='0' core_id='1' siblings='3'/>
            <cpu id='4' socket_id='0' core_id='2' siblings='4'/>
            <cpu id='5' socket_id='0' core_id='2' siblings='5'/>
            <cpu id='6' socket_id='0' core_id='3' siblings='6'/>
            <cpu id='7' socket_id='0' core_id='3' siblings='7'/>
          </cpus>
        </cell>
      </cells>
    </topology>
    <secmodel>
      <model>none</model>
      <doi>0</doi>
    </secmodel>
    <secmodel>
      <model>dac</model>
      <doi>0</doi>
      <baselabel type='kvm'>+77:+77</baselabel>
      <baselabel type='qemu'>+77:+77</baselabel>
    </secmodel>
  </host>

  <guest>
    <os_type>hvm</os_type>
    <arch name='i686'>
      <wordsize>32</wordsize>
      <emulator>/usr/bin/qemu-system-x86_64</emulator>
      <machine>pc-i440fx-1.5</machine>
      <machine>none</machine>
      <machine canonical='pc-i440fx-1.5'>pc</machine>
      <machine>pc-i440fx-1.4</machine>
      <machine>pc-1.3</machine>
      <machine>pc-1.2</machine>
      <machine>pc-1.1</machine>
      <machine>pc-1.0</machine>
      <machine>pc-0.15</machine>
      <machine>pc-0.14</machine>
      <machine>pc-0.13</machine>
      <machine>pc-0.12</machine>
      <machine>pc-0.11</machine>
      <machine>pc-0.10</machine>
      <machine>isapc</machine>
      <machine canonical='pc-q35-1.5'>q35</machine>
      <machine>pc-q35-1.5</machine>
      <machine>pc-q35-1.4</machine>
      <domain type='qemu'>
      </domain>
      <domain type='kvm'>
        <emulator>/usr/bin/qemu-kvm</emulator>
        <machine canonical='pc-i440fx-1.5' maxCpus='255'>pc</machine>
        <machine maxCpus='255'>pc-q35-1.4</machine>
        <machine canonical='pc-q35-1.5' maxCpus='255'>q35</machine>
        <machine maxCpus='1'>isapc</machine>
        <machine maxCpus='255'>pc-0.10</machine>
        <machine maxCpus='255'>pc-0.11</machine>
        <machine maxCpus='255'>pc-0.12</machine>
        <machine maxCpus='255'>pc-0.13</machine>
        <machine maxCpus='255'>pc-0.14</machine>
        <machine maxCpus='255'>pc-0.15</machine>
        <machine maxCpus='255'>pc-1.0</machine>
        <machine maxCpus='255'>pc-1.1</machine>
        <machine maxCpus='255'>pc-1.2</machine>
        <machine maxCpus='255'>pc-1.3</machine>
        <machine maxCpus='255'>pc-i440fx-1.4</machine>
      </domain>
    </arch>
    <features>
      <cpuselection/>
      <disksnapshot default='off' toggle='no'/>
      <acpi default='on' toggle='yes'/>
      <apic default='on' toggle='no'/>
      <pae/>
      <nonpae/>
    </features>
  </guest>

  <guest>
    <os_type>hvm</os_type>
    <arch name='x86_64'>
      <wordsize>64</wordsize>
      <emulator>/usr/bin/qemu-system-x86_64</emulator>
      <machine>pc-i440fx-1.5</machine>
      <machine>none</machine>
      <machine canonical='pc-i440fx-1.5'>pc</machine>
      <machine>pc-i440fx-1.4</machine>
      <machine>pc-1.3</machine>
      <machine>pc-1.2</machine>
      <machine>pc-1.1</machine>
      <machine>pc-1.0</machine>
      <machine>pc-0.15</machine>
      <machine>pc-0.14</machine>
      <machine>pc-0.13</machine>
      <machine>pc-0.12</machine>
      <machine>pc-0.11</machine>
      <machine>pc-0.10</machine>
      <machine>isapc</machine>
      <machine canonical='pc-q35-1.5'>q35</machine>
      <machine>pc-q35-1.5</machine>
      <machine>pc-q35-1.4</machine>
      <domain type='qemu'>
      </domain>
      <domain type='kvm'>
        <emulator>/usr/bin/qemu-kvm</emulator>
        <machine canonical='pc-i440fx-1.5' maxCpus='255'>pc</machine>
        <machine maxCpus='255'>pc-q35-1.4</machine>
        <machine canonical='pc-q35-1.5' maxCpus='255'>q35</machine>
        <machine maxCpus='1'>isapc</machine>
        <machine maxCpus='255'>pc-0.10</machine>
        <machine maxCpus='255'>pc-0.11</machine>
        <machine maxCpus='255'>pc-0.12</machine>
        <machine maxCpus='255'>pc-0.13</machine>
        <machine maxCpus='255'>pc-0.14</machine>
        <machine maxCpus='255'>pc-0.15</machine>
        <machine maxCpus='255'>pc-1.0</machine>
        <machine maxCpus='255'>pc-1.1</machine>
        <machine maxCpus='255'>pc-1.2</machine>
        <machine maxCpus='255'>pc-1.3</machine>
        <machine maxCpus='255'>pc-i440fx-1.4</machine>
      </domain>
    </arch>
    <features>
      <cpuselection/>
      <disksnapshot default='off' toggle='no'/>
      <acpi default='on' toggle='yes'/>
      <apic default='on' toggle='no'/>
    </features>
  </guest>

</capabilities>
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7197

PostPosted: Thu Jul 17, 2014 8:36 am    Post subject: Reply with quote

The old wrapper was
Code:
exec /usr/bin/qemu-system-x86_64 -machine accel=kvm "$@"
Back to top
View user's profile Send private message
aluin
n00b
n00b


Joined: 16 Jul 2014
Posts: 2

PostPosted: Thu Jul 17, 2014 8:11 pm    Post subject: Reply with quote

Solved

My mistake was to not actually upgrade to qemu-2.0.0 but testing the new emulator tag being still on 1.5.3. After the upgrade, everything works fine.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum