[pve-devel] [PATCH] fix Bug #293: CDROM size not reset when set to use no media
Alexandre Derumier
aderumier at odiso.com
Mon Dec 31 10:55:52 CET 2012
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
PVE/API2/Qemu.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index ec0424a..db39c62 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -72,7 +72,8 @@ my $create_disks = sub {
my $volid = $disk->{file};
if (!$volid || $volid eq 'none' || $volid eq 'cdrom') {
- $res->{$ds} = $settings->{$ds};
+ delete $disk->{size};
+ $res->{$ds} = PVE::QemuServer::print_drive($vmid, $disk);
} elsif ($volid =~ m/^(([^:\s]+):)?(\d+(\.\d+)?)$/) {
my ($storeid, $size) = ($2 || $default_storage, $3);
die "no storage ID specified (and no default storage)\n" if !$storeid;
--
1.7.10.4
More information about the pve-devel
mailing list