|
From: | Max Reitz |
Subject: | Re: [PATCH] Document qemu-img options data_file and data_file_raw |
Date: | Fri, 26 Mar 2021 10:24:26 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 |
On 01.03.21 18:28, Connor Kuehl wrote:
The contents of this patch were initially developed and posted by Han Han[1], however, it appears the original patch was not applied. Since then, the relevant documentation has been moved and adapted to a new format. I've taken most of the original wording and tweaked it according to some of the feedback from the original patch submission. I've also adapted it to restructured text, which is the format the documentation currently uses. [1] https://lists.nongnu.org/archive/html/qemu-block/2019-10/msg01253.html Reported-by: Han Han <hhan@redhat.com> Co-developed-by: Han Han <hhan@redhat.com> Fixes: https://bugzilla.redhat.com/1763105 Signed-off-by: Connor Kuehl <ckuehl@redhat.com> --- docs/tools/qemu-img.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/tools/qemu-img.rst b/docs/tools/qemu-img.rst index b615aa8419..5cc585dc27 100644 --- a/docs/tools/qemu-img.rst +++ b/docs/tools/qemu-img.rst @@ -866,6 +866,18 @@ Supported image file formats: issue ``lsattr filename`` to check if the NOCOW flag is set or not (Capital 'C' is NOCOW flag).+ ``data_file``+ Pathname that refers to a file that will store all guest data. If + this option is used, the qcow2 file will only contain the image's + metadata.
I think I would like a note here about the fact that when passing this option to qemu-img create, the given data file will be newly created, i.e. if it already contains data, all that data will be lost. And perhaps also note that qemu-img amend on the other hand will only change the reference in the qcow2 file, so the given file should already exist and will not be overwritten.
(“Pathname that refers to a file” sounds like the file may already exist before this operation, which may give people ideas. (Not that the ideas were bad, it’s just that they have to take care. Referencing qemu-img amend should give them a hint on how to do it right.))
Max
+ + ``data_file_raw`` + If this option is set to ``on``, QEMU will always keep the external + data file consistent as a standalone read-only raw image. The default + value is ``off``. + + This option can only be enabled if ``data_file`` is set. + ``Other``QEMU also supports various other image file formats for
[Prev in Thread] | Current Thread | [Next in Thread] |