]> git.proxmox.com Git - qemu-server.git/commit
Fix #2171: vm_start: volid based statefiles were not activated
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 17 Oct 2019 17:13:01 +0000 (19:13 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 17 Oct 2019 17:20:32 +0000 (19:20 +0200)
commit5c1d42b7f825fa124ff3701b32f9ecc011bece95
tree8d721eae350d564ce22fc5fc7ec075103a05db99
parent8f899d734e1c84c0db2f70a7200854387a9e51da
Fix #2171: vm_start: volid based statefiles were not activated

So, while we could just make this a special case before the
config_to_command call and set the $conf->{vmstate} to the statefile
for the case were it's a valid volumeid, the special case handling
get's much easier when we do this outside of that method.

So it's basically a trade-off, and after looking far to long at all
nice revisions Alwin made for me and Fabians request, and even trying
out different approaches, it was never perfect.

But having slight code duplication over the movement mess I proposed
(as I did not had the full picture then, sorry Alwin) felt like the
slightly nicer trade off, as all worked I just use this one now, it
has very clear semantics, easy to understand and that now three lines
are duplicated is IMO irrelevant.

Co-developed-by: Alwin Antreich <a.antreich@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/QemuConfig.pm
PVE/QemuServer.pm