From b37558ca336c73b0851527854120ced8d8d432c8 Mon Sep 17 00:00:00 2001 From: Alexandre Derumier Date: Tue, 14 May 2013 09:24:15 +0200 Subject: [PATCH] clone disk : keep source volume params Signed-off-by: Alexandre Derumier --- PVE/API2/Qemu.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index f7ae89db..9d6fbf63 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -2077,7 +2077,12 @@ __PACKAGE__->register_method({ } my ($size) = PVE::Storage::volume_size_info($storecfg, $newvolid, 3); - my $disk = { file => $newvolid, size => $size }; + my $disk = $drive; + $disk->{full} = undef; + $disk->{format} = undef; + $disk->{file} = $newvolid; + $disk->{size} = $size; + $newconf->{$opt} = PVE::QemuServer::print_drive($vmid, $disk); PVE::QemuServer::update_config_nolock($newid, $newconf, 1);