]> git.proxmox.com Git - qemu-server.git/commitdiff
clone: correctly activate volumes (consider snapshots)
authorDietmar Maurer <dietmar@proxmox.com>
Fri, 22 Jan 2016 10:54:34 +0000 (11:54 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 22 Jan 2016 10:54:34 +0000 (11:54 +0100)
PVE/API2/Qemu.pm

index 61e3eb2c1b8b61b6b2531e5a7d1364727b7b4374..c1dba7254fbb6d67f8aa4b06ce7aff1ff563a7e0 100644 (file)
@@ -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"