]> git.proxmox.com Git - qemu-server.git/commit
migrate: cleanup disk/bitmaps if 'qm start' failed
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Thu, 26 Mar 2020 14:42:59 +0000 (15:42 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 27 Mar 2020 06:54:44 +0000 (07:54 +0100)
commit9b3f5a5c993004598bb8a002d0cb145d75500c09
tree5d66fb94e4784afb012905ed0a5b0262487a0481
parent7f5fb49a7c610307ba9126c8b83c08ecd6ef8c74
migrate: cleanup disk/bitmaps if 'qm start' failed

since bitmaps are set early on, and 'qm start' potentially has allocated
the disks but still failed. we can only clean up what we know about
anyway, so the disk part is still only best effort.

also use replicated_volumes instead of bitmap existence to check for
replicated volumes, since 'qm start' on an old node that does not
understand replicated volumes might have allocated a new volume that we
DO want to clean up, and not skip.

also cleanup disks after stopping target VM, otherwise we might end up
in a situation where the target VM is still running and using the disks,
thus blocking the disk cleanup.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
PVE/QemuMigrate.pm