[pve-devel] r6231 - pve-manager/pve2/www/manager/qemu

svn-commits at proxmox.com svn-commits at proxmox.com
Tue Jul 5 08:53:25 CEST 2011


Author: dietmar
Date: 2011-07-05 08:53:25 +0200 (Tue, 05 Jul 2011)
New Revision: 6231

Modified:
   pve-manager/pve2/www/manager/qemu/HardwareView.js
Log:
use device ide2 for cdroms


Modified: pve-manager/pve2/www/manager/qemu/HardwareView.js
===================================================================
--- pve-manager/pve2/www/manager/qemu/HardwareView.js	2011-07-05 06:22:46 UTC (rev 6230)
+++ pve-manager/pve2/www/manager/qemu/HardwareView.js	2011-07-05 06:53:25 UTC (rev 6231)
@@ -125,7 +125,7 @@
 		drive.file = 'none';
 	    }
 	} else {
-	    drive.file = values.storage + ":" + values.hdsize;
+	    drive.file = values.storage + ":" + values.disksize;
 	    drive.format = values.diskformat;
 	
 	    if (values.cache)
@@ -323,11 +323,20 @@
 	    success: function(form, action) {
 		var confid;
 		me.vmconfig = action.result.data;
+
+		if (me.cdrom && !Ext.isDefined(me.vmconfig['ide2'])) {
+
+		    me.down('field[name=controller]').setValue('ide');
+		    me.down('field[name=deviceid]').setValue(2);
+		    return;
+		}
+
 		var controller = 'ide';
 		if (me.vmconfig.ostype === 'l26') {
 		    controller = 'virtio';
 		}
 		me.down('field[name=controller]').setValue(controller);
+
 		var i;
 		for (i = 0; i <= maxIds[controller]; i++) {
 		    confid = '' + controller + i;




More information about the pve-devel mailing list