]> git.proxmox.com Git - mirror_qemu.git/blame - qemu-nbd.texi
qom: add helpers for UserCreatable object types
[mirror_qemu.git] / qemu-nbd.texi
CommitLineData
7a5ca864
FB
1@example
2@c man begin SYNOPSIS
7e8911bb
SW
3@command{qemu-nbd} [OPTION]... @var{filename}
4
5@command{qemu-nbd} @option{-d} @var{dev}
7a5ca864
FB
6@c man end
7@end example
8
9@c man begin DESCRIPTION
10
7e8911bb 11Export a QEMU disk image using the NBD protocol.
7a5ca864
FB
12
13@c man end
14
15@c man begin OPTIONS
7e8911bb
SW
16@var{filename} is a disk image filename.
17
18@var{dev} is an NBD device.
19
4a6b819c 20@table @option
4a6b819c 21@item -p, --port=@var{port}
50901218 22The TCP port to listen on (default @samp{10809})
4a6b819c 23@item -o, --offset=@var{offset}
50901218 24The offset into the image
4a6b819c 25@item -b, --bind=@var{iface}
50901218 26The interface to bind to (default @samp{0.0.0.0})
4a6b819c 27@item -k, --socket=@var{path}
b9dbb617 28Use a unix socket with path @var{path}
7e8911bb 29@item -f, --format=@var{fmt}
50901218 30Force the use of the block driver for format @var{fmt} instead of
7e8911bb 31auto-detecting
7a5ca864 32@item -r, --read-only
50901218 33Export the disk as read-only
4a6b819c 34@item -P, --partition=@var{num}
50901218 35Only expose partition @var{num}
2f726488 36@item -s, --snapshot
50901218 37Use @var{filename} as an external snapshot, create a temporary
b9dbb617
SW
38file with backing_file=@var{filename}, redirect the write to
39the temporary one
8c116b0e 40@item -l, --load-snapshot=@var{snapshot_param}
50901218 41Load an internal snapshot inside @var{filename} and export it
b9dbb617
SW
42as an read-only device, @var{snapshot_param} format is
43'snapshot.id=[ID],snapshot.name=[NAME]' or '[ID_OR_NAME]'
2f726488 44@item -n, --nocache
0eb256a2 45@itemx --cache=@var{cache}
50901218 46The cache mode to be used with the file. See the documentation of
b9dbb617 47the emulator's @code{-drive cache=...} option for allowed values.
0eb256a2 48@item --aio=@var{aio}
50901218 49Set the asynchronous I/O mode between @samp{threads} (the default)
b9dbb617 50and @samp{native} (Linux only).
ded9d2d5 51@item --discard=@var{discard}
50901218 52Control whether @dfn{discard} (also known as @dfn{trim} or @dfn{unmap})
7e8911bb
SW
53requests 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}
50901218 57Control the automatic conversion of plain zero writes by the OS to
7e8911bb
SW
58driver-specific optimized zero write commands. @var{detect-zeroes} is one of
59@samp{off}, @samp{on} or @samp{unmap}. @samp{unmap}
60converts 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}.
bba7be96 62@item -c, --connect=@var{dev}
50901218 63Connect @var{filename} to NBD device @var{dev}
cd831bd7 64@item -d, --disconnect
50901218 65Disconnect the device @var{dev}
4a6b819c 66@item -e, --shared=@var{num}
50901218 67Allow up to @var{num} clients to share the device (default @samp{1})
75818250 68@item -t, --persistent
50901218 69Don't exit on the last connection
7a5ca864 70@item -v, --verbose
50901218 71Display extra debugging information
7a5ca864 72@item -h, --help
50901218 73Display this help and exit
7a5ca864 74@item -V, --version
50901218 75Display version information and exit
7a5ca864
FB
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
86Copyright (C) 2006 Anthony Liguori <anthony@codemonkey.ws>.
87This is free software; see the source for copying conditions. There is NO
88warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
89@c man end
90
91@c man begin SEEALSO
7e8911bb 92qemu(1), qemu-img(1)
7a5ca864
FB
93@c man end
94
95@end ignore