[pve-devel] [PATCH 1/5] add qemu_img_convert
Dietmar Maurer
dietmar at proxmox.com
Tue Apr 23 06:19:51 CEST 2013
> + my $src_format = qemu_img_format($src_scfg, $src_volname);
> + my $dst_format = qemu_img_format($dst_scfg, $dst_volname);
> +
> + my $src_path = PVE::Storage::path($storecfg, $src_volid, $snapname);
> + my $dst_path = PVE::Storage::path($storecfg, $dst_volid);
> +
> + my $cmd = [];
> + push @$cmd, '/usr/bin/qemu-img', 'convert', '-t', 'writeback', '-p', '-C';
> + push @$cmd, '-s', $snapname if($snapname && $src_format eq
> "qcow2");
> + push @$cmd, '-f', $src_format, '-O', $dst_format, $src_path,
> +$dst_path;
Why is it necessary to specify source and destination format?
More information about the pve-devel
mailing list