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:
committed by
Thomas Lamprecht
parent
dc348496d0
commit
9177cc2eda
@ -228,7 +228,7 @@ sub clone_image {
|
|||||||
my $volumepath = "gluster://$server/$glustervolume/images/$vmid/$name";
|
my $volumepath = "gluster://$server/$glustervolume/images/$vmid/$name";
|
||||||
|
|
||||||
my $cmd = ['/usr/bin/qemu-img', 'create', '-b', "../$basevmid/$basename",
|
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");
|
run_command($cmd, errmsg => "unable to create image");
|
||||||
|
|
||||||
|
|||||||
@ -708,7 +708,7 @@ sub clone_image {
|
|||||||
local $CWD = $imagedir;
|
local $CWD = $imagedir;
|
||||||
|
|
||||||
my $cmd = ['/usr/bin/qemu-img', 'create', '-b', "../$basevmid/$basename",
|
my $cmd = ['/usr/bin/qemu-img', 'create', '-b', "../$basevmid/$basename",
|
||||||
'-f', 'qcow2', $path];
|
'-F', $format, '-f', 'qcow2', $path];
|
||||||
|
|
||||||
run_command($cmd);
|
run_command($cmd);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user