mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-03 00:50:51 +00:00
api: clone: mention "snapshot" in the error message if specified
as it may be the only cause of the clone incompatibility Example: # qm clone 101 102 --full --snapname foo Before: > Full clone feature is not supported for 'local-zfs:base-100-disk-2/vm-101-disk-2' (tpmstate0) After: > Full clone feature is not supported for a snapshot of 'local-zfs:base-100-disk-2/vm-101-disk-2' (tpmstate0) Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
This commit is contained in:
parent
a1140f00b9
commit
0250b7f52f
@ -3900,13 +3900,16 @@ __PACKAGE__->register_method({
|
||||
$newconf->{$opt} = $value; # simply copy configuration
|
||||
} else {
|
||||
my $volid = $drive->{file};
|
||||
my $msg = "clone feature is not supported for";
|
||||
$msg .= " a snapshot of" if $snapname;
|
||||
$msg .= " '$volid' ($opt)";
|
||||
if ($full || PVE::QemuServer::drive_is_cloudinit($drive)) {
|
||||
die "Full clone feature is not supported for '$volid' ($opt)\n"
|
||||
die "Full $msg\n"
|
||||
if !PVE::Storage::volume_has_feature($storecfg, 'copy', $volid, $snapname, $running);
|
||||
$fullclone->{$opt} = 1;
|
||||
} else {
|
||||
# not full means clone instead of copy
|
||||
die "Linked clone feature is not supported for '$volid' ($opt)\n"
|
||||
die "Linked $msg\n"
|
||||
if !PVE::Storage::volume_has_feature($storecfg, 'clone', $volid, $snapname, $running);
|
||||
}
|
||||
$drives->{$opt} = $drive;
|
||||
|
Loading…
Reference in New Issue
Block a user