[pve-devel] [PATCH qemu-server] live-restore: add more logging
Stefan Reiter
s.reiter at proxmox.com
Tue May 18 17:13:44 CEST 2021
To bring it better in line with regular restore, also log the
repository, the snapshot and the target for each drive.
While at it, adjust capitalization of existing log line and clean up
repeated '$1' use.
Signed-off-by: Stefan Reiter <s.reiter at proxmox.com>
---
As requested here:
https://forum.proxmox.com/threads/backup-image-name-in-live-restore-task-log.89363/
PVE/QemuServer.pm | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 638077c..773d060 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -6416,17 +6416,23 @@ sub restore_proxmox_backup_archive {
sub pbs_live_restore {
my ($vmid, $conf, $storecfg, $restored_disks, $repo, $keyfile, $snap) = @_;
- print "Starting VM for live-restore\n";
+ print "starting VM for live-restore\n";
+ print "repository: '$repo'\n";
+ print "snapshot: '$snap'\n";
my $pbs_backing = {};
for my $ds (keys %$restored_disks) {
$ds =~ m/^drive-(.*)$/;
- $pbs_backing->{$1} = {
+ my $confname = $1;
+ $pbs_backing->{$confname} = {
repository => $repo,
snapshot => $snap,
archive => "$ds.img.fidx",
};
- $pbs_backing->{$1}->{keyfile} = $keyfile if -e $keyfile;
+ $pbs_backing->{$confname}->{keyfile} = $keyfile if -e $keyfile;
+
+ my $drive = parse_drive($confname, $conf->{$confname});
+ print "restoring '$ds' to '$drive->{file}'\n";
}
my $drives_streamed = 0;
--
2.20.1
More information about the pve-devel
mailing list