DOKK / manpages / debian 10 / qemu-utils / qemu-nbd.8.en
QEMU-NBD.8(8) QEMU-NBD.8(8)

qemu-nbd - QEMU Disk Network Block Device Server

qemu-nbd [OPTION]... filename

qemu-nbd -d dev

Export a QEMU disk image using the NBD protocol.

filename is a disk image filename, or a set of block driver options if --image-opts is specified.

dev is an NBD device.

Define a new instance of the type object class identified by id. See the qemu(1) manual page for full details of the properties supported. The common object types that it makes sense to define are the "secret" object, which is used to supply passwords and/or encryption keys, and the "tls-creds" object, which is used to supply TLS credentials for the qemu-nbd server.
The TCP port to listen on (default 10809)
The offset into the image
The interface to bind to (default 0.0.0.0)
Use a unix socket with path path
Treat filename as a set of image options, instead of a plain filename. If this flag is specified, the -f flag should not be used, instead the '"format="' option should be set.
Force the use of the block driver for format fmt instead of auto-detecting
Export the disk as read-only
Only expose partition num
Use filename as an external snapshot, create a temporary file with backing_file=filename, redirect the write to the temporary one
Load an internal snapshot inside filename and export it as an read-only device, snapshot_param format is 'snapshot.id=[ID],snapshot.name=[NAME]' or '[ID_OR_NAME]'
The cache mode to be used with the file. See the documentation of the emulator's "-drive cache=..." option for allowed values.
Set the asynchronous I/O mode between threads (the default) and native (Linux only).
Control whether discard (also known as trim or unmap) requests are ignored or passed to the filesystem. discard is one of ignore (or off), unmap (or on). The default is ignore.
Control the automatic conversion of plain zero writes by the OS to driver-specific optimized zero write commands. detect-zeroes is one of off, on or unmap. unmap converts a zero write to an unmap operation and can only be used if discard is set to unmap. The default is off.
Connect filename to NBD device dev
Disconnect the device dev
Allow up to num clients to share the device (default 1)
Don't exit on the last connection
Set the NBD volume export name. This switches the server to use the new style NBD protocol negotiation
Set the NBD volume export description, as a human-readable string. Requires the use of -x
Enable mandatory TLS encryption for the server by setting the ID of the TLS credentials object previously created with the --object option.
Fork off the server process and exit the parent once the server is running.
Display extra debugging information
Display this help and exit
Display version information and exit
Specify tracing options.
[enable=]pattern
Immediately enable events matching pattern (either event name or a globbing pattern). This option is only available if QEMU has been compiled with the simple, log or ftrace tracing backend. To specify multiple events or patterns, specify the -trace option multiple times.

Use "-trace help" to print a list of names of trace points.

Immediately enable events listed in file. The file must contain one event name (as listed in the trace-events-all file) per line; globbing patterns are accepted too. This option is only available if QEMU has been compiled with the simple, log or ftrace tracing backend.
Log output traces to file. This option is only available if QEMU has been compiled with the simple tracing backend.

qemu(1), qemu-img(1)

Copyright (C) 2006 Anthony Liguori <anthony@codemonkey.ws>. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

2020-07-24