mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-04 16:38:16 +00:00
fix bug #517: improve error message
Get a understandble message, if someone try to increase a qcow2 image where one or more snapshots reside
This commit is contained in:
parent
1bc483f6bc
commit
d662790a14
@ -2649,6 +2649,12 @@ __PACKAGE__->register_method({
|
||||
|
||||
my $drive = PVE::QemuServer::parse_drive($disk, $conf->{$disk});
|
||||
|
||||
my (undef, undef, undef, undef, undef, undef, $format) =
|
||||
PVE::Storage::parse_volname($storecfg, $drive->{file});
|
||||
|
||||
die "can't resize volume: $disk if snapshot exists\n"
|
||||
if %{$conf->{snapshots}} && $format eq 'qcow2';
|
||||
|
||||
my $volid = $drive->{file};
|
||||
|
||||
die "disk '$disk' has no associated volume\n" if !$volid;
|
||||
|
Loading…
Reference in New Issue
Block a user