diff --git a/PVE/QemuConfig.pm b/PVE/QemuConfig.pm index 84d601ae..f6a7f538 100644 --- a/PVE/QemuConfig.pm +++ b/PVE/QemuConfig.pm @@ -359,8 +359,7 @@ sub __snapshot_rollback_vm_start { my ($class, $vmid, $vmstate, $data) = @_; my $storecfg = PVE::Storage::config(); - my $statefile = PVE::Storage::path($storecfg, $vmstate); - PVE::QemuServer::vm_start($storecfg, $vmid, $statefile, undef, undef, undef, $data->{forcemachine}); + PVE::QemuServer::vm_start($storecfg, $vmid, $vmstate, undef, undef, undef, $data->{forcemachine}); } sub __snapshot_rollback_get_unused { diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 3238216d..60a377c7 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -4001,7 +4001,7 @@ sub config_to_command { if (my $vmstate = $conf->{vmstate}) { my $statepath = PVE::Storage::path($storecfg, $vmstate); - push @$vollist, $statepath; + push @$vollist, $vmstate; push @$cmd, '-loadstate', $statepath; } @@ -5277,8 +5277,12 @@ sub vm_start { push @$cmd, '-incoming', $migrate_uri; push @$cmd, '-S'; - } else { + } elsif (-e $statefile) { push @$cmd, '-loadstate', $statefile; + } else { + my $statepath = PVE::Storage::path($storecfg, $statefile); + push @$vollist, $statefile; + push @$cmd, '-loadstate', $statepath; } } elsif ($paused) { push @$cmd, '-S';