5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-01-24 02:04:10 +03:00

live-restore: register qmeventd handle

Similar to backups, prevent QEMU from being killed by qmeventd during
the live-restore, so a guest can shut itself down without aborting the
restore operation.

Note that the 'close' is only to be explicit, the handle will also be
closed in case an operation errors (i.e. when the 'eval' is left).

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
This commit is contained in:
Stefan Reiter 2021-03-03 10:56:11 +01:00 committed by Thomas Lamprecht
parent 65911545dd
commit 26697640d6

View File

@ -6440,6 +6440,8 @@ sub pbs_live_restore {
{},
);
my $qmeventd_fd = register_qmeventd_handle($vmid);
# begin streaming, i.e. data copy from PBS to target disk for every vol,
# this will effectively collapse the backing image chain consisting of
# [target <- alloc-track -> PBS snapshot] to just [target] (alloc-track
@ -6461,6 +6463,8 @@ sub pbs_live_restore {
foreach my $ds (keys %$restored_disks) {
mon_cmd($vmid, 'blockdev-del', 'node-name' => "$ds-pbs");
}
close($qmeventd_fd);
};
my $err = $@;