1QEMU-NBD.8(8)                                                    QEMU-NBD.8(8)
2
3
4

NAME

6       qemu-nbd - QEMU Disk Network Block Device Server
7

SYNOPSIS

9       qemu-nbd [OPTION]... filename
10
11       qemu-nbd -d dev
12

DESCRIPTION

14       Export a QEMU disk image using the NBD protocol.
15

OPTIONS

17       filename is a disk image filename, or a set of block driver options if
18       --image-opts is specified.
19
20       dev is an NBD device.
21
22       --object type,id=id,...props...
23           Define a new instance of the type object class identified by id.
24           See the qemu(1) manual page for full details of the properties
25           supported. The common object types that it makes sense to define
26           are the "secret" object, which is used to supply passwords and/or
27           encryption keys, and the "tls-creds" object, which is used to
28           supply TLS credentials for the qemu-nbd server.
29
30       -p, --port=port
31           The TCP port to listen on (default 10809)
32
33       -o, --offset=offset
34           The offset into the image
35
36       -b, --bind=iface
37           The interface to bind to (default 0.0.0.0)
38
39       -k, --socket=path
40           Use a unix socket with path path
41
42       --image-opts
43           Treat filename as a set of image options, instead of a plain
44           filename. If this flag is specified, the -f flag should not be
45           used, instead the '"format="' option should be set.
46
47       -f, --format=fmt
48           Force the use of the block driver for format fmt instead of auto-
49           detecting
50
51       -r, --read-only
52           Export the disk as read-only
53
54       -P, --partition=num
55           Only expose partition num
56
57       -s, --snapshot
58           Use filename as an external snapshot, create a temporary file with
59           backing_file=filename, redirect the write to the temporary one
60
61       -l, --load-snapshot=snapshot_param
62           Load an internal snapshot inside filename and export it as an read-
63           only device, snapshot_param format is
64           'snapshot.id=[ID],snapshot.name=[NAME]' or '[ID_OR_NAME]'
65
66       -n, --nocache
67       --cache=cache
68           The cache mode to be used with the file.  See the documentation of
69           the emulator's "-drive cache=..." option for allowed values.
70
71       --aio=aio
72           Set the asynchronous I/O mode between threads (the default) and
73           native (Linux only).
74
75       --discard=discard
76           Control whether discard (also known as trim or unmap) requests are
77           ignored or passed to the filesystem.  discard is one of ignore (or
78           off), unmap (or on).  The default is ignore.
79
80       --detect-zeroes=detect-zeroes
81           Control the automatic conversion of plain zero writes by the OS to
82           driver-specific optimized zero write commands.  detect-zeroes is
83           one of off, on or unmap.  unmap converts a zero write to an unmap
84           operation and can only be used if discard is set to unmap.  The
85           default is off.
86
87       -c, --connect=dev
88           Connect filename to NBD device dev
89
90       -d, --disconnect
91           Disconnect the device dev
92
93       -e, --shared=num
94           Allow up to num clients to share the device (default 1)
95
96       -t, --persistent
97           Don't exit on the last connection
98
99       -x, --export-name=name
100           Set the NBD volume export name. This switches the server to use the
101           new style NBD protocol negotiation
102
103       -D, --description=description
104           Set the NBD volume export description, as a human-readable string.
105           Requires the use of -x
106
107       --tls-creds=ID
108           Enable mandatory TLS encryption for the server by setting the ID of
109           the TLS credentials object previously created with the --object
110           option.
111
112       --fork
113           Fork off the server process and exit the parent once the server is
114           running.
115
116       -v, --verbose
117           Display extra debugging information
118
119       -h, --help
120           Display this help and exit
121
122       -V, --version
123           Display version information and exit
124
125       -T, --trace [[enable=]pattern][,events=file][,file=file]
126           Specify tracing options.
127
128           [enable=]pattern
129               Immediately enable events matching pattern (either event name
130               or a globbing pattern).  This option is only available if QEMU
131               has been compiled with the simple, log or ftrace tracing
132               backend.  To specify multiple events or patterns, specify the
133               -trace option multiple times.
134
135               Use "-trace help" to print a list of names of trace points.
136
137           events=file
138               Immediately enable events listed in file.  The file must
139               contain one event name (as listed in the trace-events-all file)
140               per line; globbing patterns are accepted too.  This option is
141               only available if QEMU has been compiled with the simple, log
142               or ftrace tracing backend.
143
144           file=file
145               Log output traces to file.  This option is only available if
146               QEMU has been compiled with the simple tracing backend.
147

SEE ALSO

149       qemu(1), qemu-img(1)
150

AUTHOR

152       Copyright (C) 2006 Anthony Liguori <anthony@codemonkey.ws>.  This is
153       free software; see the source for copying conditions.  There is NO
154       warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
155       PURPOSE.
156
157
158
159                                  2019-05-14                     QEMU-NBD.8(8)
Impressum