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 |
Daniel P. Berrange | 77c9aae | 2016-02-17 10:10:19 +0000 | [diff] [blame] | 16 | @var{filename} is a disk image filename, or a set of block |
| 17 | driver options if @var{--image-opts} is specified. |
Sitsofe Wheeler | 7e8911b | 2016-01-05 07:33:31 +0000 | [diff] [blame] | 18 | |
| 19 | @var{dev} is an NBD device. |
| 20 | |
aliguori | 4a6b819 | 2008-09-22 20:41:57 +0000 | [diff] [blame] | 21 | @table @option |
Daniel P. Berrange | 0ab3b33 | 2016-02-10 18:41:00 +0000 | [diff] [blame] | 22 | @item --object type,id=@var{id},...props... |
| 23 | Define a new instance of the @var{type} object class identified by @var{id}. |
| 24 | See the @code{qemu(1)} manual page for full details of the properties |
Daniel P. Berrange | 145614a | 2016-02-10 18:41:13 +0000 | [diff] [blame] | 25 | supported. The common object types that it makes sense to define are the |
Daniel P. Berrange | 0ab3b33 | 2016-02-10 18:41:00 +0000 | [diff] [blame] | 26 | @code{secret} object, which is used to supply passwords and/or encryption |
Daniel P. Berrange | 145614a | 2016-02-10 18:41:13 +0000 | [diff] [blame] | 27 | keys, and the @code{tls-creds} object, which is used to supply TLS |
| 28 | credentials for the qemu-nbd server. |
aliguori | 4a6b819 | 2008-09-22 20:41:57 +0000 | [diff] [blame] | 29 | @item -p, --port=@var{port} |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame] | 30 | The TCP port to listen on (default @samp{10809}) |
aliguori | 4a6b819 | 2008-09-22 20:41:57 +0000 | [diff] [blame] | 31 | @item -o, --offset=@var{offset} |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame] | 32 | The offset into the image |
aliguori | 4a6b819 | 2008-09-22 20:41:57 +0000 | [diff] [blame] | 33 | @item -b, --bind=@var{iface} |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame] | 34 | The interface to bind to (default @samp{0.0.0.0}) |
aliguori | 4a6b819 | 2008-09-22 20:41:57 +0000 | [diff] [blame] | 35 | @item -k, --socket=@var{path} |
Sitsofe Wheeler | b9dbb61 | 2016-01-05 07:33:30 +0000 | [diff] [blame] | 36 | Use a unix socket with path @var{path} |
Daniel P. Berrange | 77c9aae | 2016-02-17 10:10:19 +0000 | [diff] [blame] | 37 | @item --image-opts |
| 38 | Treat @var{filename} as a set of image options, instead of a plain |
| 39 | filename. If this flag is specified, the @var{-f} flag should |
| 40 | not be used, instead the '@code{format=}' option should be set. |
Sitsofe Wheeler | 7e8911b | 2016-01-05 07:33:31 +0000 | [diff] [blame] | 41 | @item -f, --format=@var{fmt} |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame] | 42 | 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] | 43 | auto-detecting |
bellard | 7a5ca86 | 2008-05-27 21:13:40 +0000 | [diff] [blame] | 44 | @item -r, --read-only |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame] | 45 | Export the disk as read-only |
aliguori | 4a6b819 | 2008-09-22 20:41:57 +0000 | [diff] [blame] | 46 | @item -P, --partition=@var{num} |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame] | 47 | Only expose partition @var{num} |
ths | 2f72648 | 2008-07-03 11:47:46 +0000 | [diff] [blame] | 48 | @item -s, --snapshot |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame] | 49 | Use @var{filename} as an external snapshot, create a temporary |
Sitsofe Wheeler | b9dbb61 | 2016-01-05 07:33:30 +0000 | [diff] [blame] | 50 | file with backing_file=@var{filename}, redirect the write to |
| 51 | the temporary one |
Wenchao Xia | 8c116b0 | 2013-12-04 17:10:55 +0800 | [diff] [blame] | 52 | @item -l, --load-snapshot=@var{snapshot_param} |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame] | 53 | Load an internal snapshot inside @var{filename} and export it |
Sitsofe Wheeler | b9dbb61 | 2016-01-05 07:33:30 +0000 | [diff] [blame] | 54 | as an read-only device, @var{snapshot_param} format is |
| 55 | 'snapshot.id=[ID],snapshot.name=[NAME]' or '[ID_OR_NAME]' |
ths | 2f72648 | 2008-07-03 11:47:46 +0000 | [diff] [blame] | 56 | @item -n, --nocache |
Paolo Bonzini | 0eb256a | 2013-02-08 13:19:07 +0100 | [diff] [blame] | 57 | @itemx --cache=@var{cache} |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame] | 58 | 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] | 59 | the emulator's @code{-drive cache=...} option for allowed values. |
Paolo Bonzini | 0eb256a | 2013-02-08 13:19:07 +0100 | [diff] [blame] | 60 | @item --aio=@var{aio} |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame] | 61 | Set the asynchronous I/O mode between @samp{threads} (the default) |
Sitsofe Wheeler | b9dbb61 | 2016-01-05 07:33:30 +0000 | [diff] [blame] | 62 | and @samp{native} (Linux only). |
Paolo Bonzini | ded9d2d | 2013-02-08 14:06:13 +0100 | [diff] [blame] | 63 | @item --discard=@var{discard} |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame] | 64 | Control whether @dfn{discard} (also known as @dfn{trim} or @dfn{unmap}) |
Sitsofe Wheeler | 7e8911b | 2016-01-05 07:33:31 +0000 | [diff] [blame] | 65 | requests are ignored or passed to the filesystem. @var{discard} is one of |
| 66 | @samp{ignore} (or @samp{off}), @samp{unmap} (or @samp{on}). The default is |
| 67 | @samp{ignore}. |
| 68 | @item --detect-zeroes=@var{detect-zeroes} |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame] | 69 | Control the automatic conversion of plain zero writes by the OS to |
Sitsofe Wheeler | 7e8911b | 2016-01-05 07:33:31 +0000 | [diff] [blame] | 70 | driver-specific optimized zero write commands. @var{detect-zeroes} is one of |
| 71 | @samp{off}, @samp{on} or @samp{unmap}. @samp{unmap} |
| 72 | converts a zero write to an unmap operation and can only be used if |
| 73 | @var{discard} is set to @samp{unmap}. The default is @samp{off}. |
Ryota Ozaki | bba7be9 | 2010-03-04 00:18:43 +0900 | [diff] [blame] | 74 | @item -c, --connect=@var{dev} |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame] | 75 | Connect @var{filename} to NBD device @var{dev} |
ths | cd831bd | 2008-07-03 10:23:51 +0000 | [diff] [blame] | 76 | @item -d, --disconnect |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame] | 77 | Disconnect the device @var{dev} |
aliguori | 4a6b819 | 2008-09-22 20:41:57 +0000 | [diff] [blame] | 78 | @item -e, --shared=@var{num} |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame] | 79 | Allow up to @var{num} clients to share the device (default @samp{1}) |
ths | 7581825 | 2008-07-03 13:41:03 +0000 | [diff] [blame] | 80 | @item -t, --persistent |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame] | 81 | Don't exit on the last connection |
Eric Blake | b1a75b3 | 2016-10-14 13:33:03 -0500 | [diff] [blame] | 82 | @item -x, --export-name=@var{name} |
Daniel P. Berrange | 3d4b2f9 | 2016-02-10 18:41:08 +0000 | [diff] [blame] | 83 | Set the NBD volume export name. This switches the server to use |
| 84 | the new style NBD protocol negotiation |
Eric Blake | b1a75b3 | 2016-10-14 13:33:03 -0500 | [diff] [blame] | 85 | @item -D, --description=@var{description} |
| 86 | Set the NBD volume export description, as a human-readable |
| 87 | string. Requires the use of @option{-x} |
Daniel P. Berrange | 145614a | 2016-02-10 18:41:13 +0000 | [diff] [blame] | 88 | @item --tls-creds=ID |
| 89 | Enable mandatory TLS encryption for the server by setting the ID |
| 90 | of the TLS credentials object previously created with the --object |
| 91 | option. |
Max Reitz | ffb31e1 | 2016-09-28 22:46:42 +0200 | [diff] [blame] | 92 | @item --fork |
| 93 | Fork off the server process and exit the parent once the server is running. |
bellard | 7a5ca86 | 2008-05-27 21:13:40 +0000 | [diff] [blame] | 94 | @item -v, --verbose |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame] | 95 | Display extra debugging information |
bellard | 7a5ca86 | 2008-05-27 21:13:40 +0000 | [diff] [blame] | 96 | @item -h, --help |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame] | 97 | Display this help and exit |
bellard | 7a5ca86 | 2008-05-27 21:13:40 +0000 | [diff] [blame] | 98 | @item -V, --version |
Sitsofe Wheeler | 5090121 | 2016-01-05 07:33:32 +0000 | [diff] [blame] | 99 | Display version information and exit |
Denis V. Lunev | 39ca463 | 2016-06-17 17:44:12 +0300 | [diff] [blame] | 100 | @item -T, --trace [[enable=]@var{pattern}][,events=@var{file}][,file=@var{file}] |
| 101 | @findex --trace |
| 102 | @include qemu-option-trace.texi |
bellard | 7a5ca86 | 2008-05-27 21:13:40 +0000 | [diff] [blame] | 103 | @end table |
| 104 | |
| 105 | @c man end |
| 106 | |
| 107 | @ignore |
| 108 | |
| 109 | @setfilename qemu-nbd |
| 110 | @settitle QEMU Disk Network Block Device Server |
| 111 | |
| 112 | @c man begin AUTHOR |
| 113 | Copyright (C) 2006 Anthony Liguori <anthony@codemonkey.ws>. |
| 114 | This is free software; see the source for copying conditions. There is NO |
| 115 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 116 | @c man end |
| 117 | |
| 118 | @c man begin SEEALSO |
Sitsofe Wheeler | 7e8911b | 2016-01-05 07:33:31 +0000 | [diff] [blame] | 119 | qemu(1), qemu-img(1) |
bellard | 7a5ca86 | 2008-05-27 21:13:40 +0000 | [diff] [blame] | 120 | @c man end |
| 121 | |
| 122 | @end ignore |