     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.

--object type,id=ID,...props...
     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.

-p, --port=PORT
     The TCP port to listen on (default 10809)

-o, --offset=OFFSET
     The offset into the image

-b, --bind=IFACE
     The interface to bind to (default 0.0.0.0)

-k, --socket=PATH
     Use a unix socket with path PATH

--image-opts
     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.

-f, --format=FMT
     Force the use of the block driver for format FMT instead of auto-detecting

-r, --read-only
     Export the disk as read-only

-P, --partition=NUM
     Only expose partition NUM

-s, --snapshot
     Use FILENAME as an external snapshot, create a temporary file with backing_file=FILENAME, redirect the write to the temporary one

-l, --load-snapshot=SNAPSHOT_PARAM
     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]'

-n, --nocache
--cache=CACHE
     The cache mode to be used with the file.  See the documentation of the emulator's -drive cache=... option for allowed values.

--aio=AIO
     Set the asynchronous I/O mode between threads (the default) and native (Linux only).

--discard=DISCARD
     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.

--detect-zeroes=DETECT-ZEROES
     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.

-c, --connect=DEV
     Connect FILENAME to NBD device DEV

-d, --disconnect
     Disconnect the device DEV

-e, --shared=NUM
     Allow up to NUM clients to share the device (default 1)

-t, --persistent
     Don't exit on the last connection

-x NAME, --export-name=NAME
     Set the NBD volume export name. This switches the server to use the new style NBD protocol negotiation

--tls-creds=ID
     Enable mandatory TLS encryption for the server by setting the ID of the TLS credentials object previously created with the --object option.

-v, --verbose
     Display extra debugging information

-h, --help
     Display this help and exit

-V, --version
     Display version information and exit

-T, --trace [[enable=]PATTERN][,events=FILE][,file=FILE]
          [file qemu-option-trace.texi not included]