[pve-devel] [PATCH manager 2/4] ui: guest import: auto activate virtio preparation for win + ovmf

Dominik Csapak d.csapak at proxmox.com
Tue Mar 19 14:00:30 CET 2024


it seems on esxi, most windows vms with uefi are automatically
configured with an lsi scsi controller, which we can't currently support
(ovmf driver issue) so automatically activate the sata mapping + virtio
preparation in this case

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/window/GuestImport.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/www/manager6/window/GuestImport.js b/www/manager6/window/GuestImport.js
index 81e9074e..719bab31 100644
--- a/www/manager6/window/GuestImport.js
+++ b/www/manager6/window/GuestImport.js
@@ -644,7 +644,8 @@ Ext.define('PVE.window.GuestImport', {
 			    fieldLabel: gettext('Prepare for VirtIO-SCSI'),
 			    labelWidth: 200,
 			    reference: 'mapSata',
-			    isFormField: false,
+			    name: 'mapSata',
+			    submitValue: false,
 			    disabled: true,
 			    bind: {
 				disabled: '{!isWindows}',
@@ -934,11 +935,15 @@ Ext.define('PVE.window.GuestImport', {
 		me.getViewModel().set('warnings', data.warnings.map(w => renderWarning(w)));
 
 		let osinfo = PVE.Utils.get_kvm_osinfo(me.vmConfig.ostype ?? '');
+		let mapSata = (me.vmConfig.ostype ?? '').startsWith('w') && (me.vmConfig.bios ?? '').indexOf('ovmf') !== -1;
 
 		me.setValues({
 		    osbase: osinfo.base,
 		    ...me.vmConfig,
 		});
+
+
+		me.lookup('mapSata').setValue(mapSata);
 	    },
 	});
     },
-- 
2.39.2





More information about the pve-devel mailing list