From: Fiona Ebner <f.ebner@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Alexandre Derumier <aderumier@odiso.com>
Subject: Re: [pve-devel] [PATCH v2 pve-manager 1/1] qemu: processor : set x86-64-v2-AES as default cputype for create wizard
Date: Tue, 6 Jun 2023 14:47:49 +0200 [thread overview]
Message-ID: <b7ae66ac-ce50-42b5-57c2-9d9759009f1c@proxmox.com> (raw)
In-Reply-To: <20230602100551.2224246-3-aderumier@odiso.com>
Am 02.06.23 um 12:05 schrieb Alexandre Derumier:
> ---
Missing your Signed-off-by
> 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..58bc76ff 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-AES',
> };
>
> // 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);
You always use the generic one, but if we ever override cputype for a
more specific OSDefaults definition, it'll be wrong.
To avoid that, you can use getDefaults() like
www/manager6/qemu/NetworkEdit.js does:
> let ostype = me.vmconfig.ostype;
> let defaults = PVE.qemu.OSDefaults.getDefaults(ostype);
> let data = {
> model: defaults.networkCard,
> };
>
> ipanel.setNetwork(me.confid, data);
prev parent reply other threads:[~2023-06-06 12:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-02 10:05 [pve-devel] [PATCH-SERIES v4 qemu-server/manager] add and set x86-64-v2-AES as default model for new vms Alexandre Derumier
2023-06-02 10:05 ` [pve-devel] [PATCH v4 qemu-server 1/1] cpuconfig: add new x86-64-vX models Alexandre Derumier
2023-06-06 12:09 ` Fiona Ebner
2023-06-06 13:36 ` DERUMIER, Alexandre
2023-06-07 8:31 ` Fiona Ebner
2023-06-07 10:57 ` DERUMIER, Alexandre
2023-06-07 11:25 ` DERUMIER, Alexandre
2023-06-07 11:48 ` Fiona Ebner
2023-06-07 14:11 ` DERUMIER, Alexandre
2023-06-07 15:29 ` DERUMIER, Alexandre
2023-06-02 10:05 ` [pve-devel] [PATCH v2 pve-manager 1/1] qemu: processor : set x86-64-v2-AES as default cputype for create wizard Alexandre Derumier
2023-06-06 12:47 ` Fiona Ebner [this message]
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=b7ae66ac-ce50-42b5-57c2-9d9759009f1c@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox