[pve-devel] [PATCH qemu-server] forbid migration of template with local base image

Fabian Grünbichler f.gruenbichler at proxmox.com
Thu Sep 15 13:23:56 CEST 2016


---
Note: requires the linked clones / list_images cleanup series in pve-storage

 PVE/QemuMigrate.pm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index 6415032..22a49ef 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -317,6 +317,9 @@ sub sync_disks {
 		    die "non-migratable snapshot exists\n";
 		}
 	    }
+
+	    die "referenced by linked clone(s)\n"
+		if PVE::Storage::volume_is_base_and_used($self->{storecfg}, $volid);
 	};
 
 	my $test_drive = sub {
-- 
2.1.4





More information about the pve-devel mailing list