[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH for-4.0 00/14] nbd: add qemu-nbd --list

From: Eric Blake
Subject: Re: [Qemu-block] [PATCH for-4.0 00/14] nbd: add qemu-nbd --list
Date: Sat, 1 Dec 2018 07:57:51 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1

On 12/1/18 1:42 AM, Richard W.M. Jones wrote:
On Fri, Nov 30, 2018 at 04:03:29PM -0600, Eric Blake wrote:
I note that upstream NBD has 'nbd-client -l $host' for querying
just export names (with no quoting, so you have to know that
a blank line means the default export), but it wasn't powerful
enough, so I implemented 'qemu-nbd -L' to document everything.
Upstream NBD has separate 'nbd-client' and 'nbd-server' binaries,
while we only have 'qemu-nbd' (which is normally just a server,
but 'qemu-nbd -c' also operates a second thread as a client).
Our other uses of qemu as NBD client are for consuming a block
device (as in qemu-io, qemu-img, or a drive to qemu) - but those
binaries are less suited to something so specific to the NBD

I tried it against nbdkit and it works (obviously):

$ ./qemu-nbd -L
exports available: 1
  export: ''
   size:  67108864
   flags: 0x61 ( trim zeroes )

What I couldn't work out is how to connect to other hosts.  It's
possible to add -p or -k to change the localhost port number or to use
a Unix domain socket (and I checked both work).  However can we
connect to remote hosts?

Should work by adding '-b host' (if -b is omitted, it defaults to However, I admit that so far I have only tested '-b localhost' or '-b' (per the iotest additions at the end of the series), so it could well be something that I missed in setting up the client socket in nbd_build_socket_address().

Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]