On Wed, Apr 27, 2022 at 14:11:23 +0800, Jiatong Shen wrote:
Hello libvirt experts,
I am facing the following exceptions during live migrating a virtual
machine from one compute node to another.
file or directory: libvirt.libvirtError: Cannot check QEMU binary
/usr/bin/kvm-spice: No such file or directory
File "/var/lib/openstack/lib/python3.6/site-packages/eventlet/tpool.py",
line 83, in tworker
rv = meth(*args, **kwargs)
File "/var/lib/openstack/lib/python3.6/site-packages/libvirt.py", line
1745, in migrateToURI3
if ret == -1: raise libvirtError ('virDomainMigrateToURI3() failed',
dom=self)
libvirt.libvirtError: Cannot check QEMU binary /usr/bin/kvm-spice: No such
file or directory
After some investigation, we found that this error is triggered because we
do not have qemu-kvm installed in our container, btw the libvirt is
directly installed on the source node.
I have following questions
Is it possible to change emulator during live migration? I try to to remove
emulator under devices but looks like it does not help.
The migration API you've used (virDomainMigrateToURI3) supports
additional parameters. One of the supported parameters is:
VIR_MIGRATE_PARAM_DEST_XML:
/**
* VIR_MIGRATE_PARAM_DEST_XML:
*
* virDomainMigrate* params field: the new configuration to be used for the
* domain on the destination host as VIR_TYPED_PARAM_STRING. The configuration
* must include an identical set of virtual devices, to ensure a stable guest
* ABI across migration. Only parameters related to host side configuration
* can be changed in the XML. Hypervisors which support this field will forbid
* migration if the provided XML would cause a change in the guest ABI. This
* field cannot be used to rename the domain during migration (use
* VIR_MIGRATE_PARAM_DEST_NAME field for that purpose). Domain name in the
* destination XML must match the original domain name.
*
* Omitting this parameter keeps the original domain configuration. Using this
* field with hypervisors that do not support changing domain configuration
* during migration will result in a failure.
*
* Since: v1.1.0
*/
So you fetch a migratable version of the XML (VIR_DOMAIN_XML_MIGRATABLE
flag for the XML dumping API) and update the emulator path. Then feed it
as the additional parameter