blob: 46fd483eb8395ba48183145222b9c190a17d2607 [file] [log] [blame]
bellard7a5ca862008-05-27 21:13:40 +00001@example
2@c man begin SYNOPSIS
3usage: qemu-nbd [OPTION]... @var{filename}
4@c man end
5@end example
6
7@c man begin DESCRIPTION
8
Stefan Weil071c9392012-04-07 09:23:36 +02009Export QEMU disk image using NBD protocol.
bellard7a5ca862008-05-27 21:13:40 +000010
11@c man end
12
13@c man begin OPTIONS
aliguori4a6b8192008-09-22 20:41:57 +000014@table @option
15@item @var{filename}
bellard7a5ca862008-05-27 21:13:40 +000016 is a disk image filename
aliguori4a6b8192008-09-22 20:41:57 +000017@item -p, --port=@var{port}
Hani Benhabiles5672ee52014-05-13 00:35:16 +010018 port to listen on (default @samp{10809})
aliguori4a6b8192008-09-22 20:41:57 +000019@item -o, --offset=@var{offset}
bellard7a5ca862008-05-27 21:13:40 +000020 offset into the image
aliguori4a6b8192008-09-22 20:41:57 +000021@item -b, --bind=@var{iface}
22 interface to bind to (default @samp{0.0.0.0})
23@item -k, --socket=@var{path}
24 Use a unix socket with path @var{path}
Wenchao Xia4323fdc2013-12-04 17:10:59 +080025@item -f, --format=@var{format}
26 Set image format as @var{format}
bellard7a5ca862008-05-27 21:13:40 +000027@item -r, --read-only
28 export read-only
aliguori4a6b8192008-09-22 20:41:57 +000029@item -P, --partition=@var{num}
30 only expose partition @var{num}
ths2f726482008-07-03 11:47:46 +000031@item -s, --snapshot
Wenchao Xia8c116b02013-12-04 17:10:55 +080032 use @var{filename} as an external snapshot, create a temporary
33 file with backing_file=@var{filename}, redirect the write to
34 the temporary one
35@item -l, --load-snapshot=@var{snapshot_param}
36 load an internal snapshot inside @var{filename} and export it
37 as an read-only device, @var{snapshot_param} format is
38 'snapshot.id=[ID],snapshot.name=[NAME]' or '[ID_OR_NAME]'
ths2f726482008-07-03 11:47:46 +000039@item -n, --nocache
Paolo Bonzini0eb256a2013-02-08 13:19:07 +010040@itemx --cache=@var{cache}
41 set cache mode to be used with the file. See the documentation of
42 the emulator's @code{-drive cache=...} option for allowed values.
43@item --aio=@var{aio}
44 choose asynchronous I/O mode between @samp{threads} (the default)
45 and @samp{native} (Linux only).
Paolo Bonzinided9d2d2013-02-08 14:06:13 +010046@item --discard=@var{discard}
47 toggles whether @dfn{discard} (also known as @dfn{trim} or @dfn{unmap})
48 requests are ignored or passed to the filesystem. The default is no
49 (@samp{--discard=ignore}).
Ryota Ozakibba7be92010-03-04 00:18:43 +090050@item -c, --connect=@var{dev}
51 connect @var{filename} to NBD device @var{dev}
thscd831bd2008-07-03 10:23:51 +000052@item -d, --disconnect
53 disconnect the specified device
aliguori4a6b8192008-09-22 20:41:57 +000054@item -e, --shared=@var{num}
55 device can be shared by @var{num} clients (default @samp{1})
Daniel P. Berrangee6b63672013-03-19 11:20:20 +000056@item -f, --format=@var{fmt}
57 force block driver for format @var{fmt} instead of auto-detecting
ths75818252008-07-03 13:41:03 +000058@item -t, --persistent
59 don't exit on the last connection
bellard7a5ca862008-05-27 21:13:40 +000060@item -v, --verbose
61 display extra debugging information
62@item -h, --help
63 display this help and exit
64@item -V, --version
65 output version information and exit
66@end table
67
68@c man end
69
70@ignore
71
72@setfilename qemu-nbd
73@settitle QEMU Disk Network Block Device Server
74
75@c man begin AUTHOR
76Copyright (C) 2006 Anthony Liguori <anthony@codemonkey.ws>.
77This is free software; see the source for copying conditions. There is NO
78warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
79@c man end
80
81@c man begin SEEALSO
82qemu-img(1)
83@c man end
84
85@end ignore