lib: Add direct support for the NBD (Network Block Device) protocol.

You can now add remote NBD drives using:

 ><fs> add-drive "" format:raw protocol:nbd server:localhost

(Note that you also need to add port:NNNN if the server is running on
a non-standard port).

The corresponding qemu-nbd service can be started by doing:

 qemu-nbd disk.img -t

This commit also adds a test.
This commit is contained in:
Richard W.M. Jones
2013-03-14 23:09:56 +00:00
parent e7e2b56569
commit 694a091d3f
11 changed files with 616 additions and 166 deletions

2
README
View File

@@ -155,6 +155,8 @@ The full requirements are described below.
+--------------+-------------+---+-----------------------------------------+
| static glibc | | O | Used for testing only. |
+--------------+-------------+---+-----------------------------------------+
| qemu-nbd | | O | Used for testing only. |
+--------------+-------------+---+-----------------------------------------+
| findlib | | O | For the OCaml bindings. |
+--------------+-------------+---+-----------------------------------------+
| ocaml-gettext| | O | For localizing OCaml virt-* tools. |