From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 8E9589DF34 for ; Tue, 6 Jun 2023 14:47:50 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 6FF4534CF8 for ; Tue, 6 Jun 2023 14:47:50 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Tue, 6 Jun 2023 14:47:50 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id B10DE48C1A; Tue, 6 Jun 2023 14:47:49 +0200 (CEST) Message-ID: Date: Tue, 6 Jun 2023 14:47:49 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Content-Language: en-US To: Proxmox VE development discussion , Alexandre Derumier References: <20230602100551.2224246-1-aderumier@odiso.com> <20230602100551.2224246-3-aderumier@odiso.com> From: Fiona Ebner In-Reply-To: <20230602100551.2224246-3-aderumier@odiso.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.001 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment NICE_REPLY_A -0.094 Looks like a legit reply (A) SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - Subject: Re: [pve-devel] [PATCH v2 pve-manager 1/1] qemu: processor : set x86-64-v2-AES as default cputype for create wizard X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jun 2023 12:47:50 -0000 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);