[Openstack] Live Migration and LibVirt CPU Mode

Steve Gordon sgordon at redhat.com
Fri Jul 7 22:16:26 UTC 2017


----- Original Message -----
> From: "Oisin O'Malley" <oisin.omalley at iocane.com.au>
> To: "Robert Van Leeuwen" <rovanleeuwen at ebay.com>, openstack at lists.openstack.org
> Sent: Wednesday, July 5, 2017 10:13:48 PM
> Subject: Re: [Openstack] Live Migration and LibVirt CPU Mode
> 
> 
> >> The instance can also be migrated between 2 Westmere hosts.
> >> As I outline in another email, I suspect (perhaps incorrectly) as the
> >> VM has "cpu mode='host-model'" in its running config, libvirt may be
> >> comparing source and destination host CPUs and not guest and destination
> >> CPUs.
> >
> >Indeed it very much seems like it will look at the host cpu-model and not
> >the guest since it is complaining about Broadwell CPU features.
> >The libvirt documentation also sort of suggests this is the case:
> >https://libvirt.org/formatdomain.html#elementsCPU
> >“Prior to libvirt 3.2.0 and QEMU 2.9.0 detection of the host CPU model via
> >QEMU is not supported. Thus the CPU configuration created using host-model
> >may not work as expected.”
> 
> I think this may only apply when initially booting VM with "cpu
> mode='host-model'", when it determines compatible CPU features. Though I may
> be wrong.

I doubled checked this with folks in #openstack-nova and we basically came to the same conclusion and that this is the expected behavior. It's important to choose cpu_mode/cpu_model settings up front based on your environment and requirements. Using host-model works well when all hosts have CPUs of roughly the same generation but when dealing with hosts that span multiple generations it's better to either segregate them (e.g. host aggregates) or choose specify a lowest common denominator baseline using cpu_mode=custom and a specific model.

I'm not aware of a safe/guaranteed way to get a running guest from the newer generation host to the older generation host where the guest is using host-model, and even if such a mechanism did exist keep in mind it would also be reliant on the guest not panicing when the CPU exposed to it is swapped out for one with less features.

Thanks,

Steve



More information about the Openstack mailing list