=head1 NAME

nbdkit-libvirt-plugin - nbdkit libvirt plugin using virDomainBlockPeek

=head1 SYNOPSIS

 nbdkit libvirt [connect=URI] domain=DOMAIN disk=DISK

=head1 EXAMPLE

 nbdkit libvirt domain=MyGuest disk=sda
 guestfish --ro --format=raw -a nbd://localhost

=head1 DESCRIPTION

C<nbdkit-libvirt-plugin> is an L<nbdkit(1)> plugin that lets you
access libvirt guest disks.  Only read-only access is possible.  It is
implemented using the libvirt C<virDomainBlockPeek> API.  It can also
be used over remote libvirt connections.

=head1 PARAMETERS

=over 4

=item B<connect=>URI

This optional parameter specifies the libvirt connection URI.

=item B<domain=>DOMAIN

This required parameter specifies the libvirt domain name
(guest name).

=item B<disk=>DISK

This required parameter specifies the guest's disk that we want to
read.

You can either give the path to the backing device (F</path/to/disk>)
or the target name (eg. C<sda>).

In either case use C<virsh dumpxml DOMAIN> to list possible disks.
Look for S<C<E<lt>source dev=...E<gt>>> or
S<C<E<lt>source file=...E<gt>>> or
S<C<E<lt>target dev=...E<gt>>> in the XML.

=back

=head1 FILES

=over 4

=item F<$plugindir/nbdkit-libvirt-plugin.so>

The plugin.

Use C<nbdkit --dump-config> to find the location of C<$plugindir>.

=back

=head1 VERSION

C<nbdkit-libvirt-plugin> first appeared in nbdkit 1.0.

=head1 SEE ALSO

L<nbdkit(1)>,
L<nbdkit-plugin(3)>,
L<http://libvirt.org>,
L<https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainBlockPeek>.

=head1 AUTHORS

Richard W.M. Jones

=head1 COPYRIGHT

Copyright Red Hat
