[pve-devel] [PATCH qemu-server 1/3] live-restore: fail early if target storage doesn't exist

Stefan Reiter s.reiter at proxmox.com
Thu Jul 8 13:25:33 CEST 2021


Signed-off-by: Stefan Reiter <s.reiter at proxmox.com>
---
 PVE/QemuServer.pm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index b0fe257..0d8affa 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -6381,13 +6381,13 @@ sub restore_proxmox_backup_archive {
 	    my $d = $virtdev_hash->{$virtdev};
 	    next if $d->{is_cloudinit}; # no need to restore cloudinit
 
+	    # this fails if storage is unavailable
+	    my $volid = $d->{volid};
+	    my $path = PVE::Storage::path($storecfg, $volid);
+
 	    # for live-restore we only want to preload the efidisk
 	    next if $options->{live} && $virtdev ne 'efidisk0';
 
-	    my $volid = $d->{volid};
-
-	    my $path = PVE::Storage::path($storecfg, $volid);
-
 	    my $pbs_restore_cmd = [
 		'/usr/bin/pbs-restore',
 		'--repository', $repo,
-- 
2.30.2






More information about the pve-devel mailing list