[pve-devel] [PATCH manager] Change the SCSI controller type when editing a harddisk only when creating a VM

Emmanuel Kasper e.kasper at proxmox.com
Mon Aug 28 15:06:02 CEST 2017


If not the following could happen:
 * user has a VM with two disks attached to a LSI controller
 * adding a third disk, he notices the iothread option, and clicks it
 * the scsihw type for all disks is changed now to virtio-scsi-single
 * on next cold restart, STOP 0x0000007B INACCESSABLE_BOOT_DEVICE for a Windows VM
---
 www/manager6/qemu/HDEdit.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/www/manager6/qemu/HDEdit.js b/www/manager6/qemu/HDEdit.js
index 6b19b7a5..5c175b5b 100644
--- a/www/manager6/qemu/HDEdit.js
+++ b/www/manager6/qemu/HDEdit.js
@@ -104,7 +104,10 @@ Ext.define('PVE.qemu.HDInputPanel', {
 
 	if (values.iothread && confid.match(/^(virtio|scsi)\d+$/)) {
 	    me.drive.iothread = 'on';
-	    params.scsihw = 'virtio-scsi-single';
+	// do not change a global option except when creating the VM
+	    if (me.insideWizard) {
+		params.scsihw = 'virtio-scsi-single';
+	    }
 	} else {
 	    delete me.drive.iothread;
 	}
-- 
2.11.0




More information about the pve-devel mailing list