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 79649C0BEE for ; Fri, 12 Jan 2024 13:56:44 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 585AD31343 for ; Fri, 12 Jan 2024 13:56:44 +0100 (CET) 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 ; Fri, 12 Jan 2024 13:56:43 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 72C0E4912C for ; Fri, 12 Jan 2024 13:56:43 +0100 (CET) From: Fiona Ebner To: pve-devel@lists.proxmox.com Date: Fri, 12 Jan 2024 13:56:39 +0100 Message-Id: <20240112125639.47941-2-f.ebner@proxmox.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240112125639.47941-1-f.ebner@proxmox.com> References: <20240112125639.47941-1-f.ebner@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.075 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 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 - URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox.com] Subject: [pve-devel] [PATCH manager] ui: display edit: add warning when SPICE memory configuration can lead to failing display initialization 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: Fri, 12 Jan 2024 12:56:44 -0000 which happens with either SeaBIOS+q35 or OVMF+efitype=2m as reported in https://bugzilla.proxmox.com/show_bug.cgi?id=3726 Suggested-by: Thomas Lamprecht Signed-off-by: Fiona Ebner --- www/manager6/qemu/DisplayEdit.js | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/www/manager6/qemu/DisplayEdit.js b/www/manager6/qemu/DisplayEdit.js index 9bb1763e..10ef3242 100644 --- a/www/manager6/qemu/DisplayEdit.js +++ b/www/manager6/qemu/DisplayEdit.js @@ -3,6 +3,8 @@ Ext.define('PVE.qemu.DisplayInputPanel', { xtype: 'pveDisplayInputPanel', onlineHelp: 'qm_display', + spiceMemoryHintRelevant: false, + onGetValues: function(values) { let ret = PVE.Parser.printPropertyString(values, 'type'); if (ret === '') { @@ -11,6 +13,16 @@ Ext.define('PVE.qemu.DisplayInputPanel', { return { vga: ret }; }, + updateSpiceMemoryHint: function() { + if (this.spiceMemoryHintRelevant) { + let type = this.down('field[name=type]').getValue(); + let memory = this.down('field[name=memory]').getValue(); + this.down('label[name=spice-memory-hint]').setHidden( + !type?.match(/^qxl\d?$/) || memory <= 128 + ); + } + }, + items: [{ name: 'type', xtype: 'proxmoxKVComboBox', @@ -49,6 +61,8 @@ Ext.define('PVE.qemu.DisplayInputPanel', { memoryfield.setEmptyText(Proxmox.Utils.defaultText); } memoryfield.setDisabled(disableMemoryField); + + this.up('panel').updateSpiceMemoryHint(); }, }, }, @@ -60,6 +74,18 @@ Ext.define('PVE.qemu.DisplayInputPanel', { maxValue: 512, step: 4, name: 'memory', + listeners: { + change: function(cb, val) { + this.up('panel').updateSpiceMemoryHint(); + }, + }, + }, + { + xtype: 'label', + text: gettext("SPICE memory > 128 MiB may not work with current EFI type or machine type"), + userCls: 'pmx-hint', + name: 'spice-memory-hint', + hidden: true, }], }); @@ -83,6 +109,20 @@ Ext.define('PVE.qemu.DisplayEdit', { me.load({ success: function(response) { me.vmconfig = response.result.data; + + // see bug #3726 + if (me.vmconfig.bios === 'ovmf') { + let efitype = '2m'; + if (me.vmconfig.efidisk0) { + let drive = PVE.Parser.parsePropertyString(me.vmconfig.efidisk0, 'file'); + efitype = drive.efitype ? drive.efitype : efitype; + } + me.down('pveDisplayInputPanel').spiceMemoryHintRelevant = efitype === '2m'; + } else { + me.down('pveDisplayInputPanel').spiceMemoryHintRelevant = + me.vmconfig.machine?.match(/q35/); + } + let vga = me.vmconfig.vga || '__default__'; me.setValues(PVE.Parser.parsePropertyString(vga, 'type')); }, -- 2.39.2