[pve-devel] [PATCH] clone disk : keep source volume params

Alexandre Derumier aderumier at odiso.com
Tue May 14 09:24:15 CEST 2013


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 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 1326368..b3b3a08 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -2065,7 +2065,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);
-- 
1.7.10.4




More information about the pve-devel mailing list