Update VM SCSI type based on iothread value when inside the wizard
We keep the same logic as before: once the iothread option is selected, the SCSI controller is switched to virtio-scsi-single, until iothread is unselected again. Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
65175d47b0
commit
b02cc619e6
@ -74,6 +74,15 @@ Ext.define('PVE.qemu.HDInputPanel', {
|
||||
me.hdsizesel.setVisible(true);
|
||||
}
|
||||
}
|
||||
},
|
||||
'field[name=iothread]' : {
|
||||
change: function(f, value) {
|
||||
if (!this.getView().insideWizard) {
|
||||
return;
|
||||
}
|
||||
var vmScsiType = value ? 'virtio-scsi-single': 'virtio-scsi-pci';
|
||||
this.lookupReference('scsiController').setValue(vmScsiType);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -116,10 +125,6 @@ Ext.define('PVE.qemu.HDInputPanel', {
|
||||
|
||||
if (values.iothread) {
|
||||
me.drive.iothread = 'on';
|
||||
// do not silently change a VM-wide option after creating it
|
||||
if (me.insideWizard) {
|
||||
params.scsihw = 'virtio-scsi-single';
|
||||
}
|
||||
} else {
|
||||
delete me.drive.iothread;
|
||||
}
|
||||
@ -130,6 +135,10 @@ Ext.define('PVE.qemu.HDInputPanel', {
|
||||
delete me.drive.cache;
|
||||
}
|
||||
|
||||
if (values.scsihw) {
|
||||
params.scsihw = values.scsihw;
|
||||
}
|
||||
|
||||
params[confid] = PVE.Parser.printQemuDrive(me.drive);
|
||||
|
||||
return params;
|
||||
@ -197,10 +206,14 @@ Ext.define('PVE.qemu.HDInputPanel', {
|
||||
vmconfig: me.insideWizard ? {ide2: 'cdrom'} : {}
|
||||
});
|
||||
me.column1.push(me.bussel);
|
||||
|
||||
me.scsiController = Ext.create('Ext.form.field.Display', {
|
||||
name: 'scsihw',
|
||||
fieldLabel: gettext('SCSI Controller'),
|
||||
reference: 'scsiController',
|
||||
renderer: PVE.Utils.render_scsihw,
|
||||
// do not change a VM wide option after creation
|
||||
submitValue: me.insideWizard,
|
||||
hidden: true
|
||||
});
|
||||
me.column1.push(me.scsiController);
|
||||
|
Loading…
x
Reference in New Issue
Block a user