summaryrefslogtreecommitdiff
path: root/qemu-doc.texi
diff options
context:
space:
mode:
Diffstat (limited to 'qemu-doc.texi')
-rw-r--r--qemu-doc.texi35
1 files changed, 35 insertions, 0 deletions
diff --git a/qemu-doc.texi b/qemu-doc.texi
index 3e53d887cf..ec02685fc2 100644
--- a/qemu-doc.texi
+++ b/qemu-doc.texi
@@ -1321,6 +1321,7 @@ snapshots.
* qemu_nbd_invocation:: qemu-nbd Invocation
* host_drives:: Using host drives
* disk_images_fat_images:: Virtual FAT disk images
+* disk_images_nbd:: NBD access
@end menu
@node disk_images_quickstart
@@ -1503,6 +1504,40 @@ What you should @emph{never} do:
@item write to the FAT directory on the host system while accessing it with the guest system.
@end itemize
+@node disk_images_nbd
+@subsection NBD access
+
+QEMU can access directly to block device exported using the Network Block Device
+protocol.
+
+@example
+qemu linux.img -hdb nbd:my_nbd_server.mydomain.org:1024
+@end example
+
+If the NBD server is located on the same host, you can use an unix socket instead
+of an inet socket:
+
+@example
+qemu linux.img -hdb nbd:unix:/tmp/my_socket
+@end example
+
+In this case, the block device must be exported using qemu-nbd:
+
+@example
+qemu-nbd --socket=/tmp/my_socket my_disk.qcow2
+@end example
+
+The use of qemu-nbd allows to share a disk between several guests:
+@example
+qemu-nbd --socket=/tmp/my_socket --share=2 my_disk.qcow2
+@end example
+
+and then you can use it with two guests:
+@example
+qemu linux1.img -hdb nbd:unix:/tmp/my_socket
+qemu linux2.img -hdb nbd:unix:/tmp/my_socket
+@end example
+
@node pcsys_network
@section Network emulation