From afa5eae56a6b37155ffafb4712e1afea01b790ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Fri, 26 Feb 2016 09:17:47 +0100 Subject: [PATCH] Make snapshot_save_vmstate proper sub --- PVE/QemuServer.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 491116d4..0f7c485b 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -5933,7 +5933,7 @@ my $alloc_vmstate_volid = sub { return $volid; }; -my $snapshot_save_vmstate = sub { +sub snapshot_save_vmstate { my ($vmid, $conf, $snapname, $storecfg) = @_; my $snap = $conf->{snapshots}->{$snapname}; @@ -5942,7 +5942,7 @@ my $snapshot_save_vmstate = sub { # always overwrite machine if we save vmstate. This makes sure we # can restore it later using correct machine type $snap->{machine} = get_current_qemu_machine($vmid); -}; +} sub snapshot_prepare { my ($vmid, $snapname, $save_vmstate, $comment) = @_; @@ -5969,7 +5969,7 @@ sub snapshot_prepare { $snap = $conf->{snapshots}->{$snapname} = {}; if ($save_vmstate && check_running($vmid)) { - &$snapshot_save_vmstate($vmid, $conf, $snapname, $storecfg); + snapshot_save_vmstate($vmid, $conf, $snapname, $storecfg); } &$snapshot_copy_config($conf, $snap);