2008-05-27 23:13:40 +02:00
|
|
|
@example
|
|
|
|
@c man begin SYNOPSIS
|
2016-01-05 08:33:31 +01:00
|
|
|
@command{qemu-nbd} [OPTION]... @var{filename}
|
|
|
|
|
|
|
|
@command{qemu-nbd} @option{-d} @var{dev}
|
2008-05-27 23:13:40 +02:00
|
|
|
@c man end
|
|
|
|
@end example
|
|
|
|
|
|
|
|
@c man begin DESCRIPTION
|
|
|
|
|
2016-01-05 08:33:31 +01:00
|
|
|
Export a QEMU disk image using the NBD protocol.
|
2008-05-27 23:13:40 +02:00
|
|
|
|
|
|
|
@c man end
|
|
|
|
|
|
|
|
@c man begin OPTIONS
|
2016-02-17 11:10:19 +01:00
|
|
|
@var{filename} is a disk image filename, or a set of block
|
|
|
|
driver options if @var{--image-opts} is specified.
|
2016-01-05 08:33:31 +01:00
|
|
|
|
|
|
|
@var{dev} is an NBD device.
|
|
|
|
|
2008-09-22 22:41:57 +02:00
|
|
|
@table @option
|
2016-02-10 19:41:00 +01:00
|
|
|
@item --object type,id=@var{id},...props...
|
|
|
|
Define a new instance of the @var{type} object class identified by @var{id}.
|
|
|
|
See the @code{qemu(1)} manual page for full details of the properties
|
2016-02-10 19:41:13 +01:00
|
|
|
supported. The common object types that it makes sense to define are the
|
2016-02-10 19:41:00 +01:00
|
|
|
@code{secret} object, which is used to supply passwords and/or encryption
|
2016-02-10 19:41:13 +01:00
|
|
|
keys, and the @code{tls-creds} object, which is used to supply TLS
|
|
|
|
credentials for the qemu-nbd server.
|
2008-09-22 22:41:57 +02:00
|
|
|
@item -p, --port=@var{port}
|
2016-01-05 08:33:32 +01:00
|
|
|
The TCP port to listen on (default @samp{10809})
|
2008-09-22 22:41:57 +02:00
|
|
|
@item -o, --offset=@var{offset}
|
2016-01-05 08:33:32 +01:00
|
|
|
The offset into the image
|
2008-09-22 22:41:57 +02:00
|
|
|
@item -b, --bind=@var{iface}
|
2016-01-05 08:33:32 +01:00
|
|
|
The interface to bind to (default @samp{0.0.0.0})
|
2008-09-22 22:41:57 +02:00
|
|
|
@item -k, --socket=@var{path}
|
2016-01-05 08:33:30 +01:00
|
|
|
Use a unix socket with path @var{path}
|
2016-02-17 11:10:19 +01:00
|
|
|
@item --image-opts
|
|
|
|
Treat @var{filename} as a set of image options, instead of a plain
|
|
|
|
filename. If this flag is specified, the @var{-f} flag should
|
|
|
|
not be used, instead the '@code{format=}' option should be set.
|
2016-01-05 08:33:31 +01:00
|
|
|
@item -f, --format=@var{fmt}
|
2016-01-05 08:33:32 +01:00
|
|
|
Force the use of the block driver for format @var{fmt} instead of
|
2016-01-05 08:33:31 +01:00
|
|
|
auto-detecting
|
2008-05-27 23:13:40 +02:00
|
|
|
@item -r, --read-only
|
2016-01-05 08:33:32 +01:00
|
|
|
Export the disk as read-only
|
2008-09-22 22:41:57 +02:00
|
|
|
@item -P, --partition=@var{num}
|
2016-01-05 08:33:32 +01:00
|
|
|
Only expose partition @var{num}
|
2008-07-03 13:47:46 +02:00
|
|
|
@item -s, --snapshot
|
2016-01-05 08:33:32 +01:00
|
|
|
Use @var{filename} as an external snapshot, create a temporary
|
2016-01-05 08:33:30 +01:00
|
|
|
file with backing_file=@var{filename}, redirect the write to
|
|
|
|
the temporary one
|
2013-12-04 10:10:55 +01:00
|
|
|
@item -l, --load-snapshot=@var{snapshot_param}
|
2016-01-05 08:33:32 +01:00
|
|
|
Load an internal snapshot inside @var{filename} and export it
|
2016-01-05 08:33:30 +01:00
|
|
|
as an read-only device, @var{snapshot_param} format is
|
|
|
|
'snapshot.id=[ID],snapshot.name=[NAME]' or '[ID_OR_NAME]'
|
2008-07-03 13:47:46 +02:00
|
|
|
@item -n, --nocache
|
2013-02-08 13:19:07 +01:00
|
|
|
@itemx --cache=@var{cache}
|
2016-01-05 08:33:32 +01:00
|
|
|
The cache mode to be used with the file. See the documentation of
|
2016-01-05 08:33:30 +01:00
|
|
|
the emulator's @code{-drive cache=...} option for allowed values.
|
2013-02-08 13:19:07 +01:00
|
|
|
@item --aio=@var{aio}
|
2016-01-05 08:33:32 +01:00
|
|
|
Set the asynchronous I/O mode between @samp{threads} (the default)
|
2016-01-05 08:33:30 +01:00
|
|
|
and @samp{native} (Linux only).
|
2013-02-08 14:06:13 +01:00
|
|
|
@item --discard=@var{discard}
|
2016-01-05 08:33:32 +01:00
|
|
|
Control whether @dfn{discard} (also known as @dfn{trim} or @dfn{unmap})
|
2016-01-05 08:33:31 +01:00
|
|
|
requests are ignored or passed to the filesystem. @var{discard} is one of
|
|
|
|
@samp{ignore} (or @samp{off}), @samp{unmap} (or @samp{on}). The default is
|
|
|
|
@samp{ignore}.
|
|
|
|
@item --detect-zeroes=@var{detect-zeroes}
|
2016-01-05 08:33:32 +01:00
|
|
|
Control the automatic conversion of plain zero writes by the OS to
|
2016-01-05 08:33:31 +01:00
|
|
|
driver-specific optimized zero write commands. @var{detect-zeroes} is one of
|
|
|
|
@samp{off}, @samp{on} or @samp{unmap}. @samp{unmap}
|
|
|
|
converts a zero write to an unmap operation and can only be used if
|
|
|
|
@var{discard} is set to @samp{unmap}. The default is @samp{off}.
|
2010-03-03 16:18:43 +01:00
|
|
|
@item -c, --connect=@var{dev}
|
2016-01-05 08:33:32 +01:00
|
|
|
Connect @var{filename} to NBD device @var{dev}
|
2008-07-03 12:23:51 +02:00
|
|
|
@item -d, --disconnect
|
2016-01-05 08:33:32 +01:00
|
|
|
Disconnect the device @var{dev}
|
2008-09-22 22:41:57 +02:00
|
|
|
@item -e, --shared=@var{num}
|
2016-01-05 08:33:32 +01:00
|
|
|
Allow up to @var{num} clients to share the device (default @samp{1})
|
2008-07-03 15:41:03 +02:00
|
|
|
@item -t, --persistent
|
2016-01-05 08:33:32 +01:00
|
|
|
Don't exit on the last connection
|
2016-10-14 20:33:03 +02:00
|
|
|
@item -x, --export-name=@var{name}
|
2016-02-10 19:41:08 +01:00
|
|
|
Set the NBD volume export name. This switches the server to use
|
|
|
|
the new style NBD protocol negotiation
|
2016-10-14 20:33:03 +02:00
|
|
|
@item -D, --description=@var{description}
|
|
|
|
Set the NBD volume export description, as a human-readable
|
|
|
|
string. Requires the use of @option{-x}
|
2016-02-10 19:41:13 +01:00
|
|
|
@item --tls-creds=ID
|
|
|
|
Enable mandatory TLS encryption for the server by setting the ID
|
|
|
|
of the TLS credentials object previously created with the --object
|
|
|
|
option.
|
2016-09-28 22:46:42 +02:00
|
|
|
@item --fork
|
|
|
|
Fork off the server process and exit the parent once the server is running.
|
2008-05-27 23:13:40 +02:00
|
|
|
@item -v, --verbose
|
2016-01-05 08:33:32 +01:00
|
|
|
Display extra debugging information
|
2008-05-27 23:13:40 +02:00
|
|
|
@item -h, --help
|
2016-01-05 08:33:32 +01:00
|
|
|
Display this help and exit
|
2008-05-27 23:13:40 +02:00
|
|
|
@item -V, --version
|
2016-01-05 08:33:32 +01:00
|
|
|
Display version information and exit
|
2016-06-17 16:44:12 +02:00
|
|
|
@item -T, --trace [[enable=]@var{pattern}][,events=@var{file}][,file=@var{file}]
|
|
|
|
@findex --trace
|
|
|
|
@include qemu-option-trace.texi
|
2008-05-27 23:13:40 +02:00
|
|
|
@end table
|
|
|
|
|
|
|
|
@c man end
|
|
|
|
|
|
|
|
@ignore
|
|
|
|
|
|
|
|
@setfilename qemu-nbd
|
|
|
|
@settitle QEMU Disk Network Block Device Server
|
|
|
|
|
|
|
|
@c man begin AUTHOR
|
|
|
|
Copyright (C) 2006 Anthony Liguori <anthony@codemonkey.ws>.
|
|
|
|
This is free software; see the source for copying conditions. There is NO
|
|
|
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
@c man end
|
|
|
|
|
|
|
|
@c man begin SEEALSO
|
2016-01-05 08:33:31 +01:00
|
|
|
qemu(1), qemu-img(1)
|
2008-05-27 23:13:40 +02:00
|
|
|
@c man end
|
|
|
|
|
|
|
|
@end ignore
|