Signed-off-by: Dietmar Maurer <[email protected]>
---
 src/PVE/API2/LXC.pm | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
index e59eb10..4c1912c 100644
--- a/src/PVE/API2/LXC.pm
+++ b/src/PVE/API2/LXC.pm
@@ -1263,9 +1263,6 @@ __PACKAGE__->register_method({
 
        my $storage = extract_param($param, 'storage');
 
-       die "Full clone requires a target storage.\n"
-           if $param->{full} && !$storage;
-
         my $localnode = PVE::INotify::nodename();
 
        my $storecfg = PVE::Storage::config();
@@ -1385,7 +1382,8 @@ __PACKAGE__->register_method({
                    my $newvolid;
                    if ($fullclone->{$opt}) {
                        print "create full clone of mountpoint $opt ($volid)\n";
-                       $newvolid = PVE::LXC::copy_volume($mp, $newid, 
$storage, $storecfg, $newconf, $snapname);
+                       my $target_storage = $storage // 
PVE::Storage::parse_volume_id($volid);
+                       $newvolid = PVE::LXC::copy_volume($mp, $newid, 
$target_storage, $storecfg, $newconf, $snapname);
                    } else {
                        print "create linked clone of mount point $opt 
($volid)\n";
                        $newvolid = PVE::Storage::vdisk_clone($storecfg, 
$volid, $newid, $snapname);
-- 
2.11.0

_______________________________________________
pve-devel mailing list
[email protected]
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to