3 nbdkit-streaming-plugin - nbdkit streaming plugin
7 nbdkit streaming pipe=FILENAME [size=SIZE]
11 C<nbdkit-streaming-plugin> is a plugin for L<nbdkit(1)> that can turn
12 certain kinds of input into a stream.
14 If the NBD client opens the NBD port, and writes from the start to the
15 end of the disk without seeking backwards, then this plugin will turn
16 the resulting disk image into a stream of data which is written to the
17 named C<pipe> parameter.
20 client │ nbdkit │ plugin streams
21 writes ──────▶│ streaming │──────▶ data to pipe
25 Typical usage is with qemu tools. The following command will I<not>
26 work because the output is a pipe or socket:
28 qemu-img convert input -O raw pipe
30 However this will work:
32 nbdkit -U - streaming pipe=pipe --run '
33 qemu-img convert -n input -O raw $nbd
36 ┌───────────┐ ┌───────────┐
37 reads │ qemu-img │ │ nbdkit │ plugin streams
38 input ──────▶│ convert │──────▶│ streaming │──────▶ data to pipe
39 file │ command │ │ plugin │
40 └───────────┘ ↑└───────────┘
41 Unix domain socket (-U -)
43 For use of the I<--run> and I<-U -> options, see
50 =item B<pipe=>FILENAME
52 Write to the named pipe or socket. If the pipe or socket does not
53 exist, then it is created (as a named FIFO), otherwise the existing
54 pipe or socket is opened and used.
56 This parameter is required.
60 Specify the virtual size of the stream.
62 This parameter is optional. If not specified, then the virtual disk
63 appears to the client to be very large (effectively infinite).
64 Whether you need to specify this parameter depends on the client.
65 Some clients don't check the size and just write/stream, others do
66 checks or calculations based on the apparent size.
74 =item F<$plugindir/nbdkit-streaming-plugin.so>
78 Use C<nbdkit --dump-config> to find the location of C<$plugindir>.
84 C<nbdkit-streaming-plugin> first appeared in nbdkit 1.2.
97 Copyright (C) 2014 Red Hat Inc.