From: Stefan Reiter <s.reiter@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH qemu-server 3/3] live-restore: ignore missing efidisk
Date: Thu, 8 Jul 2021 13:25:35 +0200 [thread overview]
Message-ID: <20210708112535.147775-3-s.reiter@proxmox.com> (raw)
In-Reply-To: <20210708112535.147775-1-s.reiter@proxmox.com>
Don't attempt to restore a configured efidisk for SeaBIOS VMs when it is
missing. This can happen, as configured efidisks do not get backed up if
the BIOS setting is not OVMF.
Note that in case of OVMF VMs a missing efidisk is still treated as an
error, as that indicates a broken backup in general.
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
---
PVE/QemuServer.pm | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 4082e69..a86a2a4 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -6471,6 +6471,13 @@ sub restore_proxmox_backup_archive {
my $conf = PVE::QemuConfig->load_config($vmid);
die "cannot do live-restore for template\n" if PVE::QemuConfig->is_template($conf);
+ if ((!$conf->{bios} || $conf->{bios} ne 'ovmf') && !exists($devinfo->{'drive-efidisk0'})) {
+ # VMs with SeaBIOS don't include efidisks in the backup, so ignore
+ # it here for starting
+ delete $conf->{efidisk0};
+ $rpcenv->warn("efidisk0 in config, but not backed up - ignoring for live-restore");
+ }
+
delete $devinfo->{'drive-efidisk0'}; # this special drive is already restored before start
pbs_live_restore($vmid, $conf, $storecfg, $devinfo, $repo, $keyfile, $pbs_backup_name);
--
2.30.2
next prev parent reply other threads:[~2021-07-08 11:25 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 ` Stefan Reiter [this message]
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
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=20210708112535.147775-3-s.reiter@proxmox.com \
--to=s.reiter@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox