From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH qemu-server] config2command: add warning when SPICE memory configuration can lead to failing display initialization
Date: Fri, 12 Jan 2024 13:56:38 +0100 [thread overview]
Message-ID: <20240112125639.47941-1-f.ebner@proxmox.com> (raw)
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 <f.ebner@proxmox.com>
---
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
next reply other threads:[~2024-01-12 12:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-12 12:56 Fiona Ebner [this message]
2024-01-12 12:56 ` [pve-devel] [PATCH manager] ui: display edit: " Fiona Ebner
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=20240112125639.47941-1-f.ebner@proxmox.com \
--to=f.ebner@proxmox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.