[pve-devel] Qemu-img thin provision
Gilberto Nunes
gilberto.nunes32 at gmail.com
Sat Sep 26 14:34:36 CEST 2015
Sorry... Sometimes I do that....
Thanks
2015-09-26 5:20 GMT-03:00 Dietmar Maurer <dietmar at proxmox.com>:
> Hi Gilberto,
>
> first, please do not send private mail. (use the mailing list instead)
>
> > On September 25, 2015 at 10:26 PM Gilberto Nunes <
> gilberto.nunes32 at gmail.com>
> > wrote:
> >
> >
> > Hi Dietmar
> >
> > Is there any file or script where I can change to deploy such feature?
> > I meant, Proxmox must call some command to create VM file by qemu-img...
> > If you can point me the path, perhaps aI can change it by myself...
> >
>
> for example:
>
> diff --git a/PVE/Storage/Plugin.pm b/PVE/Storage/Plugin.pm
> index 6a1d6b6..bf98342 100644
> --- a/PVE/Storage/Plugin.pm
> +++ b/PVE/Storage/Plugin.pm
> @@ -567,7 +567,8 @@ sub alloc_image {
> } else {
> my $cmd = ['/usr/bin/qemu-img', 'create'];
>
> - push @$cmd, '-o', 'preallocation=metadata' if $fmt eq 'qcow2';
> + push @$cmd, '-o', 'preallocation=metadata'
> + if ($fmt eq 'qcow2') && ($size < 200*1024*1024);
>
> push @$cmd, '-f', $fmt, $path, "${size}K";
>
>
--
Gilberto Ferreira
+55 (47) 9676-7530
Skype: gilberto.nunes36
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.proxmox.com/pipermail/pve-devel/attachments/20150926/695650bf/attachment.htm>
More information about the pve-devel
mailing list