mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-01 17:05:54 +00: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:
parent
3dcb98d52b
commit
d560409207
@ -245,6 +245,12 @@ sub sync_disks {
|
|||||||
|
|
||||||
die "can't migrate '$volid' - storagy type '$scfg->{type}' not supported\n"
|
die "can't migrate '$volid' - storagy type '$scfg->{type}' not supported\n"
|
||||||
if $scfg->{type} ne 'dir';
|
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) {
|
foreach my $volid (keys %$volhash) {
|
||||||
|
Loading…
Reference in New Issue
Block a user