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 <f.ebner@proxmox.com>
This commit is contained in:
Fabian Ebner
2021-02-04 11:26:06 +01:00
committed by Thomas Lamprecht
parent dc348496d0
commit 9177cc2eda
2 changed files with 2 additions and 2 deletions

View File

@ -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");

View File

@ -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);
};