2008-05-27 21:13:40 +00:00
|
|
|
@example
|
|
|
|
@c man begin SYNOPSIS
|
2016-01-05 07:33:31 +00:00
|
|
|
@command{qemu-nbd} [OPTION]... @var{filename}
|
|
|
|
|
|
|
|
@command{qemu-nbd} @option{-d} @var{dev}
|
2008-05-27 21:13:40 +00:00
|
|
|
@c man end
|
|
|
|
@end example
|
|
|
|
|
|
|
|
@c man begin DESCRIPTION
|
|
|
|
|
2016-01-05 07:33:31 +00:00
|
|
|
Export a QEMU disk image using the NBD protocol.
|
2008-05-27 21:13:40 +00:00
|
|
|
|
|
|
|
@c man end
|
|
|
|
|
|
|
|
@c man begin OPTIONS
|
2016-01-05 07:33:31 +00:00
|
|
|
@var{filename} is a disk image filename.
|
|
|
|
|
|
|
|
@var{dev} is an NBD device.
|
|
|
|
|
2008-09-22 20:41:57 +00:00
|
|
|
@table @option
|
|
|
|
@item -p, --port=@var{port}
|
2016-01-05 07:33:32 +00:00
|
|
|
The TCP port to listen on (default @samp{10809})
|
2008-09-22 20:41:57 +00:00
|
|
|
@item -o, --offset=@var{offset}
|
2016-01-05 07:33:32 +00:00
|
|
|
The offset into the image
|
2008-09-22 20:41:57 +00:00
|
|
|
@item -b, --bind=@var{iface}
|
2016-01-05 07:33:32 +00:00
|
|
|
The interface to bind to (default @samp{0.0.0.0})
|
2008-09-22 20:41:57 +00:00
|
|
|
@item -k, --socket=@var{path}
|
2016-01-05 07:33:30 +00:00
|
|
|
Use a unix socket with path @var{path}
|
2016-01-05 07:33:31 +00:00
|
|
|
@item -f, --format=@var{fmt}
|
2016-01-05 07:33:32 +00:00
|
|
|
Force the use of the block driver for format @var{fmt} instead of
|
2016-01-05 07:33:31 +00:00
|
|
|
auto-detecting
|
2008-05-27 21:13:40 +00:00
|
|
|
@item -r, --read-only
|
2016-01-05 07:33:32 +00:00
|
|
|
Export the disk as read-only
|
2008-09-22 20:41:57 +00:00
|
|
|
@item -P, --partition=@var{num}
|
2016-01-05 07:33:32 +00:00
|
|
|
Only expose partition @var{num}
|
2008-07-03 11:47:46 +00:00
|
|
|
@item -s, --snapshot
|
2016-01-05 07:33:32 +00:00
|
|
|
Use @var{filename} as an external snapshot, create a temporary
|
2016-01-05 07:33:30 +00:00
|
|
|
file with backing_file=@var{filename}, redirect the write to
|
|
|
|
the temporary one
|
2013-12-04 09:10:55 +00:00
|
|
|
@item -l, --load-snapshot=@var{snapshot_param}
|
2016-01-05 07:33:32 +00:00
|
|
|
Load an internal snapshot inside @var{filename} and export it
|
2016-01-05 07:33:30 +00:00
|
|
|
as an read-only device, @var{snapshot_param} format is
|
|
|
|
'snapshot.id=[ID],snapshot.name=[NAME]' or '[ID_OR_NAME]'
|
2008-07-03 11:47:46 +00:00
|
|
|
@item -n, --nocache
|
2013-02-08 12:19:07 +00:00
|
|
|
@itemx --cache=@var{cache}
|
2016-01-05 07:33:32 +00:00
|
|
|
The cache mode to be used with the file. See the documentation of
|
2016-01-05 07:33:30 +00:00
|
|
|
the emulator's @code{-drive cache=...} option for allowed values.
|
2013-02-08 12:19:07 +00:00
|
|
|
@item --aio=@var{aio}
|
2016-01-05 07:33:32 +00:00
|
|
|
Set the asynchronous I/O mode between @samp{threads} (the default)
|
2016-01-05 07:33:30 +00:00
|
|
|
and @samp{native} (Linux only).
|
2013-02-08 13:06:13 +00:00
|
|
|
@item --discard=@var{discard}
|
2016-01-05 07:33:32 +00:00
|
|
|
Control whether @dfn{discard} (also known as @dfn{trim} or @dfn{unmap})
|
2016-01-05 07:33:31 +00: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 07:33:32 +00:00
|
|
|
Control the automatic conversion of plain zero writes by the OS to
|
2016-01-05 07:33:31 +00: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 15:18:43 +00:00
|
|
|
@item -c, --connect=@var{dev}
|
2016-01-05 07:33:32 +00:00
|
|
|
Connect @var{filename} to NBD device @var{dev}
|
2008-07-03 10:23:51 +00:00
|
|
|
@item -d, --disconnect
|
2016-01-05 07:33:32 +00:00
|
|
|
Disconnect the device @var{dev}
|
2008-09-22 20:41:57 +00:00
|
|
|
@item -e, --shared=@var{num}
|
2016-01-05 07:33:32 +00:00
|
|
|
Allow up to @var{num} clients to share the device (default @samp{1})
|
2008-07-03 13:41:03 +00:00
|
|
|
@item -t, --persistent
|
2016-01-05 07:33:32 +00:00
|
|
|
Don't exit on the last connection
|
2008-05-27 21:13:40 +00:00
|
|
|
@item -v, --verbose
|
2016-01-05 07:33:32 +00:00
|
|
|
Display extra debugging information
|
2008-05-27 21:13:40 +00:00
|
|
|
@item -h, --help
|
2016-01-05 07:33:32 +00:00
|
|
|
Display this help and exit
|
2008-05-27 21:13:40 +00:00
|
|
|
@item -V, --version
|
2016-01-05 07:33:32 +00:00
|
|
|
Display version information and exit
|
2008-05-27 21:13:40 +00: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 07:33:31 +00:00
|
|
|
qemu(1), qemu-img(1)
|
2008-05-27 21:13:40 +00:00
|
|
|
@c man end
|
|
|
|
|
|
|
|
@end ignore
|