     qemu-nbd [OPTION]... FILENAME

     qemu-nbd -d DEV

Export a QEMU disk image using the NBD protocol.

FILENAME is a disk image filename.

DEV is an NBD device.

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

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

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

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

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

-r, --read-only
     export 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
     set cache mode to be used with the file.  See the documentation of the emulator's -drive cache=... option for allowed values.

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

--discard=DISCARD
     controls 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
     enables 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 specified device

-e, --shared=NUM
     device can be shared by NUM clients (default 1)

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

-v, --verbose
     display extra debugging information

-h, --help
     display this help and exit

-V, --version
     output version information and exit