Signed-off-by: Alexandre Derumier <[email protected]>
---
 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

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

Reply via email to