[pve-devel] [PATCH] fix Bug #293: CDROM size not reset when set to use no media

Dietmar Maurer dietmar at proxmox.com
Wed Jan 2 06:38:00 CET 2013


applied

> -----Original Message-----
> From: pve-devel-bounces at pve.proxmox.com [mailto:pve-devel-
> bounces at pve.proxmox.com] On Behalf Of Alexandre Derumier
> Sent: Montag, 31. Dezember 2012 10:56
> To: pve-devel at pve.proxmox.com
> Subject: [pve-devel] [PATCH] fix Bug #293: CDROM size not reset when set to
> use no media
> 
> 
> 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
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel





More information about the pve-devel mailing list