--- Begin Message ---
Ah, sorry, I just notice than I have rebase the wrong patch serie
version (I had already done some fix for last fiona review)
Fiona wanted a dedicated sub to create backed images like
our $QCOW2_CLUSTERS = {
backed => ['extended_l2=on','cluster_size=128k']
};
=pod
=head3 qemu_img_create_qcow2_backed
qemu_img_create_qcow2_backed($scfg, $path, $backing_path,
$backing_format)
Create a new qemu qcow2 image C<$path> using an existing backing image
C<$backing_path> with backing_format C<$backing_format>.
=cut
sub qemu_img_create_qcow2_backed {
my ($scfg, $path, $backing_path, $backing_format) = @_;
my $cmd = ['/usr/bin/qemu-img', 'create', '-F', $backing_format, '-
b', $backing_path, '-f', 'qcow2', $path];
my $options = $QCOW2_CLUSTERS->{backed};
push @$options, preallocation_cmd_option($scfg, 'qcow2');
push @$cmd, '-o', join(',', @$options) if @$options > 0;
run_command($cmd, errmsg => "unable to create image");
}
--- End Message ---
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel