On 8/16/23 22:55, Eric Wheeler wrote:
Hello all, I'm reposting this to the libvirt-users list:
I looked around for documentation on intra-host KVM migration but haven't
found much. For example, this could be useful to "migrate" VM to run on
an upgraded version of `qemu-kvm` without migrating to a different host
and migrating back.
We tested migrating a VM to the same host on an old version of libvirt
(el7), and it complained about UUID conflicts if the destination already
hosts the same VM.
Changing the name or the UUID in the destination XML during migration
(`virsh migrate --xml`) gives an error that the UUID or name does not
match during migration:
UUID change:
error: unsupported configuration: Target domain uuid
66a113f4-a101-4db1-8478-49cf088fedb9 does not matchsource
b5256b25-e137-45b8-bddb-78545ab55fc4
Name change:
error: unsupported configuration: Target domain name 'diskless2' does not
match source 'diskless'
Questions before we do more testing:
- Do modern versions of libvirt support intra-host migration?
- If so, which version?
- Documentation?
Any help you can provide would be greatly appreciated!
In general, no. There are plenty of resources that are unique to the
host and migrating within the host would try to reacquire those. For
instance, various sockets, locks, etc.
Having said that, your best choice is to run libvirt inside a container
and then migrate to another container running on the same host. This has
the highest chance of succeeding. But other limitations still apply
(e.g. no PCI passthrough, ideally shared storage, etc.) because from
libvirt's POV it would be migration between two hosts.
Michal