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 7A0EEC0BEF 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 605CD313CC 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 6913F4912B 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:38 +0100 Message-Id: <20240112125639.47941-1-f.ebner@proxmox.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.076 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. [qemuserver.pm, proxmox.com] Subject: [pve-devel] [PATCH qemu-server] config2command: 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 Signed-off-by: Fiona Ebner --- PVE/QemuServer.pm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index bbd19186..303895f9 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -3489,6 +3489,27 @@ my sub print_ovmf_drive_commandlines { return ("if=pflash,unit=0,format=raw,readonly=on,file=$ovmf_code", $var_drive_str); } +# See bug #3726 +my sub check_spice_memory { + my ($memory, $ovmf, $efidisk, $q35) = @_; + + return if !$memory || $memory <= 128; + + if ($ovmf) { + my $efitype = '2m'; + if ($efidisk) { + my $drive = parse_drive('efidisk0', $efidisk); + $efitype = $drive->{efitype} if $drive->{efitype}; + } + + log_warn("limit SPICE memory to 128 MiB or use efitype=4m EFI disk if display init fails") + if $efitype && $efitype eq '2m'; + } else { + log_warn("limit SPICE memory to 128 MiB or use machine type i440fx if display init fails") + if $q35; + } +} + sub config_to_command { my ($storecfg, $vmid, $conf, $defaults, $forcemachine, $forcecpu, $pbs_backing) = @_; @@ -3650,6 +3671,9 @@ sub config_to_command { } } + check_spice_memory($vga->{memory}, ($conf->{bios} // '') eq 'ovmf', $conf->{efidisk0}, $q35) + if $vga->{type} eq 'qxl'; + # enable absolute mouse coordinates (needed by vnc) my $tablet = $conf->{tablet}; if (!defined($tablet)) { -- 2.39.2