target-i386: Rewrite leave
[qemu.git] / qemu-nbd.texi
blob0027841ecbf2629d2d6e9d818df6fcd35aa115e6
1 @example
2 @c man begin SYNOPSIS
3 @command{qemu-nbd} [OPTION]... @var{filename}
5 @command{qemu-nbd} @option{-d} @var{dev}
6 @c man end
7 @end example
9 @c man begin DESCRIPTION
11 Export a QEMU disk image using the NBD protocol.
13 @c man end
15 @c man begin OPTIONS
16 @var{filename} is a disk image filename.
18 @var{dev} is an NBD device.
20 @table @option
21 @item -p, --port=@var{port}
22 The TCP port to listen on (default @samp{10809})
23 @item -o, --offset=@var{offset}
24 The offset into the image
25 @item -b, --bind=@var{iface}
26 The interface to bind to (default @samp{0.0.0.0})
27 @item -k, --socket=@var{path}
28 Use a unix socket with path @var{path}
29 @item -f, --format=@var{fmt}
30 Force the use of the block driver for format @var{fmt} instead of
31 auto-detecting
32 @item -r, --read-only
33 Export the disk as read-only
34 @item -P, --partition=@var{num}
35 Only expose partition @var{num}
36 @item -s, --snapshot
37 Use @var{filename} as an external snapshot, create a temporary
38 file with backing_file=@var{filename}, redirect the write to
39 the temporary one
40 @item -l, --load-snapshot=@var{snapshot_param}
41 Load an internal snapshot inside @var{filename} and export it
42 as an read-only device, @var{snapshot_param} format is
43 'snapshot.id=[ID],snapshot.name=[NAME]' or '[ID_OR_NAME]'
44 @item -n, --nocache
45 @itemx --cache=@var{cache}
46 The cache mode to be used with the file.  See the documentation of
47 the emulator's @code{-drive cache=...} option for allowed values.
48 @item --aio=@var{aio}
49 Set the asynchronous I/O mode between @samp{threads} (the default)
50 and @samp{native} (Linux only).
51 @item --discard=@var{discard}
52 Control whether @dfn{discard} (also known as @dfn{trim} or @dfn{unmap})
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}
57 Control the automatic conversion of plain zero writes by the OS to
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}.
62 @item -c, --connect=@var{dev}
63 Connect @var{filename} to NBD device @var{dev}
64 @item -d, --disconnect
65 Disconnect the device @var{dev}
66 @item -e, --shared=@var{num}
67 Allow up to @var{num} clients to share the device (default @samp{1})
68 @item -t, --persistent
69 Don't exit on the last connection
70 @item -v, --verbose
71 Display extra debugging information
72 @item -h, --help
73 Display this help and exit
74 @item -V, --version
75 Display version information and exit
76 @end table
78 @c man end
80 @ignore
82 @setfilename qemu-nbd
83 @settitle QEMU Disk Network Block Device Server
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
91 @c man begin SEEALSO
92 qemu(1), qemu-img(1)
93 @c man end
95 @end ignore