public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 2/4] ui: guest import: auto activate virtio preparation for win + ovmf
Date: Tue, 19 Mar 2024 14:00:30 +0100	[thread overview]
Message-ID: <20240319130032.2192847-5-d.csapak@proxmox.com> (raw)
In-Reply-To: <20240319130032.2192847-1-d.csapak@proxmox.com>

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>
---
 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





  parent reply	other threads:[~2024-03-19 13:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-19 13:00 [pve-devel] [PATCH storage/manager] guest import improvements Dominik Csapak
2024-03-19 13:00 ` [pve-devel] [PATCH storage 1/2] esxi: add warning for losing efi state Dominik Csapak
2024-03-19 17:12   ` [pve-devel] applied: " Thomas Lamprecht
2024-03-19 13:00 ` [pve-devel] [PATCH storage 2/2] esxi: only add scsihw if it's defined Dominik Csapak
2024-03-19 17:12   ` [pve-devel] applied: " Thomas Lamprecht
2024-03-19 13:00 ` [pve-devel] [PATCH manager 1/4] ui: guest import: fix isWindows check Dominik Csapak
2024-03-19 13:00 ` Dominik Csapak [this message]
2024-03-19 13:00 ` [pve-devel] [PATCH manager 3/4] ui: guest import: correctly set default scsihw value Dominik Csapak
2024-03-19 13:00 ` [pve-devel] [PATCH manager 4/4] ui: guest import: add warning for losing efi state Dominik Csapak
2024-03-19 17:18 ` [pve-devel] applied: [PATCH storage/manager] guest import improvements Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240319130032.2192847-5-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal