5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-02-16 09:57:38 +03:00

improve error on '{full, linked} clone not available' error

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2017-05-23 10:39:45 +02:00 committed by Wolfgang Bumiller
parent df58868200
commit 6318daca96

View File

@ -2448,12 +2448,12 @@ __PACKAGE__->register_method({
$newconf->{$opt} = $value; # simply copy configuration $newconf->{$opt} = $value; # simply copy configuration
} else { } else {
if ($param->{full}) { if ($param->{full}) {
die "Full clone feature is not available" die "Full clone feature is not supported for drive '$opt'\n"
if !PVE::Storage::volume_has_feature($storecfg, 'copy', $drive->{file}, $snapname, $running); if !PVE::Storage::volume_has_feature($storecfg, 'copy', $drive->{file}, $snapname, $running);
$fullclone->{$opt} = 1; $fullclone->{$opt} = 1;
} else { } else {
# not full means clone instead of copy # not full means clone instead of copy
die "Linked clone feature is not available" die "Linked clone feature is not supported for drive '$opt'\n"
if !PVE::Storage::volume_has_feature($storecfg, 'clone', $drive->{file}, $snapname, $running); if !PVE::Storage::volume_has_feature($storecfg, 'clone', $drive->{file}, $snapname, $running);
} }
$drives->{$opt} = $drive; $drives->{$opt} = $drive;