public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Alexander Zeidler <a.zeidler@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager] ui: vm create wizard: default to 2 cores for win 11 os type
Date: Tue, 12 Sep 2023 16:38:48 +0200	[thread overview]
Message-ID: <20230912143848.145161-1-a.zeidler@proxmox.com> (raw)

Windows 11 installer requires 2 cores [0]. Tested with Win11_22H2_English_x64v2.iso from [1].

Windows Server 2022 installer still requires only 1 core [2]. Tested with SERVER_EVAL_x64FRE_en-us.iso from [3].

[0] https://support.microsoft.com/en-us/windows/windows-11-system-requirements-86c11283-ea52-4782-9efd-7674389a7ba3
[1] https://www.microsoft.com/software-download/windows11
[2] https://learn.microsoft.com/en-us/windows-server/get-started/hardware-requirements
[3] https://www.microsoft.com/en-us/evalcenter/download-windows-server-2022

Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
---
 www/manager6/qemu/ProcessorEdit.js | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/www/manager6/qemu/ProcessorEdit.js b/www/manager6/qemu/ProcessorEdit.js
index b845ff66..7651dcd3 100644
--- a/www/manager6/qemu/ProcessorEdit.js
+++ b/www/manager6/qemu/ProcessorEdit.js
@@ -23,12 +23,27 @@ Ext.define('PVE.qemu.ProcessorInputPanel', {
 
     controller: {
 	xclass: 'Ext.app.ViewController',
+	control: {
+            '#': {
+                afterrender: 'setProcessor',
+            },
+        },
 	init: function() {
 	    let me = this;
 	    let viewModel = me.getViewModel();
 
 	    viewModel.set('userIsRoot', Proxmox.UserName === 'root@pam');
 	},
+	setProcessor: function() {
+	    let me = this;
+	    let view = me.getView(), vm = me.getViewModel();
+	    if (view.insideWizard) {
+		let ostype = vm.get('current.ostype');
+		if (ostype === 'win11') {
+		    me.lookup('cores').setValue('2');
+		}
+	    }
+	},
     },
 
     onGetValues: function(values) {
@@ -123,6 +138,7 @@ Ext.define('PVE.qemu.ProcessorInputPanel', {
 	},
 	{
 	    xtype: 'proxmoxintegerfield',
+	    reference: 'cores',
 	    name: 'cores',
 	    minValue: 1,
 	    maxValue: 128,
-- 
2.39.2





             reply	other threads:[~2023-09-12 14:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-12 14:38 Alexander Zeidler [this message]
2023-09-25  9:03 ` Fiona Ebner

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=20230912143848.145161-1-a.zeidler@proxmox.com \
    --to=a.zeidler@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