From 9177cc2eda87c9a8f85a5ba73fa5f8e45cdd44de Mon Sep 17 00:00:00 2001 From: Fabian Ebner Date: Thu, 4 Feb 2021 11:26:06 +0100 Subject: [PATCH] clone image: specify base format option with qemu-img 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 --- 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 d7136a1..4a10a1f 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); }; -- 2.39.2