]> xenbits.xensource.com Git - libvirt.git/commit
qemu: Stop domain on failed restore
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 13 Jan 2020 10:07:53 +0000 (11:07 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 16 Jan 2020 08:17:07 +0000 (09:17 +0100)
commit4c581527d431939a63be70c201b4ddab703cddbe
tree1dc8d1812ce63d3cede20d560775a38ceb5ce96b
parent3203ad6cfd617fb11d4bb47e514c370b6624641b
qemu: Stop domain on failed restore

When resuming a domain from a save file, we read the domain XML
from the file, add it onto our internal list of domains, start
the qemu process, let it load the incoming migration stream and
resume its vCPUs afterwards. If anything goes wrong, the domain
object is removed from the list of domains and error is returned
to the caller. However, the qemu process might be left behind -
if resuming vCPUs fails (e.g. because qemu is unable to acquire
write lock on a disk) then due to a bug the qemu process is not
killed but the domain object is removed from the list.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1718707
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
src/qemu/qemu_driver.c