[pve-devel] [PATCH manager] ui: vm create wizard: default to 2 cores for win 11 os type

Alexander Zeidler a.zeidler at proxmox.com
Tue Sep 12 16:38:48 CEST 2023


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






More information about the pve-devel mailing list