mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-02 15:25:36 +00:00
restore: small code cleanup for parse_backup_hints
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
30a1155658
commit
5364990d26
@ -5739,12 +5739,13 @@ my $parse_backup_hints = sub {
|
|||||||
my $drive = parse_drive($virtdev, $2);
|
my $drive = parse_drive($virtdev, $2);
|
||||||
if (drive_is_cloudinit($drive)) {
|
if (drive_is_cloudinit($drive)) {
|
||||||
my ($storeid, $volname) = PVE::Storage::parse_volume_id($drive->{file});
|
my ($storeid, $volname) = PVE::Storage::parse_volume_id($drive->{file});
|
||||||
my $scfg = PVE::Storage::storage_config($storecfg, $options->{storage} // $storeid);
|
$storeid = $options->{storage} if defined ($options->{storage});
|
||||||
|
my $scfg = PVE::Storage::storage_config($storecfg, $storeid);
|
||||||
my $format = qemu_img_format($scfg, $volname); # has 'raw' fallback
|
my $format = qemu_img_format($scfg, $volname); # has 'raw' fallback
|
||||||
|
|
||||||
$virtdev_hash->{$virtdev} = {
|
$virtdev_hash->{$virtdev} = {
|
||||||
format => $format,
|
format => $format,
|
||||||
storeid => $options->{storage} // $storeid,
|
storeid => $storeid,
|
||||||
size => PVE::QemuServer::Cloudinit::CLOUDINIT_DISK_SIZE,
|
size => PVE::QemuServer::Cloudinit::CLOUDINIT_DISK_SIZE,
|
||||||
is_cloudinit => 1,
|
is_cloudinit => 1,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user