[Openstack] Live Migration and LibVirt CPU Mode

Oisin O'Malley oisin.omalley at iocane.com.au
Thu Jul 6 02:13:48 UTC 2017


>> 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.

>You can have a look cheating your way around it.
>There is some code which removes the checks which you might be able to (ab)use:
>https://bugs.launchpad.net/nova/+bug/1588003

I don't think this will apply either as the error in the traceback is coming from LibVirt itself not Nova, which would imply Nova's pre-migration compatibility checks have passed and it attempted and failed to call LibVirt to migrate the VM.

nova-compute: Traceback (most recent call last):
nova-compute: File "/usr/lib/python2.7/site-packages/eventlet/hubs/hub.py", line 457, in fire_timers
nova-compute: timer()
nova-compute: File "/usr/lib/python2.7/site-packages/eventlet/hubs/timer.py", line 58, in __call__
nova-compute: cb(*args, **kw)
nova-compute: File "/usr/lib/python2.7/site-packages/eventlet/event.py", line 168, in _do_send
nova-compute: waiter.switch(result)
nova-compute: File "/usr/lib/python2.7/site-packages/eventlet/greenthread.py", line 214, in main
nova-compute: result = function(*args, **kwargs)
nova-compute: File "/usr/lib/python2.7/site-packages/nova/utils.py", line 1066, in context_wrapper
nova-compute: return func(*args, **kwargs)
nova-compute: File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 5911, in _live_migration_operation
nova-compute: instance=instance)
nova-compute: File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
nova-compute: self.force_reraise()
nova-compute: File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
nova-compute: six.reraise(self.type_, self.value, self.tb)
nova-compute: File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 5907, in _live_migration_operation
nova-compute: bandwidth=CONF.libvirt.live_migration_bandwidth)
nova-compute: File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/guest.py", line 568, in migrate
nova-compute: destination, params=params, flags=flags)
nova-compute: File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 186, in doit
nova-compute: result = proxy_call(self._autowrap, f, *args, **kwargs)
nova-compute: File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 144, in proxy_call
nova-compute: rv = execute(f, *args, **kwargs)
nova-compute: File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 125, in execute
nova-compute: six.reraise(c, e, tb)
nova-compute: File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 83, in tworker
nova-compute: rv = meth(*args, **kwargs)
nova-compute: File "/usr/lib64/python2.7/site-packages/libvirt.py", line 1939, in migrateToURI3
nova-compute: if ret == -1: raise libvirtError ('virDomainMigrateToURI3() failed', dom=self)
nova-compute: libvirtError: unsupported configuration: guest and host CPU are not compatible: Host CPU does not provide required features: fma, x2apic, movbe, tsc-deadline, xs


>You might want to double-check if a (hard)-rebooted migrated (with the host-model config) instances on the Broadwell compute node does not get a Broadwell cpu before modifying this ;)

It doesn't, as the Broadwell hosts nova .conf has the following;

cpu_mode = custom
cpu_model = Westmere

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
Email:oisin.omalley at iocane.com.au
Web:www.iocane.com.au

Better for business



More information about the Openstack mailing list