Skip to contentSkip to conversation

qemu-options: try and clarify preferred block semantics

RFC PATCH In review Alex Bennée 4 participants 4 messages Aug 19, 2022 – Aug 22, 2022

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 qemu-options: try and clarify preferred block semantics

Try to correct any confusion about QEMU's Byzantine disk options by laying out the preferred "modern" options as-per:

"<danpb> (best: -device + -blockdev, 2nd obsolete syntax: -device +
-drive, 3rd obsolete syntax: -drive, 4th obsolete syntax: -hdNN)"

Cc Kevin Wolf <[email protected]>
Cc Hanna Reitz <[email protected]>
Cc Daniel P. Berrange <[email protected]>
Cc Thomas Huth <[email protected]>
---
 qemu-options.hx | 13 +++++++++++++
 1 file changed, 13 insertions(+)
qemu-options.hx +13 -0
index 3f23a42fa8..d57239d364 100644
@@ -1105,6 +1105,19 @@ DEFHEADING()
 
 DEFHEADING(Block device options:)
 
+SRST
+The QEMU block device handling options have a long history and
+have gone through several iterations as the feature set and complexity
+of the block layer have grown. Many online guides to QEMU often
+reference older and deprecated options which can lead to confusion.
+
+The recommended modern way to describe disks is to use combination of
+``-device`` to specify the hardware device and ``-blockdev`` to
+describe the backend. The device defines what the guest sees and the
+backend describes how QEMU handles the data.
+
+ERST
+
 DEF("fda", HAS_ARG, QEMU_OPTION_fda,
     "-fda/-fdb file  use 'file' as floppy disk 0/1 image\n", QEMU_ARCH_ALL)
 DEF("fdb", HAS_ARG, QEMU_OPTION_fdb, "", QEMU_ARCH_ALL)
Signature · 1 line
2.30.2
Acked-by on v1 1/1
#1 lore raw

Am 19.08.2022 um 19:47 hat Alex Bennée geschrieben:

Quoted 6 lines

Try to correct any confusion about QEMU's Byzantine disk options by laying out the preferred "modern" options as-per:

"<danpb> (best: -device + -blockdev, 2nd obsolete syntax: -device +
-drive, 3rd obsolete syntax: -drive, 4th obsolete syntax: -hdNN)"

Quoted 6 lines
Cc Kevin Wolf <[email protected]>
Cc Hanna Reitz <[email protected]>
Cc Daniel P. Berrange <[email protected]>
Cc Thomas Huth <[email protected]>
Reviewed-by on v1 1/1
#2 lore raw
In reply to Alex Bennée
Quoted 5 lines · Alex Bennée

Try to correct any confusion about QEMU's Byzantine disk options by laying out the preferred "modern" options as-per:

"<danpb> (best: -device + -blockdev, 2nd obsolete syntax: -device +
-drive, 3rd obsolete syntax: -drive, 4th obsolete syntax: -hdNN)"

Hmm, i guess my numbering of obsolete syntaxes was off-by-1 as I missed a "1st obsolete syntax" :-)

Quoted 10 lines
Cc Kevin Wolf <[email protected]>
Cc Hanna Reitz <[email protected]>
Cc Daniel P. Berrange <[email protected]>
Cc Thomas Huth <[email protected]>
---
 qemu-options.hx | 13 +++++++++++++
 1 file changed, 13 insertions(+)

With regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#3 lore raw
In reply to Alex Bennée
Quoted 22 lines · Alex Bennée

Try to correct any confusion about QEMU's Byzantine disk options by laying out the preferred "modern" options as-per:

"<danpb> (best: -device + -blockdev, 2nd obsolete syntax: -device +
-drive, 3rd obsolete syntax: -drive, 4th obsolete syntax: -hdNN)"

Cc Kevin Wolf <[email protected]>
Cc Hanna Reitz <[email protected]>
Cc Daniel P. Berrange <[email protected]>
Cc Thomas Huth <[email protected]>
---
 qemu-options.hx | 13 +++++++++++++
 1 file changed, 13 insertions(+)
qemu-options.hx +0 -0
index 3f23a42fa8..d57239d364 100644

qemu-options.hx DEFHEADING() · line 1112

Quoted 8 lines
qemu-options.hx +5 -0
@@ -1105,6 +1105,19 @@ DEFHEADING()
 
 DEFHEADING(Block device options:)
 
+SRST
+The QEMU block device handling options have a long history and
+have gone through several iterations as the feature set and complexity
+of the block layer have grown. Many online guides to QEMU often
+reference older and deprecated options which can lead to confusion.

"options, "

qemu-options.hx DEFHEADING() · line 1114

Quoted 2 lines
qemu-options.hx +2 -0
+
+The recommended modern way to describe disks is to use combination of

"a combination"

qemu-options.hx DEFHEADING() · line 1117

Quoted 3 lines
qemu-options.hx +3 -0
+``-device`` to specify the hardware device and ``-blockdev`` to
+describe the backend. The device defines what the guest sees and the
+backend describes how QEMU handles the data.

thanks
-- PMM