all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Fabian Ebner <f.ebner@proxmox.com>
To: Thomas Lamprecht <t.lamprecht@proxmox.com>,
	Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH qemu-server] cfg2cmd: turn smm off when SeaBIOS and serial display are used
Date: Fri, 5 Nov 2021 15:47:30 +0100	[thread overview]
Message-ID: <d7dce99e-d7cc-5529-c93c-978923e1fdef@proxmox.com> (raw)
In-Reply-To: <67a3068b-50f7-f0a3-f947-e2723081fa65@proxmox.com>

Am 05.11.21 um 14:12 schrieb Thomas Lamprecht:
> On 05.11.21 14:06, Fabian Ebner wrote:
>> Since commit 277d33454f77ec1d1e0bc04e37621e4dd2424b67 in pve-qemu,
>> smm=off is no longer the default, but with SeaBIOS and serial display,
>> this can lead to a boot loop.
>>
>> Reported in the community forum [0] and reproduced with a Debian 10
>> VM.
>>
>> [0]: https://forum.proxmox.com/threads/pve-7-0-all-vms-with-cloud-init-seabios-fail-during-boot-process-bootloop-disk-not-found.97310/post-427129
>>
>> Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
>> ---
>>   PVE/QemuServer.pm                    | 12 ++++++++++
>>   test/cfg2cmd/seabios_serial.conf     | 16 ++++++++++++++
>>   test/cfg2cmd/seabios_serial.conf.cmd | 33 ++++++++++++++++++++++++++++
>>   3 files changed, 61 insertions(+)
>>   create mode 100644 test/cfg2cmd/seabios_serial.conf
>>   create mode 100644 test/cfg2cmd/seabios_serial.conf.cmd
>>
>> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
>> index 763c412..9b76512 100644
>> --- a/PVE/QemuServer.pm
>> +++ b/PVE/QemuServer.pm
>> @@ -3403,6 +3403,16 @@ my sub get_cpuunits {
>>       my ($conf) = @_;
>>       return $conf->{cpuunits} // (PVE::CGroup::cgroup_mode() == 2 ? 100 : 1024);
>>   }
>> +
>> +# Since commit 277d33454f77ec1d1e0bc04e37621e4dd2424b67 in pve-qemu, smm is not off by default
>> +# anymore. But smm=off seems to be required when using SeaBIOS and serial display.
>> +my sub should_disable_smm {
>> +    my ($conf, $vga) = @_;
>> +
>> +    return (!defined($conf->{bios}) || $conf->{bios} eq 'seabios') &&
>> +	$vga->{type} && $vga->{type} =~ m/^serial\d+$/;
>> +}
>> +
>>   sub config_to_command {
>>       my ($storecfg, $vmid, $conf, $defaults, $forcemachine, $forcecpu,
>>           $pbs_backing) = @_;
>> @@ -4002,6 +4012,8 @@ sub config_to_command {
>>   	push @$machineFlags, 'accel=tcg';
>>       }
>>   
>> +    push @$machineFlags, 'smm=off' if should_disable_smm($conf, $vga);
> 
> doesn't that breaks live migration or do we know that it could never work with smm=on
> under seabios + display=serial, so that there can no running VM that could be live
> migrated?
> 

Stefan tested migration in both direction when the pve-qemu patch was 
dropped [0], but he did sound more confident about the smm=off -> smm=on 
direction. And now the scenario Wolfgang mentioned would actually be 
relevant, because we can get into a situation where smm=off -> smm=on -> 
smm=off by migrating from older -> old -> new. I'll test around some 
more and see if I can break it.

[0]: https://lists.proxmox.com/pipermail/pve-devel/2021-August/049778.html





  reply	other threads:[~2021-11-05 14:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-05 13:06 Fabian Ebner
2021-11-05 13:12 ` Thomas Lamprecht
2021-11-05 14:47   ` Fabian Ebner [this message]
2021-11-08 11:36     ` Fabian Ebner
2021-11-11  9:32 ` [pve-devel] applied: " Thomas Lamprecht

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=d7dce99e-d7cc-5529-c93c-978923e1fdef@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=t.lamprecht@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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal