<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hello..</p>
    <p>can you send cpu info(/proc/cpuinfo or dmidecode)?</p>
    <p>see => <br>
    </p>
    <p><a class="moz-txt-link-freetext" href="https://wiki.libvirt.org/page/Libvirt_identifies_host_processor_as_a_different_model_from_the_hardware_documentation">https://wiki.libvirt.org/page/Libvirt_identifies_host_processor_as_a_different_model_from_the_hardware_documentation</a></p>
    <p><a class="moz-txt-link-freetext" href="https://serverfault.com/questions/585791/which-cpu-model-to-set-for-guest-kvm-when-processor-is-ivy-bridge">https://serverfault.com/questions/585791/which-cpu-model-to-set-for-guest-kvm-when-processor-is-ivy-bridge</a></p>
    <p>libvirt linux => <span style="color: rgb(0, 0, 0);
        font-family: LibvirtOverpass; font-size: 14px; font-style:
        normal; font-variant-ligatures: normal; font-variant-caps:
        normal; font-weight: normal; letter-spacing: normal; orphans: 2;
        text-align: start; text-indent: 0px; text-transform: none;
        white-space: normal; widows: 2; word-spacing: 0px;
        -webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
        255); text-decoration-style: initial; text-decoration-color:
        initial; display: inline !important; float: none;">/usr/share/libvirt/cpu_map.xml</span></p>
    <p><span style="color: rgb(0, 0, 0); font-family: LibvirtOverpass;
        font-size: 14px; font-style: normal; font-variant-ligatures:
        normal; font-variant-caps: normal; font-weight: normal;
        letter-spacing: normal; orphans: 2; text-align: start;
        text-indent: 0px; text-transform: none; white-space: normal;
        widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;
        background-color: rgb(255, 255, 255); text-decoration-style:
        initial; text-decoration-color: initial; display: inline
        !important; float: none;">qemu => qemu-system-x86_64 --cpu ?</span></p>
    <p><span style="color: rgb(0, 0, 0); font-family: LibvirtOverpass;
        font-size: 14px; font-style: normal; font-variant-ligatures:
        normal; font-variant-caps: normal; font-weight: normal;
        letter-spacing: normal; orphans: 2; text-align: start;
        text-indent: 0px; text-transform: none; white-space: normal;
        widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;
        background-color: rgb(255, 255, 255); text-decoration-style:
        initial; text-decoration-color: initial; display: inline
        !important; float: none;">x86           qemu64  QEMU Virtual CPU
        version 2.5+                   <br>
        x86           phenom  AMD Phenom(tm) 9550 Quad-Core
        Processor         <br>
        x86         core2duo  Intel(R) Core(TM)2 Duo CPU     T7700  @
        2.40GHz <br>
        x86            kvm64  Common KVM
        processor                            <br>
        x86           qemu32  QEMU Virtual CPU version
        2.5+                   <br>
        x86            kvm32  Common 32-bit KVM
        processor                     <br>
        x86          coreduo  Genuine Intel(R) CPU           T2600  @
        2.16GHz <br>
        x86             
        486                                                  <br>
        x86         
        pentium                                                  <br>
        x86        
        pentium2                                                  <br>
        x86        
        pentium3                                                  <br>
        x86           athlon  QEMU Virtual CPU version
        2.5+                   <br>
        x86             n270  Intel(R) Atom(TM) CPU N270   @
        1.60GHz          <br>
        x86           Conroe  Intel Celeron_4x0 (Conroe/Merom Class Core
        2)   <br>
        x86           Penryn  Intel Core 2 Duo P9xxx (Penryn Class Core
        2)    <br>
        x86          Nehalem  Intel Core i7 9xx (Nehalem Class Core
        i7)       <br>
        x86         <b>Westmere  Westmere E56xx/L56xx/X56xx (Nehalem-C)</b>         
        <br>
        x86      SandyBridge  Intel Xeon E312xx (Sandy
        Bridge)                <br>
        x86        IvyBridge  Intel Xeon E3-12xx v2 (Ivy
        Bridge)              <br>
        x86    Haswell-noTSX  Intel Core Processor (Haswell, no
        TSX)          <br>
        x86          Haswell  Intel Core Processor
        (Haswell)                  <br>
        x86  Broadwell-noTSX  Intel Core Processor (Broadwell, no
        TSX)        <br>
        x86        Broadwell  Intel Core Processor
        (Broadwell)                <br>
        x86       Opteron_G1  AMD Opteron 240 (Gen 1 Class
        Opteron)           <br>
        x86       Opteron_G2  AMD Opteron 22xx (Gen 2 Class
        Opteron)          <br>
        x86       Opteron_G3  AMD Opteron 23xx (Gen 3 Class
        Opteron)          <br>
        x86       Opteron_G4  AMD Opteron 62xx class
        CPU                      <br>
        x86       Opteron_G5  AMD Opteron 63xx class
        CPU                      <br>
        x86             host  KVM processor with all supported host
        features (only available in KVM mode)<br>
        <br>
      </span>Regards.</p>
    <br>
    <div class="moz-cite-prefix">On 05/07/17 01:05, Oisin O'Malley
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:b9fa81d7ffae42c282e10d17e7851a06@IOCANE-EXCH03.iocane.local">
      <pre wrap="">Hi,

