From 8f899d734e1c84c0db2f70a7200854387a9e51da 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 --- PVE/QemuServer.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 3a9aa1ed..a3c1e04f 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -4183,7 +4183,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; }