[pve-devel] [RFC qemu-server v2 21/25] backup: implement restore for external providers

Fiona Ebner f.ebner at proxmox.com
Thu Sep 12 15:32:19 CEST 2024


Am 12.09.24 um 14:44 schrieb Fabian Grünbichler:
> On August 13, 2024 3:28 pm, Fiona Ebner wrote:
>> +
>> +	# allocate volumes
>> +	my $map = $restore_allocate_devices->($storecfg, $virtdev_hash, $vmid);
>> +
>> +	for my $virtdev (sort keys $virtdev_hash->%*) {
>> +	    my $d = $virtdev_hash->{$virtdev};
>> +	    next if $d->{is_cloudinit}; # no need to restore cloudinit
>> +
>> +	    my $info =
>> +		$backup_provider->restore_vm_volume_init($volname, $storeid, $d->{devname}, {});
>> +	    my $source_path = $info->{'qemu-img-path'}
>> +		or die "did not get source image path from backup provider\n";
>> +	    eval {
>> +		qemu_img_convert(
>> +		    $source_path, $d->{volid}, $d->{size}, undef, 0, $options->{bwlimit});
>> +	    };
> 
> this definitely needs to get a call to file_size_info with import
> hardening patches applied ;)
> 

Sure, added a reminder to myself for now :)




More information about the pve-devel mailing list