Thanks for the suggestion, but it’s still not working. I have changed both nodes to use the Westmere CPU model, which is the lowest common CPU instruction set. The following is in the nova.conf on both nodes;

cpu_mode = custom
cpu_model = Westmere
libvirt_cpu_mode = custom
libvirt_cpu_model = Westmere

I'm beginning to suspect that because the VM has "cpu mode='host-model'" in its xml CPU definition, libvirt is incorrectly comparing the current host CPU to the target host instead of comparing the guest CPU to the target host CPU. This would be consistent with the error message which states that target host (Westmere) isn't compatible with the 'Broadwell-noTSX' CPU model, even though the VM is configured as Westmere (<model fallback='allow'>Westmere</model>).

Original Error Message;
Host CPU does not provide required features: fma, x2apic, movbe, tsc-deadline, xsave, osxsave, avx, f16c, rdrand, fsgsbase, tsc_adjust, bmi1, hle, avx2, smep, bmi2, erms, invpcid, rtm, rdseed, adx, smap, xsaveopt, abm, 3dnowprefetch; try using 'Broadwell-noTSX' CPU model

As  mentioned previously, when the VM is booted on a compute node with "cpu_model = Westmere" in its nova.conf, the VMs XML CPU definition contains the following and DOES live migrate;

<cpu mode='custom' match='exact'>
    <model fallback='allow'>Westmere</model>

Therefore it appears if  a VM XML CPU definition contains "cpu mode='host-model'" the cpu model is ignored and the 2 host CPU models are compared. And if  "cpu mode='custom'", guest and target CPU models are compared. This would also be consistent with the fact I can migrate from a Westmere to a Broadwell, as Broadwell is a superset of Westmere but not the other way around.

Any suggestions with dealing with this? Rebooting all hosted instances isn't really an option for us.

Regards,
Oisin




</pre>
      <blockquote type="cite">
        <pre wrap="">From: <a class="moz-txt-link-abbreviated" href="mailto:rag.open.net@openmailbox.org">rag.open.net@openmailbox.org</a> [<a class="moz-txt-link-freetext" href="mailto:rag.open.net@openmailbox.org">mailto:rag.open.net@openmailbox.org</a>]
Sent: Tuesday, 4 July 2017 9:41 AM
To: Oisin O'Malley <a class="moz-txt-link-rfc2396E" href="mailto:oisin.omalley@iocane.com.au"><oisin.omalley@iocane.com.au></a>
Subject: Re: [Openstack] Live Migration and LibVirt CPU Mode

Hello Malley, excuse me for delay...

for resolve your problem consider change architecture in 2 compute nodes..

compute1

cat /proc/cpuinfo
compute2

cat /proc/cpuinfo

search middle architecture for this processor..
my example in my situation

1º compute
model name    : AMD Phenom(tm) II X6 1090T Processor
2º compute
model name    : AMD A8-7600 Radeon R7, 10 Compute Cores 4C+6G

and de nova in 2 compute:
libvirt_cpu_mode = custom
cpu_mode = custom
libvirt_cpu_model=Opteron_G3
cpu_model=Opteron_G3

Custom:

If your nova.conf file contains cpu_mode=custom, you can explicitly specify one of the supported named models using the cpu_model configuration option. For example, to configure the KVM guests to expose >Nehalem CPUs, your nova.conf file should contain

Nova cpu

that's all. Search compatible architecture
</pre>
      </blockquote>
      <pre wrap="">

Oisin O'Malley
Systems Engineer
Iocane Pty Ltd
763 South Road
Black Forest SA 5035

Office:+61 (8) 8413 1010
Fax:+61 (8) 8231 2050
<a class="moz-txt-link-abbreviated" href="mailto:Email:oisin.omalley@iocane.com.au">Email:oisin.omalley@iocane.com.au</a>
Web:www.iocane.com.au

Better for business

</pre>
    </blockquote>
    <br>
  </body>
</html>