[pve-devel] [PATCH manager v4 7/8] Update VM SCSI controller type after OS selection in Wizard

Emmanuel Kasper e.kasper at proxmox.com
Mon Oct 2 10:37:36 CEST 2017


This was done previously without any kind of user visible feedback, so users
would not know that they had a Virtio SCSI controller as default controller
for Linux VMs.
---
 www/manager6/qemu/CreateWizard.js |  5 -----
 www/manager6/qemu/OSDefaults.js   |  2 +-
 www/manager6/qemu/OSTypeEdit.js   | 10 +---------
 3 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/www/manager6/qemu/CreateWizard.js b/www/manager6/qemu/CreateWizard.js
index 954b8ef0..c508bb7f 100644
--- a/www/manager6/qemu/CreateWizard.js
+++ b/www/manager6/qemu/CreateWizard.js
@@ -1,7 +1,6 @@
 Ext.define('PVE.qemu.CreateWizard', {
     extend: 'PVE.window.Wizard',
     alias: 'widget.pveQemuCreateWizard',
-    qemuScsiController: undefined,
 
     controller: {
 
@@ -167,10 +166,6 @@ Ext.define('PVE.qemu.CreateWizard', {
 			var nodename = kv.nodename;
 			delete kv.nodename;
 
-			if (me.qemuScsiController && !kv.scsihw) {
-			    kv.scsihw = me.qemuScsiController;
-			}
-
 			PVE.Utils.API2Request({
 			    url: '/nodes/' + nodename + '/qemu',
 			    waitMsgTarget: me,
diff --git a/www/manager6/qemu/OSDefaults.js b/www/manager6/qemu/OSDefaults.js
index d47b9d01..d6f733a8 100644
--- a/www/manager6/qemu/OSDefaults.js
+++ b/www/manager6/qemu/OSDefaults.js
@@ -66,7 +66,7 @@ Ext.define('PVE.qemu.OSDefaults', {
 	    pveOS: 'w2k',
 	    parent : 'generic',
 	    networkCard: 'rtl8139',
-	    scsihw: 'lsi'
+	    scsihw: ''
 	});
 	// https://pve.proxmox.com/wiki/Windows_XP_Guest_Notes
 	addOS({
diff --git a/www/manager6/qemu/OSTypeEdit.js b/www/manager6/qemu/OSTypeEdit.js
index 1235ddfd..27b0c40c 100644
--- a/www/manager6/qemu/OSTypeEdit.js
+++ b/www/manager6/qemu/OSTypeEdit.js
@@ -27,7 +27,7 @@ Ext.define('PVE.qemu.OSTypeInputPanel', {
 
 	    me.setWidget('pveBusSelector', targetValues.busType);
 	    me.setWidget('pveNetworkCardSelector', targetValues.networkCard);
-	    me.setWizardHiddenValue('qemuScsiController', targetValues.scsihw);
+	    me.setWidget('field[name=scsihw]', targetValues.scsihw);
 	},
 	setWidget: function(widget, newValue) {
 	    // changing a widget is safe only if ComponentQuery.query returns us
@@ -38,14 +38,6 @@ Ext.define('PVE.qemu.OSTypeInputPanel', {
 	    } else {
 		throw 'non unique widget :' + widget + ' in Wizard';
 	    }
-	},
-	setWizardHiddenValue: function(property, newValue) {
-	    var wizards = Ext.ComponentQuery.query('pveQemuCreateWizard ');
-	    if (wizards.length === 1) {
-		wizards[0][property] = newValue;
-	    } else {
-		throw 'non unique wizard, unable to set ' + property;
-	    }
 	}
     },
 
-- 
2.11.0





More information about the pve-devel mailing list