From dba198b05e375e522614ec32c016045b5575de67 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Thu, 2 May 2013 07:17:15 +0200 Subject: [PATCH] check has_feature copy for full clone --- PVE/API2/Qemu.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 1eafe79..264dfe1 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -1948,7 +1948,11 @@ __PACKAGE__->register_method({ if (PVE::QemuServer::drive_is_cdrom($drive)) { $newconf->{$opt} = $value; # simply copy configuration } else { - $drive->{full} = 1 if $param->{full} || !PVE::Storage::volume_is_base($storecfg, $drive->{file}); + if ($param->{full} || !PVE::Storage::volume_is_base($storecfg, $drive->{file})) { + die "Full copy feature is not available" + if !PVE::Storage::volume_has_feature($storecfg, 'copy', $drive->{file}, $snapname, $running); + $drive->{full} = 1; + } $drives->{$opt} = $drive; push @$vollist, $drive->{file}; } -- 2.39.2