summaryrefslogtreecommitdiffstats
path: root/qemu-nbd.texi
diff options
context:
space:
mode:
authorEric Blake2019-01-26 00:48:37 +0100
committerEric Blake2019-02-04 22:11:27 +0100
commit0ae2d54645eb2888af6dc7f701bc02ca18e4e656 (patch)
treee613f2d7cf9e1031ad8f5087f5ce64a0cd4aa5cb /qemu-nbd.texi
parenttest-filter-mirror: pass UNIX domain socket through fd (diff)
downloadqemu-0ae2d54645eb2888af6dc7f701bc02ca18e4e656.tar.gz
qemu-0ae2d54645eb2888af6dc7f701bc02ca18e4e656.tar.xz
qemu-0ae2d54645eb2888af6dc7f701bc02ca18e4e656.zip
qemu-nbd: Deprecate qemu-nbd --partition
The existing qemu-nbd --partition code claims to handle logical partitions up to 8, since its introduction in 2008 (commit 7a5ca86). However, the implementation is bogus (actual MBR logical partitions form a sort of linked list, with one partition per extended table entry, rather than four logical partitions in a single extended table), making the code unlikely to work for anything beyond -P5 on actual guest images. What's more, the code does not support GPT partitions, which are becoming more popular, and maintaining device subsetting in both NBD and the raw device is unnecessary duplication of effort (even if it is not too difficult). Note that obtaining the offsets of a partition (MBR or GPT) can be learned by using 'qemu-nbd -c /dev/nbd0 file.qcow2 && sfdisk --dump /dev/nbd0', but by the time you've done that, you might as well just mount /dev/nbd0p1 that the kernel creates for you instead of bothering with qemu exporting a subset. Or, keeping to just user-space code, use nbdkit's partition filter, which has already known both GPT and primary MBR partitions for a while, and was just recently enhanced to support arbitrary logical MBR parititions. Start the clock on the deprecation cycle, with examples of how to accomplish device subsetting without using -P. Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <20190125234837.2272-1-eblake@redhat.com> Reviewed-by: Richard W.M. Jones <rjones@redhat.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Diffstat (limited to 'qemu-nbd.texi')
-rw-r--r--qemu-nbd.texi6
1 files changed, 4 insertions, 2 deletions
diff --git a/qemu-nbd.texi b/qemu-nbd.texi
index 386bece468..d0c5182814 100644
--- a/qemu-nbd.texi
+++ b/qemu-nbd.texi
@@ -56,8 +56,10 @@ auto-detecting.
@item -r, --read-only
Export the disk as read-only.
@item -P, --partition=@var{num}
-Only expose MBR partition @var{num}. Understands physical partitions
-1-4 and logical partitions 5-8.
+Deprecated: Only expose MBR partition @var{num}. Understands physical
+partitions 1-4 and logical partition 5. New code should instead use
+@option{--image-opts} with the raw driver wrapping a subset of the
+original image.
@item -B, --bitmap=@var{name}
If @var{filename} has a qcow2 persistent bitmap @var{name}, expose
that bitmap via the ``qemu:dirty-bitmap:@var{name}'' context