5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-01-13 13:17:55 +03:00

forbid offline migration of a non shared volume if it's a clone

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
Alexandre Derumier 2013-02-14 11:58:54 +01:00 committed by Dietmar Maurer
parent 3dcb98d52b
commit d560409207

View File

@ -245,6 +245,12 @@ sub sync_disks {
die "can't migrate '$volid' - storagy type '$scfg->{type}' not supported\n"
if $scfg->{type} ne 'dir';
#if file, check if a backing file exist
if(($scfg->{type} eq 'dir') && (!$sharedvm)){
my (undef, undef, undef, $parent) = PVE::Storage::volume_size_info($self->{storecfg}, $volid, 1);
die "can't migrate '$volid' as it's a clone of '$parent'";
}
}
foreach my $volid (keys %$volhash) {