On Fri, Oct 18, 2019 at 05:34:17PM +0100, Richard W.M. Jones wrote:
On Fri, Oct 18, 2019 at 10:58:43AM -0500, Eric Blake wrote:
> On 10/18/19 10:39 AM, Richard W.M. Jones wrote:
> >+Connect (synchronously) over the C<AF_VSOCK> protocol from a
> >+virtual machine to an NBD server, usually running on the host. The
> >+C<cid> and C<port> parameters specify the server address. Usually
> >+C<cid> should be C<2> (to connect to the host), and C<port>
might be
> >+C<10809> or another port number assigned to you by the host
> >+administrator. This call returns when the connection has been made.";
>
> You mentioned that right now, nbdkit has to be server on host, and
> libnbd is client on guest. But if we can let nbdkit specify a cid,
> doesn't this mean we can run nbdkit as server in guest, and then
> connect libnbd as client on host? Then add 'nbdkit nbd vsock=...'
> to let the nbdkit pass-through wrapper convert vsock from guest into
> TCP or Unix socket on the host to other host clients that don't know
> how to do vsock.
I'm afraid I don't understand this.
After re-reading it I do understand this and also the need for it.
However I was able to fix it another way, by having nbdkit listen on
the "ANY" address, so now it should be possible to run it from the
guest too.
It would still be useful to add vsock capability to nbdkit-nbd-plugin
for other reasons (NBD clients which don't support vsock but which
need to access a vsock resource).
Note I have added support for vsock URIs to libnbd now too, using the
obvious syntax (nbd+vsock:/// or nbd+vsock://2:10809/)
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v