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>
This commit is contained in:
Thomas Lamprecht 2019-10-17 19:10:43 +02:00
parent af1f1ec038
commit 8f899d734e

View File

@ -4183,7 +4183,7 @@ sub config_to_command {
if (my $vmstate = $conf->{vmstate}) { if (my $vmstate = $conf->{vmstate}) {
my $statepath = PVE::Storage::path($storecfg, $vmstate); my $statepath = PVE::Storage::path($storecfg, $vmstate);
PVE::Storage::activate_volumes($storecfg, [$vmstate]); push @$vollist, $statepath;
push @$cmd, '-loadstate', $statepath; push @$cmd, '-loadstate', $statepath;
} }