From a0e27afb5e33e12815f623d0e4298de5230e5276 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Tue, 6 Apr 2021 10:12:47 +0200 Subject: [PATCH] api: restore: start and live-restore do not conflict if live-restore is set then the VM is actually started before, so we can just skip it.. Signed-off-by: Thomas Lamprecht --- PVE/API2/Qemu.pm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index c7b5ca75..4755917c 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -575,9 +575,6 @@ __PACKAGE__->register_method({ my $unique = extract_param($param, 'unique'); my $live_restore = extract_param($param, 'live-restore'); - raise_param_exc({ 'start' => "cannot specify 'start' with 'live-restore'" }) - if $start_after_create && $live_restore; - if (defined(my $ssh_keys = $param->{sshkeys})) { $ssh_keys = URI::Escape::uri_unescape($ssh_keys); PVE::Tools::validate_ssh_public_keys($ssh_keys); @@ -686,7 +683,7 @@ __PACKAGE__->register_method({ PVE::QemuConfig->lock_config_full($vmid, 1, $realcmd); - if ($start_after_create) { + if ($start_after_create && !$live_restore) { print "Execute autostart\n"; eval { PVE::API2::Qemu->vm_start({ vmid => $vmid, node => $node }) }; warn $@ if $@;