bellard | 7a5ca86 | 2008-05-27 21:13:40 +0000 | [diff] [blame] | 1 | @example |
| 2 | @c man begin SYNOPSIS |
Sitsofe Wheeler | 7e8911b | 2016-01-05 07:33:31 +0000 | [diff] [blame] | 3 | @command{qemu-nbd} [OPTION]... @var{filename} |
| 4 | |
| 5 | @command{qemu-nbd} @option{-d} @var{dev} |
bellard | 7a5ca86 | 2008-05-27 21:13:40 +0000 | [diff] [blame] | 6 | @c man end |
| 7 | @end example |
| 8 | |
| 9 | @c man begin DESCRIPTION |
| 10 | |
Sitsofe Wheeler | 7e8911b | 2016-01-05 07:33:31 +0000 | [diff] [blame] | 11 | Export a QEMU disk image using the NBD protocol. |
bellard | 7a5ca86 | 2008-05-27 21:13:40 +0000 | [diff] [blame] | 12 | |
| 13 | @c man end |
| 14 | |
| 15 | @c man begin OPTIONS |
Sitsofe Wheeler | 7e8911b | 2016-01-05 07:33:31 +0000 | [diff] [blame] | 16 | @var{filename} is a disk image filename. |
| 17 | |
| 18 | @var{dev} is an NBD device. |
| 19 | |
aliguori | 4a6b819 | 2008-09-22 20:41:57 +0000 | [diff] [blame] | 20 | @table @option |
aliguori | 4a6b819 | 2008-09-22 20:41:57 +0000 | [diff] [blame] | 21 | @item -p, --port=@var{port} |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame^] | 22 | The TCP port to listen on (default @samp{10809}) |
aliguori | 4a6b819 | 2008-09-22 20:41:57 +0000 | [diff] [blame] | 23 | @item -o, --offset=@var{offset} |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame^] | 24 | The offset into the image |
aliguori | 4a6b819 | 2008-09-22 20:41:57 +0000 | [diff] [blame] | 25 | @item -b, --bind=@var{iface} |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame^] | 26 | The interface to bind to (default @samp{0.0.0.0}) |
aliguori | 4a6b819 | 2008-09-22 20:41:57 +0000 | [diff] [blame] | 27 | @item -k, --socket=@var{path} |
Sitsofe Wheeler | b9dbb61 | 2016-01-05 07:33:30 +0000 | [diff] [blame] | 28 | Use a unix socket with path @var{path} |
Sitsofe Wheeler | 7e8911b | 2016-01-05 07:33:31 +0000 | [diff] [blame] | 29 | @item -f, --format=@var{fmt} |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame^] | 30 | Force the use of the block driver for format @var{fmt} instead of |
Sitsofe Wheeler | 7e8911b | 2016-01-05 07:33:31 +0000 | [diff] [blame] | 31 | auto-detecting |
bellard | 7a5ca86 | 2008-05-27 21:13:40 +0000 | [diff] [blame] | 32 | @item -r, --read-only |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame^] | 33 | Export the disk as read-only |
aliguori | 4a6b819 | 2008-09-22 20:41:57 +0000 | [diff] [blame] | 34 | @item -P, --partition=@var{num} |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame^] | 35 | Only expose partition @var{num} |
ths | 2f72648 | 2008-07-03 11:47:46 +0000 | [diff] [blame] | 36 | @item -s, --snapshot |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame^] | 37 | Use @var{filename} as an external snapshot, create a temporary |
Sitsofe Wheeler | b9dbb61 | 2016-01-05 07:33:30 +0000 | [diff] [blame] | 38 | file with backing_file=@var{filename}, redirect the write to |
| 39 | the temporary one |
Wenchao Xia | 8c116b0 | 2013-12-04 17:10:55 +0800 | [diff] [blame] | 40 | @item -l, --load-snapshot=@var{snapshot_param} |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame^] | 41 | Load an internal snapshot inside @var{filename} and export it |
Sitsofe Wheeler | b9dbb61 | 2016-01-05 07:33:30 +0000 | [diff] [blame] | 42 | as an read-only device, @var{snapshot_param} format is |
| 43 | 'snapshot.id=[ID],snapshot.name=[NAME]' or '[ID_OR_NAME]' |
ths | 2f72648 | 2008-07-03 11:47:46 +0000 | [diff] [blame] | 44 | @item -n, --nocache |
Paolo Bonzini | 0eb256a | 2013-02-08 13:19:07 +0100 | [diff] [blame] | 45 | @itemx --cache=@var{cache} |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame^] | 46 | The cache mode to be used with the file. See the documentation of |
Sitsofe Wheeler | b9dbb61 | 2016-01-05 07:33:30 +0000 | [diff] [blame] | 47 | the emulator's @code{-drive cache=...} option for allowed values. |
Paolo Bonzini | 0eb256a | 2013-02-08 13:19:07 +0100 | [diff] [blame] | 48 | @item --aio=@var{aio} |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame^] | 49 | Set the asynchronous I/O mode between @samp{threads} (the default) |
Sitsofe Wheeler | b9dbb61 | 2016-01-05 07:33:30 +0000 | [diff] [blame] | 50 | and @samp{native} (Linux only). |
Paolo Bonzini | ded9d2d | 2013-02-08 14:06:13 +0100 | [diff] [blame] | 51 | @item --discard=@var{discard} |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame^] | 52 | Control whether @dfn{discard} (also known as @dfn{trim} or @dfn{unmap}) |
Sitsofe Wheeler | 7e8911b | 2016-01-05 07:33:31 +0000 | [diff] [blame] | 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} |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame^] | 57 | Control the automatic conversion of plain zero writes by the OS to |
Sitsofe Wheeler | 7e8911b | 2016-01-05 07:33:31 +0000 | [diff] [blame] | 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}. |
Ryota Ozaki | bba7be9 | 2010-03-04 00:18:43 +0900 | [diff] [blame] | 62 | @item -c, --connect=@var{dev} |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame^] | 63 | Connect @var{filename} to NBD device @var{dev} |
ths | cd831bd | 2008-07-03 10:23:51 +0000 | [diff] [blame] | 64 | @item -d, --disconnect |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame^] | 65 | Disconnect the device @var{dev} |
aliguori | 4a6b819 | 2008-09-22 20:41:57 +0000 | [diff] [blame] | 66 | @item -e, --shared=@var{num} |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame^] | 67 | Allow up to @var{num} clients to share the device (default @samp{1}) |
ths | 7581825 | 2008-07-03 13:41:03 +0000 | [diff] [blame] | 68 | @item -t, --persistent |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame^] | 69 | Don't exit on the last connection |
bellard | 7a5ca86 | 2008-05-27 21:13:40 +0000 | [diff] [blame] | 70 | @item -v, --verbose |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame^] | 71 | Display extra debugging information |
bellard | 7a5ca86 | 2008-05-27 21:13:40 +0000 | [diff] [blame] | 72 | @item -h, --help |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame^] | 73 | Display this help and exit |
bellard | 7a5ca86 | 2008-05-27 21:13:40 +0000 | [diff] [blame] | 74 | @item -V, --version |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame^] | 75 | Display version information and exit |
bellard | 7a5ca86 | 2008-05-27 21:13:40 +0000 | [diff] [blame] | 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 <anthony@codemonkey.ws>. |
| 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 |
Sitsofe Wheeler | 7e8911b | 2016-01-05 07:33:31 +0000 | [diff] [blame] | 92 | qemu(1), qemu-img(1) |
bellard | 7a5ca86 | 2008-05-27 21:13:40 +0000 | [diff] [blame] | 93 | @c man end |
| 94 | |
| 95 | @end ignore |