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 6F3DB6AF1C for ; Mon, 2 Aug 2021 12:15:05 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 6444E25920 for ; Mon, 2 Aug 2021 12:15:05 +0200 (CEST) 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 id D574E25911 for ; Mon, 2 Aug 2021 12:15:04 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 9E06342CD7 for ; Mon, 2 Aug 2021 12:15:04 +0200 (CEST) To: Thomas Lamprecht , Proxmox VE development discussion References: <20210708112535.147775-3-s.reiter@proxmox.com> <20210708114602.346989-1-s.reiter@proxmox.com> <5d5a67ee-6618-b913-446d-dd0dfe83e857@proxmox.com> From: Stefan Reiter Message-ID: <38c42b80-80d1-7504-d52d-4bfcb6e22085@proxmox.com> Date: Mon, 2 Aug 2021 12:15:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <5d5a67ee-6618-b913-446d-dd0dfe83e857@proxmox.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.634 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment NICE_REPLY_A -0.08 Looks like a legit reply (A) SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [PATCH v2 qemu-server 3/3] restore: remove efidisk from config if not backed up 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: Mon, 02 Aug 2021 10:15:05 -0000 On 7/23/21 11:02 AM, Thomas Lamprecht wrote: > On 08.07.21 13:46, Stefan Reiter wrote: >> If it doesn't exist, there's no need to keep it around at all. Such a >> backup might easily be created if an efidisk is configured with BIOS >> set to anything but 'OVMF'. >> >> Unbreaks live-restore for such cases too. >> > > the issue here is that we start the VM without efi disk if SeaBIOS is used, > so it cannot be live-restored, but couldn't we just restore that separately > so that all data the backup saved gets also restored? > No, other way around, the issue occurs if there exists no efidisk image in the backup, but only in the config. We already restore efidisks before live-restore, so SeaBIOS or not doesn't matter, it's at backup time where it makes a problem. >> Signed-off-by: Stefan Reiter >> --- >> >> v1->v2: >> * Actually remove efidisk from config, not just from launched version for >> live-restore - first, this allows one to restart the VM after the live-restore >> is done without errors, and second this way it also applies for normal >> restores (no reason to keep an efidisk configured that doesn't exist). >> After testing both I think I like this approach better, but feel free to keep >> the v1 version too... >> >> PVE/QemuServer.pm | 8 +++++++- >> 1 file changed, 7 insertions(+), 1 deletion(-) >> >> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm >> index 4082e69..9af0ad3 100644 >> --- a/PVE/QemuServer.pm >> +++ b/PVE/QemuServer.pm >> @@ -6044,7 +6044,7 @@ my $restore_allocate_devices = sub { >> }; >> >> sub restore_update_config_line { >> - my ($cookie, $map, $line, $unique) = @_; >> + my ($cookie, $map, $line, $unique, $rpcenv) = @_; >> >> return '' if $line =~ m/^\#qmdump\#/; >> return '' if $line =~ m/^\#vzdump\#/; >> @@ -6088,6 +6088,11 @@ sub restore_update_config_line { >> $di->{file} = $map->{$virtdev}; >> $value = print_drive($di); >> $res .= "$virtdev: $value\n"; >> + } elsif ($line =~ m/^efidisk0/) { >> + # ignore efidisk, this can happen when backing up a SeaBIOS VM with >> + # an efidisk configured >> + $rpcenv->warn("efidisk in config, but not backed up - removing from config") >> + if $rpcenv; >> } else { >> $res .= $line; >> } >> @@ -6428,6 +6433,7 @@ sub restore_proxmox_backup_archive { >> $map, >> $line, >> $options->{unique}, >> + $rpcenv, >> ); >> } >> >> >