public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stefan Reiter <s.reiter@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 3/3] ui: add 'win11' ostype and set defaults in wizard
Date: Mon, 11 Oct 2021 14:55:20 +0200	[thread overview]
Message-ID: <20211011125520.1124937-4-s.reiter@proxmox.com> (raw)
In-Reply-To: <20211011125520.1124937-1-s.reiter@proxmox.com>

Windows 11 requires a TPM and secure boot, so try to auto-enable both.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
---
 www/manager6/Utils.js           |  1 +
 www/manager6/qemu/SystemEdit.js | 16 ++++++++++++++++
 2 files changed, 17 insertions(+)

diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index ee92cd43..274d4db2 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -43,6 +43,7 @@ Ext.define('PVE.Utils', {
 	    { desc: '2.4 Kernel', val: 'l24' },
 	],
 	'Microsoft Windows': [
+	    { desc: '11/2022', val: 'win11' },
 	    { desc: '10/2016/2019', val: 'win10' },
 	    { desc: '8.x/2012/2012r2', val: 'win8' },
 	    { desc: '7/2008r2', val: 'win7' },
diff --git a/www/manager6/qemu/SystemEdit.js b/www/manager6/qemu/SystemEdit.js
index 8d178f06..f3e3fe9c 100644
--- a/www/manager6/qemu/SystemEdit.js
+++ b/www/manager6/qemu/SystemEdit.js
@@ -56,6 +56,20 @@ Ext.define('PVE.qemu.SystemInputPanel', {
 	    'pveQemuBiosSelector': {
 		change: 'biosChange',
 	    },
+	    '#': {
+		afterrender: 'setMachine',
+	    },
+	},
+
+	setMachine: function() {
+	    let me = this;
+	    let vm = this.getViewModel();
+	    let ostype = vm.get('current.ostype');
+	    if (ostype === 'win11') {
+		me.lookup('machine').setValue('q35');
+		me.lookup('bios').setValue('ovmf');
+		me.lookup('addtpmbox').setValue(true);
+	    }
 	},
     },
 
@@ -71,6 +85,7 @@ Ext.define('PVE.qemu.SystemInputPanel', {
 	{
 	    xtype: 'proxmoxKVComboBox',
 	    name: 'machine',
+	    reference: 'machine',
 	    value: '__default__',
 	    fieldLabel: gettext('Machine'),
 	    comboItems: [
@@ -81,6 +96,7 @@ Ext.define('PVE.qemu.SystemInputPanel', {
 	{
 	    xtype: 'pveQemuBiosSelector',
 	    name: 'bios',
+	    reference: 'bios',
 	    value: '__default__',
 	    fieldLabel: 'BIOS',
 	},
-- 
2.30.2





  parent reply	other threads:[~2021-10-11 12:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-11 12:55 [pve-devel] [PATCH 0/3] Windows 11 OS type and UI improvements Stefan Reiter
2021-10-11 12:55 ` [pve-devel] [PATCH qemu-server 1/3] ostype: support Windows 11/Server 2022 Stefan Reiter
2021-10-18  7:54   ` [pve-devel] applied: " Thomas Lamprecht
2021-10-18  8:00   ` Thomas Lamprecht
2021-10-11 12:55 ` [pve-devel] [PATCH manager 2/3] ui: SystemEdit: promote advanced settings to normal Stefan Reiter
2021-10-21 11:51   ` [pve-devel] applied: " Thomas Lamprecht
2021-11-03 13:02     ` Dominik Csapak
2021-11-03 13:26       ` Thomas Lamprecht
2021-10-11 12:55 ` Stefan Reiter [this message]
2021-10-18  5:57   ` [pve-devel] [PATCH manager 3/3] ui: add 'win11' ostype and set defaults in wizard DERUMIER, Alexandre
2021-10-18  7:10     ` Thomas Lamprecht
2021-10-19  9:19       ` DERUMIER, Alexandre
2021-10-21 11:52   ` [pve-devel] applied: " Thomas Lamprecht
2021-10-12 13:51 ` [pve-devel] [PATCH 0/3] Windows 11 OS type and UI improvements Aaron Lauterer
2021-10-12 15:24   ` 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=20211011125520.1124937-4-s.reiter@proxmox.com \
    --to=s.reiter@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