We can clone online a running vm, we don't have to deactive source vm volume
if the source vm is running

Signed-off-by: Alexandre Derumier <aderum...@odiso.com>
---
 PVE/API2/Qemu.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 226e597..bf6f6fd 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -2300,7 +2300,7 @@ __PACKAGE__->register_method({
 
                     if ($target) {
                        # always deactivate volumes - avoid lvm LVs to be 
active on several nodes
-                       PVE::Storage::deactivate_volumes($storecfg, $vollist, 
$snapname);
+                       PVE::Storage::deactivate_volumes($storecfg, $vollist, 
$snapname) if !$running;
 
                        my $newconffile = PVE::QemuServer::config_file($newid, 
$target);
                        die "Failed to move config to node '$target' - rename 
failed: $!\n"
-- 
2.1.4

_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to