qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH v3] qemu-img: add the simplest format recognitio


From: Kevin Wolf
Subject: Re: [Qemu-block] [PATCH v3] qemu-img: add the simplest format recognition
Date: Mon, 4 Dec 2017 13:06:46 +0100
User-agent: Mutt/1.9.1 (2017-09-22)

Am 02.12.2017 um 00:49 hat Klim Kireev geschrieben:
> Now, if you type something like
> 
> qemu-img create disk.qcow2 1G
> or
> qemu-img dd if=/dev/sda of=disk.qcow2
> 
> it creates a raw image and if you need you should
> manually specify an image format with -f qcow2. It would
> be more convenient if it could be assumed from an extension.
> 
> This patch adds a simple heuristic to recognize the image format
> for qcow, qcow2, vmdk, vhdx, vdi
> 
> It warns users about guessed format and informs them about '-f' option.
> 
> Signed-off-by: Klim Kireev <address@hidden>

This is an incompatible change.

If we want to go there, we must introduce a deprecation warning now
without any other change in behaviour. We need to warn users for two
releases that the behaviour will change in the future, and only then we
can switch over (i.e. in qemu 2.14 the earliest if we introduce the
warning in 2.12).

I'm not sure if we even want to automatically guess the format from the
filename, or if a warning/error would be enough even in the long term.

The behaviour I have in mind is like this:

* qemu-img create x.raw 4G            => works, possibly warning
* qemu-img create -f raw x.raw 4G     => works
* qemu-img create x.qcow2 4G          => error, need -f for non-raw
* qemu-img create -f qcow2 x.qcow2 4G => works
* qemu-img create -f raw x.qcow2 4G   => works, possibly warning

Kevin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]