mirror of
git://git.proxmox.com/git/qemu-server.git
synced 2025-01-08 21:18:03 +03:00
restore: use correct storage for format check for cloudinit drives
when a backup includes a cloudinit disk on a non-existent storage, the restore fails with 'storage' does not exist this happens because we want to get the format of the disk, by checking the source storage we fix this by using the target storage first and only the source as fallback this will still fail if neither storage exists (which is ok, since we cannot restore then anyway) Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
48caa553ab
commit
30a1155658
@ -5739,7 +5739,7 @@ my $parse_backup_hints = sub {
|
||||
my $drive = parse_drive($virtdev, $2);
|
||||
if (drive_is_cloudinit($drive)) {
|
||||
my ($storeid, $volname) = PVE::Storage::parse_volume_id($drive->{file});
|
||||
my $scfg = PVE::Storage::storage_config($storecfg, $storeid);
|
||||
my $scfg = PVE::Storage::storage_config($storecfg, $options->{storage} // $storeid);
|
||||
my $format = qemu_img_format($scfg, $volname); # has 'raw' fallback
|
||||
|
||||
$virtdev_hash->{$virtdev} = {
|
||||
|
Loading…
Reference in New Issue
Block a user