From 7b2f6ac8af44a7345a3cc47728f0a58ca05c3775 Mon Sep 17 00:00:00 2001 From: Emmanuel Kasper Date: Thu, 5 Oct 2017 15:46:25 +0200 Subject: [PATCH] Update VM SCSI controller type after OS selection in Wizard 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. Reviewed-by: Thomas Lamprecht --- 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 954b8ef0e..c508bb7fe 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 d47b9d01f..d6f733a83 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 1235ddfdc..27b0c40cd 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; - } } },