diff options
author | Alberto Garcia <berto@igalia.com> | 2024-07-30 16:15:52 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2025-03-13 17:57:23 +0100 |
commit | df957115c46845e2c0ccc29ac0a75eb9700a9a0d (patch) | |
tree | 1ed27cf57691214d6ee590fa25c05c711580b113 /pc-bios/s390-ccw | |
parent | 40aa38a651a8d4ca99c70e591176a97abcae5295 (diff) | |
download | qemu-df957115c46845e2c0ccc29ac0a75eb9700a9a0d.zip qemu-df957115c46845e2c0ccc29ac0a75eb9700a9a0d.tar.gz qemu-df957115c46845e2c0ccc29ac0a75eb9700a9a0d.tar.bz2 |
scripts/qcow2-to-stdout.py: Add script to write qcow2 images to stdout
This tool converts a disk image to qcow2, writing the result directly
to stdout. This can be used for example to send the generated file
over the network.
This is equivalent to using qemu-img to convert a file to qcow2 and
then writing the result to stdout, with the difference that this tool
does not need to create this temporary qcow2 file and therefore does
not need any additional disk space.
Implementing this directly in qemu-img is not really an option because
it expects the output file to be seekable and it is also meant to be a
generic tool that supports all combinations of file formats and image
options. Instead, this tool can only produce qcow2 files with the
basic options, without compression, encryption or other features.
The input file is read twice. The first pass is used to determine
which clusters contain non-zero data and that information is used to
create the qcow2 header, refcount table and blocks, and L1 and L2
tables. After all that metadata is created then the second pass is
used to write the guest data.
By default qcow2-to-stdout.py expects the input to be a raw file, but
if qemu-storage-daemon is available then it can also be used to read
images in other formats. Alternatively the user can also run qemu-nbd
or qemu-storage-daemon manually instead.
Signed-off-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Madeeha Javed <javed@igalia.com>
Message-ID: <20240730141552.60404-1-berto@igalia.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'pc-bios/s390-ccw')
0 files changed, 0 insertions, 0 deletions