]> git.proxmox.com Git - pve-manager.git/commitdiff
ui: guest import: auto activate virtio preparation for win + ovmf
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 19 Mar 2024 13:00:30 +0000 (14:00 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 19 Mar 2024 17:16:00 +0000 (18:16 +0100)
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@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/manager6/window/GuestImport.js

index 81e9074eb9a1996b3f9ea62f8a4130d0ee67a0f3..719bab3169d9bb13c6e726eff1bc4e14dde490c6 100644 (file)
@@ -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);
            },
        });
     },