[pve-devel] r6241 - in qemu-server/pve2: . PVE/API2

svn-commits at proxmox.com svn-commits at proxmox.com
Wed Jul 6 07:49:21 CEST 2011


Author: dietmar
Date: 2011-07-06 07:49:21 +0200 (Wed, 06 Jul 2011)
New Revision: 6241

Modified:
   qemu-server/pve2/ChangeLog
   qemu-server/pve2/PVE/API2/Qemu.pm
Log:
	* PVE/API2/Qemu.pm (update_vm): check to avoid '-$opt' and
	'-delete $opt' at the same time.



Modified: qemu-server/pve2/ChangeLog
===================================================================
--- qemu-server/pve2/ChangeLog	2011-07-06 05:33:28 UTC (rev 6240)
+++ qemu-server/pve2/ChangeLog	2011-07-06 05:49:21 UTC (rev 6241)
@@ -1,3 +1,8 @@
+2011-07-06  Proxmox Support Team  <support at proxmox.com>
+
+	* PVE/API2/Qemu.pm (update_vm): check to avoid '-$opt' and
+	'-delete $opt' at the same time.
+
 2011-06-29  Proxmox Support Team  <support at proxmox.com>
 
 	* PVE/QemuServer.pm (config_to_command): implement -cpu option

Modified: qemu-server/pve2/PVE/API2/Qemu.pm
===================================================================
--- qemu-server/pve2/PVE/API2/Qemu.pm	2011-07-06 05:33:28 UTC (rev 6240)
+++ qemu-server/pve2/PVE/API2/Qemu.pm	2011-07-06 05:49:21 UTC (rev 6241)
@@ -379,6 +379,12 @@
 	    }
 	}
 
+	foreach my $opt (PVE::Tools::split_list($delete)) {
+	    $opt = 'ide2' if $opt eq 'cdrom';
+	    die "you can't use '-$opt' and '-delete $opt' at the same time\n"
+		if defined($param->{$opt});
+	}
+
 	PVE::QemuServer::add_random_macs ($param);
 
 	my $vollist = [];



More information about the pve-devel mailing list