From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Stefan Reiter <s.reiter@proxmox.com>
Subject: Re: [pve-devel] [PATCH v2 qemu-server 3/3] restore: remove efidisk from config if not backed up
Date: Fri, 23 Jul 2021 11:02:01 +0200 [thread overview]
Message-ID: <5d5a67ee-6618-b913-446d-dd0dfe83e857@proxmox.com> (raw)
In-Reply-To: <20210708114602.346989-1-s.reiter@proxmox.com>
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?
> Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
> ---
>
> 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,
> );
> }
>
>
next prev parent reply other threads:[~2021-07-23 9:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-08 11:25 [pve-devel] [PATCH qemu-server 1/3] live-restore: fail early if target storage doesn't exist Stefan Reiter
2021-07-08 11:25 ` [pve-devel] [PATCH qemu-server 2/3] cfg2cmd: only warn on non-existant ISO image Stefan Reiter
2021-07-08 11:25 ` [pve-devel] [PATCH qemu-server 3/3] live-restore: ignore missing efidisk Stefan Reiter
2021-07-08 11:46 ` [pve-devel] [PATCH v2 qemu-server 3/3] restore: remove efidisk from config if not backed up Stefan Reiter
2021-07-09 7:11 ` Fabian Ebner
2021-07-09 13:30 ` Thomas Lamprecht
2021-07-23 9:02 ` Thomas Lamprecht [this message]
2021-08-02 10:15 ` Stefan Reiter
2021-07-23 9:06 ` [pve-devel] applied: [PATCH qemu-server 1/3] live-restore: fail early if target storage doesn't exist 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=5d5a67ee-6618-b913-446d-dd0dfe83e857@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
--cc=s.reiter@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox