From: Alexandre Derumier <aderumier@odiso.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH v2 pve-manager 1/1] qemu: processor : set x86-64-v2 as default cputype for create wizard
Date: Wed, 17 May 2023 18:14:25 +0200 [thread overview]
Message-ID: <20230517161425.1690282-3-aderumier@odiso.com> (raw)
In-Reply-To: <20230517161425.1690282-1-aderumier@odiso.com>
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
www/manager6/qemu/OSDefaults.js | 1 +
www/manager6/qemu/ProcessorEdit.js | 13 +++++++++++++
2 files changed, 14 insertions(+)
diff --git a/www/manager6/qemu/OSDefaults.js b/www/manager6/qemu/OSDefaults.js
index 5e588a58..fe3ed2c2 100644
--- a/www/manager6/qemu/OSDefaults.js
+++ b/www/manager6/qemu/OSDefaults.js
@@ -43,6 +43,7 @@ Ext.define('PVE.qemu.OSDefaults', {
virtio: 1,
},
scsihw: 'virtio-scsi-single',
+ cputype: 'x86-64-v2',
};
// virtio-net is in kernel since 2.6.25
diff --git a/www/manager6/qemu/ProcessorEdit.js b/www/manager6/qemu/ProcessorEdit.js
index b845ff66..727d1679 100644
--- a/www/manager6/qemu/ProcessorEdit.js
+++ b/www/manager6/qemu/ProcessorEdit.js
@@ -29,6 +29,19 @@ Ext.define('PVE.qemu.ProcessorInputPanel', {
viewModel.set('userIsRoot', Proxmox.UserName === 'root@pam');
},
+ control: {
+ '#': {
+ afterrender: 'setCputype',
+ },
+ },
+ setCputype: function() {
+ let me = this;
+ let view = me.getView();
+ let cputype = view.down('CPUModelSelector[name=cputype]');
+ if (view.insideWizard) {
+ cputype.setValue(PVE.qemu.OSDefaults.generic.cputype);
+ }
+ },
},
onGetValues: function(values) {
--
2.30.2
next prev parent reply other threads:[~2023-05-17 16:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-17 16:14 [pve-devel] [PATCH-SERIES v2 qemu-server/manager] add and set x86-64-v2 as default model for new vms Alexandre Derumier
2023-05-17 16:14 ` [pve-devel] [PATCH v2 qemu-server 1/1] cpuconfig: add new x86-64-vX models Alexandre Derumier
2023-05-17 16:14 ` Alexandre Derumier [this message]
2023-05-22 10:25 [pve-devel] [PATCH-SERIES v3 qemu-server/manager/common] add and set x86-64-v2 as default model for new vms and detect best cpumodel Alexandre Derumier
2023-05-22 10:25 ` [pve-devel] [PATCH v2 pve-manager 1/1] qemu: processor : set x86-64-v2 as default cputype for create wizard Alexandre Derumier
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=20230517161425.1690282-3-aderumier@odiso.com \
--to=aderumier@odiso.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.