]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Emit compatible XML when migrating a domain
authorJiri Denemark <jdenemar@redhat.com>
Fri, 4 May 2012 19:23:17 +0000 (21:23 +0200)
committerCole Robinson <crobinso@redhat.com>
Thu, 14 Jun 2012 15:19:18 +0000 (11:19 -0400)
commitf6936215f198791076b9739c0bc702c5b889c290
tree131d8c749b151c48cb2b47f534dbef63043f9230
parent68563e7ad69728ca980b71acc3826722d43106a8
qemu: Emit compatible XML when migrating a domain

When we added the default USB controller into domain XML, we efficiently
broke migration to older versions of libvirt that didn't support USB
controllers at all (0.9.4 and earlier) even for domains that don't use
anything that the older libvirt can't provide. We still want to present
the default USB controller in any XML seen by a user/app but we can
safely remove it from the domain XML used during migration. If we are
migrating to a new enough libvirt, it will add the controller XML back,
while older libvirt won't be confused with it although it will still
tell qemu to create the controller.

Similar approach can be used in the future whenever we find out we
always enabled some kind of device without properly advertising it in
domain XML.
(cherry picked from commit 409b5f549530e7b3a33f4505f2cad2e26896107c)
src/qemu/qemu_domain.c
src/qemu/qemu_domain.h
src/qemu/qemu_driver.c
src/qemu/qemu_migration.c
src/qemu/qemu_process.c