]> git.proxmox.com Git - pve-storage.git/commitdiff
clone image: specify base format option with qemu-img
authorFabian Ebner <f.ebner@proxmox.com>
Thu, 4 Feb 2021 10:26:06 +0000 (11:26 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 3 May 2021 11:07:02 +0000 (13:07 +0200)
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>
PVE/Storage/GlusterfsPlugin.pm
PVE/Storage/Plugin.pm

index 2dd414d895696ce773d818aab4f2faeeb8cc0a2e..5ec2f42e8d802a972fb53807b5ec689b98e0f711 100644 (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");
 
index d7136a1b23b77c3a0d409aeb3433e4789b77f114..4a10a1fef93ceec3e9409a157bd2a9351cf95d53 100644 (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);
     };