From eb15b9f07497306224b91d461b6d0599fc5ed626 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Fri, 22 Jan 2016 11:54:34 +0100 Subject: [PATCH] clone: correctly activate volumes (consider snapshots) --- PVE/API2/Qemu.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 61e3eb2c..c1dba725 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -2281,7 +2281,7 @@ __PACKAGE__->register_method({ eval { local $SIG{INT} = $SIG{TERM} = $SIG{QUIT} = $SIG{HUP} = sub { die "interrupted by signal\n"; }; - PVE::Storage::activate_volumes($storecfg, $vollist); + PVE::Storage::activate_volumes($storecfg, $vollist, $snapname); foreach my $opt (keys %$drives) { my $drive = $drives->{$opt}; @@ -2299,7 +2299,7 @@ __PACKAGE__->register_method({ if ($target) { # always deactivate volumes - avoid lvm LVs to be active on several nodes - PVE::Storage::deactivate_volumes($storecfg, $vollist); + PVE::Storage::deactivate_volumes($storecfg, $vollist, $snapname); my $newconffile = PVE::QemuServer::config_file($newid, $target); die "Failed to move config to node '$target' - rename failed: $!\n"