]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Fix persistent migration of transient domains
authorJiri Denemark <jdenemar@redhat.com>
Tue, 2 May 2017 16:01:04 +0000 (18:01 +0200)
committerCole Robinson <crobinso@redhat.com>
Wed, 10 May 2017 22:02:39 +0000 (18:02 -0400)
commit91ac0195f965493c606e85f355b32e9b0274d148
tree71ba1cefeccc3d0a9904538fb3b480fcb3c6eda4
parentce275361cc9034e594da3bc97b794769a079656c
qemu: Fix persistent migration of transient domains

While fixing a bug with incorrectly freed memory in commit
v3.1.0-399-g5498aa29a, I accidentally broke persistent migration of
transient domains. Before adding qemuDomainDefCopy in the path, the code
just took NULL from vm->newDef and used it as the persistent def, which
resulted in no persistent XML being sent in the migration cookie. This
scenario is perfectly valid and the destination correctly handles it by
using the incoming live definition and storing it as the persistent one.

After the mentioned commit libvirtd would just segfault in the described
scenario.

https://bugzilla.redhat.com/show_bug.cgi?id=1446205

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
(cherry picked from commit 59307fade86fb74db1f8f572433962233f7ac123)
src/qemu/qemu_migration.c