From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 2EBBD1FF13F for ; Thu, 29 Jan 2026 10:25:44 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 8654C239A7; Thu, 29 Jan 2026 10:26:07 +0100 (CET) Message-ID: Date: Thu, 29 Jan 2026 10:25:47 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [pve-devel] [PATCH manager 05/10] ui: qemu: make osdefaults architecture aware To: Proxmox VE development discussion , Dominik Csapak References: <20260128123035.2576774-1-d.csapak@proxmox.com> <20260128123035.2576774-6-d.csapak@proxmox.com> Content-Language: en-US From: Fiona Ebner In-Reply-To: <20260128123035.2576774-6-d.csapak@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1769678684560 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.015 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 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: ZXW5K3OE3EVLSNYLLCE2TNSC6Q6R2Q25 X-Message-ID-Hash: ZXW5K3OE3EVLSNYLLCE2TNSC6Q6R2Q25 X-MailFrom: f.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Am 28.01.26 um 1:29 PM schrieb Dominik Csapak: > This enables us to have different default for different architectures, > e.g. using 'ovmf' for 'aarch64' for everything. > > The external interface should be compatible, so there is nothing > to do for current callers. > > Signed-off-by: Dominik Csapak > --- > www/manager6/qemu/OSDefaults.js | 74 ++++++++++++++++++++++++++------- > 1 file changed, 58 insertions(+), 16 deletions(-) > > diff --git a/www/manager6/qemu/OSDefaults.js b/www/manager6/qemu/OSDefaults.js > index bcebd0b3..3a707d60 100644 > --- a/www/manager6/qemu/OSDefaults.js > +++ b/www/manager6/qemu/OSDefaults.js > @@ -24,8 +24,17 @@ Ext.define('PVE.qemu.OSDefaults', { > > let addOS = function (settings) { > if (Object.hasOwn(settings, 'parent')) { > - let child = Ext.clone(me[settings.parent]); > - me[settings.pveOS] = Ext.apply(child, settings); > + let architectures = settings.architectures; > + delete settings.architectures; > + > + let child = { > + x86_64: Ext.apply({}, settings, me[settings.parent].x86_64), > + }; > + > + for (const arch of Object.keys(architectures ?? {})) { > + child[arch] = Ext.apply({}, architectures[arch], me[settings.parent][arch]); > + } > + me[settings.pveOS] = child; > } else { > throw 'Could not find your genitor'; > } ---snip 8<--- > @@ -58,6 +83,17 @@ Ext.define('PVE.qemu.OSDefaults', { > ide: 1, > }, > networkCard: 'virtio', > + > + architectures: { Nit: I'd prefer something like architectureSpecific, what do you think? > + aarch64: { > + busPriority: { > + scsi: 3, > + virtio: 2, > + sata: 1, > + }, > + networkCard: 'virtio', > + }, > + }, > }); > > // recommendation from http://wiki.qemu.org/Windows2000 > @@ -73,12 +109,18 @@ Ext.define('PVE.qemu.OSDefaults', { > parent: 'w2k', > }); > > - me.getDefaults = function (ostype) { > - if (PVE.qemu.OSDefaults[ostype]) { > - return PVE.qemu.OSDefaults[ostype]; > - } else { > - return PVE.qemu.OSDefaults.generic; > + me.getDefaults = function (ostype, arch = 'x86_64') { > + if (!PVE.qemu.OSDefaults[ostype]) { > + ostype = 'generic'; > } > + > + let os = PVE.qemu.OSDefaults[ostype]; > + if (os[arch]) { > + return os[arch]; > + } > + > + // default > + return os.x86_64; > }; > }, > });