mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-07-09 23:05:31 +00:00
restore: die early when there is no size for a device
Makes it a clean error for buggy (external) backup providers where the size might not be set at all. Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
parent
a5f16bec8e
commit
30681f147e
@ -6816,6 +6816,7 @@ my $restore_allocate_devices = sub {
|
||||
my $map = {};
|
||||
foreach my $virtdev (sort keys %$virtdev_hash) {
|
||||
my $d = $virtdev_hash->{$virtdev};
|
||||
die "got no size for '$virtdev'\n" if !defined($d->{size});
|
||||
my $alloc_size = int(($d->{size} + 1024 - 1)/1024);
|
||||
my $storeid = $d->{storeid};
|
||||
my $scfg = PVE::Storage::storage_config($storecfg, $storeid);
|
||||
|
Loading…
Reference in New Issue
Block a user