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 <a.antreich@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit 8f899d734e)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2019-10-17 19:10:43 +02:00
parent 2afc3515c7
commit c4cabf8735

View File

@ -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;
}