To avoid shutting down the VM when performing a live-restore, consider live-restore=1 to translate to a HA state of 'started', similar to start=1.
Signed-off-by: Michael Köppl <[email protected]> --- src/PVE/API2/Qemu.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/API2/Qemu.pm b/src/PVE/API2/Qemu.pm index c580bf63..25b6529c 100644 --- a/src/PVE/API2/Qemu.pm +++ b/src/PVE/API2/Qemu.pm @@ -1418,7 +1418,7 @@ __PACKAGE__->register_method({ if ($ha_managed) { print "Add as HA resource\n"; - my $state = $start_after_create ? 'started' : 'stopped'; + my $state = $start_after_create || $live_restore ? 'started' : 'stopped'; my $cmd = ['ha-manager', 'add', "vm:$vmid", '--state', $state]; eval { PVE::Tools::run_command($cmd); }; warn $@ if $@; -- 2.47.3 _______________________________________________ pve-devel mailing list [email protected] https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
