live-restore: fail early if target storage doesn't exist

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
This commit is contained in:
Stefan Reiter 2021-07-08 13:25:33 +02:00 committed by Thomas Lamprecht
parent 78a3ada744
commit 55c7f9cf66

View File

@ -6397,13 +6397,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,