]>
Commit | Line | Data |
---|---|---|
7a5ca864 FB |
1 | @example |
2 | @c man begin SYNOPSIS | |
7e8911bb SW |
3 | @command{qemu-nbd} [OPTION]... @var{filename} |
4 | ||
5 | @command{qemu-nbd} @option{-d} @var{dev} | |
7a5ca864 FB |
6 | @c man end |
7 | @end example | |
8 | ||
9 | @c man begin DESCRIPTION | |
10 | ||
7e8911bb | 11 | Export a QEMU disk image using the NBD protocol. |
7a5ca864 FB |
12 | |
13 | @c man end | |
14 | ||
15 | @c man begin OPTIONS | |
7e8911bb SW |
16 | @var{filename} is a disk image filename. |
17 | ||
18 | @var{dev} is an NBD device. | |
19 | ||
4a6b819c | 20 | @table @option |
4a6b819c | 21 | @item -p, --port=@var{port} |
b9dbb617 | 22 | port to listen on (default @samp{10809}) |
4a6b819c | 23 | @item -o, --offset=@var{offset} |
b9dbb617 | 24 | offset into the image |
4a6b819c | 25 | @item -b, --bind=@var{iface} |
b9dbb617 | 26 | interface to bind to (default @samp{0.0.0.0}) |
4a6b819c | 27 | @item -k, --socket=@var{path} |
b9dbb617 | 28 | Use a unix socket with path @var{path} |
7e8911bb SW |
29 | @item -f, --format=@var{fmt} |
30 | force the use of the block driver for format @var{fmt} instead of | |
31 | auto-detecting | |
7a5ca864 | 32 | @item -r, --read-only |
b9dbb617 | 33 | export read-only |
4a6b819c | 34 | @item -P, --partition=@var{num} |
b9dbb617 | 35 | only expose partition @var{num} |
2f726488 | 36 | @item -s, --snapshot |
b9dbb617 SW |
37 | use @var{filename} as an external snapshot, create a temporary |
38 | file with backing_file=@var{filename}, redirect the write to | |
39 | the temporary one | |
8c116b0e | 40 | @item -l, --load-snapshot=@var{snapshot_param} |
b9dbb617 SW |
41 | load an internal snapshot inside @var{filename} and export it |
42 | as an read-only device, @var{snapshot_param} format is | |
43 | 'snapshot.id=[ID],snapshot.name=[NAME]' or '[ID_OR_NAME]' | |
2f726488 | 44 | @item -n, --nocache |
0eb256a2 | 45 | @itemx --cache=@var{cache} |
b9dbb617 SW |
46 | set cache mode to be used with the file. See the documentation of |
47 | the emulator's @code{-drive cache=...} option for allowed values. | |
0eb256a2 | 48 | @item --aio=@var{aio} |
b9dbb617 SW |
49 | choose asynchronous I/O mode between @samp{threads} (the default) |
50 | and @samp{native} (Linux only). | |
ded9d2d5 | 51 | @item --discard=@var{discard} |
7e8911bb SW |
52 | controls whether @dfn{discard} (also known as @dfn{trim} or @dfn{unmap}) |
53 | requests are ignored or passed to the filesystem. @var{discard} is one of | |
54 | @samp{ignore} (or @samp{off}), @samp{unmap} (or @samp{on}). The default is | |
55 | @samp{ignore}. | |
56 | @item --detect-zeroes=@var{detect-zeroes} | |
57 | enables the automatic conversion of plain zero writes by the OS to | |
58 | driver-specific optimized zero write commands. @var{detect-zeroes} is one of | |
59 | @samp{off}, @samp{on} or @samp{unmap}. @samp{unmap} | |
60 | converts a zero write to an unmap operation and can only be used if | |
61 | @var{discard} is set to @samp{unmap}. The default is @samp{off}. | |
bba7be96 | 62 | @item -c, --connect=@var{dev} |
b9dbb617 | 63 | connect @var{filename} to NBD device @var{dev} |
cd831bd7 | 64 | @item -d, --disconnect |
b9dbb617 | 65 | disconnect the specified device |
4a6b819c | 66 | @item -e, --shared=@var{num} |
b9dbb617 | 67 | device can be shared by @var{num} clients (default @samp{1}) |
75818250 | 68 | @item -t, --persistent |
b9dbb617 | 69 | don't exit on the last connection |
7a5ca864 | 70 | @item -v, --verbose |
b9dbb617 | 71 | display extra debugging information |
7a5ca864 | 72 | @item -h, --help |
b9dbb617 | 73 | display this help and exit |
7a5ca864 | 74 | @item -V, --version |
b9dbb617 | 75 | output version information and exit |
7a5ca864 FB |
76 | @end table |
77 | ||
78 | @c man end | |
79 | ||
80 | @ignore | |
81 | ||
82 | @setfilename qemu-nbd | |
83 | @settitle QEMU Disk Network Block Device Server | |
84 | ||
85 | @c man begin AUTHOR | |
86 | Copyright (C) 2006 Anthony Liguori <[email protected]>. | |
87 | This is free software; see the source for copying conditions. There is NO | |
88 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
89 | @c man end | |
90 | ||
91 | @c man begin SEEALSO | |
7e8911bb | 92 | qemu(1), qemu-img(1) |
7a5ca864 FB |
93 | @c man end |
94 | ||
95 | @end ignore |