From c4cabf87355d2cb70c34b30e996b51781b718a4d Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Thu, 17 Oct 2019 19:10:43 +0200 Subject: [PATCH] cfg2cmd: push vmstate to volid list to ensure it gets also deactivated the volume id list is only used to activate before real start and deactivate later, so use it for the vmstate file too. This not only makes config_to_command have less side effects, it also ensures that the vmstate is deactivated again Co-developed-by: Alwin Antreich Signed-off-by: Thomas Lamprecht (cherry picked from commit 8f899d734e1c84c0db2f70a7200854387a9e51da) Signed-off-by: Thomas Lamprecht --- PVE/QemuServer.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 1af67130..3238216d 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); - PVE::Storage::activate_volumes($storecfg, [$vmstate]); + push @$vollist, $statepath; push @$cmd, '-loadstate', $statepath; }