From: Stefan Hajnoczi <stefanha@redhat.com>
To: <qemu-devel@nongnu.org>
Cc: <qemu-block@nongnu.org>, Kevin Wolf <kwolf@redhat.com>,
mjt@tls.msk.ru, Stefan Hajnoczi <stefanha@redhat.com>
Subject: [PATCH 1/5] docs: expand introduction to disk images
Date: Wed, 1 Feb 2023 16:12:30 -0500 [thread overview]
Message-ID: <20230201211234.301918-2-stefanha@redhat.com> (raw)
In-Reply-To: <20230201211234.301918-1-stefanha@redhat.com>
Explain --blockdev, the graph, protocols, formats, and filters. Also
mention the relationship between --blockdev and --drive, since new users
are likely to hit both syntaxes.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
docs/system/images.rst | 35 ++++++++++++++++++++++++++++++++---
1 file changed, 32 insertions(+), 3 deletions(-)
diff --git a/docs/system/images.rst b/docs/system/images.rst
index d000bd6b6f..dc73acf8c9 100644
--- a/docs/system/images.rst
+++ b/docs/system/images.rst
@@ -3,9 +3,38 @@
Disk Images
-----------
-QEMU supports many disk image formats, including growable disk images
-(their size increase as non empty sectors are written), compressed and
-encrypted disk images.
+QEMU supports many different types of storage protocols, disk image file
+formats, and filter block drivers. *Protocols* provide access to storage such
+as local files or NBD exports. *Formats* implement file formats that are useful
+for sharing disk image files and add functionality like snapshots. *Filters*
+add behavior like I/O throttling.
+
+These features are composable in a graph. Each graph node is called a
+*blockdev*. This makes it possible to construct many different storage
+configurations. The simplest example is accessing a raw image file::
+
+ --blockdev file,filename=test.img,node-name=drive0
+
+A qcow2 image file throttled to 10 MB/s is specified like this::
+
+ --object throttle-group,x-bps-total=10485760,id=tg0 \
+ --blockdev file,filename=vm.qcow2,node-name=file0 \
+ --blockdev qcow2,file=file0,node-name=qcow0 \
+ --blockdev throttle,file=qcow0,throttle-group=tg0,node-name=drive0
+
+Blockdevs are not directly visible to guests. Guests use emulated storage
+controllers like a virtio-blk device to access a blockdev::
+
+ --device virtio-blk-pci,drive=drive0
+
+Note that QEMU has an older ``--drive`` syntax that is somewhat similar to
+``--blockdev``. ``--blockdev`` is preferred because ``--drive`` mixes storage
+controller and blockdev definitions in a single option that cannot express
+everything. When a "drive" or "device" is required by a command-line option or
+QMP command, a blockdev node-name can be used.
+
+The remainder of this chapter covers the block drivers and how to work with
+disk images.
.. _disk_005fimages_005fquickstart:
--
2.39.1
next prev parent reply other threads:[~2023-02-01 21:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-01 21:12 [PATCH 0/5] docs: expand block driver documentation Stefan Hajnoczi
2023-02-01 21:12 ` Stefan Hajnoczi [this message]
2023-02-03 22:52 ` [PATCH 1/5] docs: expand introduction to disk images Eric Blake
2023-02-01 21:12 ` [PATCH 2/5] docs: differentiate between block driver create and runtime opts Stefan Hajnoczi
2023-02-03 22:53 ` Eric Blake
2023-02-01 21:12 ` [PATCH 3/5] docs: flesh out raw format driver description Stefan Hajnoczi
2023-02-02 9:17 ` Daniel P. Berrangé
2023-02-01 21:12 ` [PATCH 4/5] docs: flesh out qcow2 " Stefan Hajnoczi
2023-02-03 22:57 ` Eric Blake
2023-02-01 21:12 ` [PATCH 5/5] docs: add throttle filter description Stefan Hajnoczi
2023-02-03 23:00 ` Eric Blake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230201211234.301918-2-stefanha@redhat.com \
--to=stefanha@redhat.com \
--cc=kwolf@redhat.com \
--cc=mjt@tls.msk.ru \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).