[pve-devel] [PATCH storage] clone image: specify base format option with qemu-img

Fabian Ebner f.ebner at proxmox.com
Fri Apr 30 08:38:31 CEST 2021


Ping

Am 04.02.21 um 11:26 schrieb Fabian Ebner:
> and avoid a warning. It is deprecated to auto-detect the format of the base
> volume. See commit d9f059aa6cfccefaffa3532556e966df4a99ece2 in qemu for more
> information.
> 
> Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
> ---
>   PVE/Storage/GlusterfsPlugin.pm | 2 +-
>   PVE/Storage/Plugin.pm          | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/PVE/Storage/GlusterfsPlugin.pm b/PVE/Storage/GlusterfsPlugin.pm
> index 2dd414d..5ec2f42 100644
> --- a/PVE/Storage/GlusterfsPlugin.pm
> +++ b/PVE/Storage/GlusterfsPlugin.pm
> @@ -228,7 +228,7 @@ sub clone_image {
>       my $volumepath = "gluster://$server/$glustervolume/images/$vmid/$name";
>   
>       my $cmd = ['/usr/bin/qemu-img', 'create', '-b', "../$basevmid/$basename",
> -	       '-f', 'qcow2', $volumepath];
> +	       '-F', $format, '-f', 'qcow2', $volumepath];
>   
>       run_command($cmd, errmsg => "unable to create image");
>   
> diff --git a/PVE/Storage/Plugin.pm b/PVE/Storage/Plugin.pm
> index d2d8184..bd8b345 100644
> --- a/PVE/Storage/Plugin.pm
> +++ b/PVE/Storage/Plugin.pm
> @@ -708,7 +708,7 @@ sub clone_image {
>   	local $CWD = $imagedir;
>   
>   	my $cmd = ['/usr/bin/qemu-img', 'create', '-b', "../$basevmid/$basename",
> -		   '-f', 'qcow2', $path];
> +		   '-F', $format, '-f', 'qcow2', $path];
>   
>   	run_command($cmd);
>       };
> 




More information about the pve-devel mailing list