[libvirt] The weird '@' in bind address on OSX

Eric Blake eblake at redhat.com
Wed Feb 8 22:37:42 UTC 2012


On 02/08/2012 01:58 AM, Justin Clift wrote:
> Hi all,
> 
> As a general thought, would anyone be interested in getting this weird '@'
> thing in the bind address on OSX "fixed"?

The @ is merely a visual place-holder for the actual NUL byte being
written into the actual socket structure handed to the kernel.  But you
are correct that:

> 
> Matthias mentioned it's due to using anonymous unix sockets, which
> are only present on Linux:
> 
>   https://www.redhat.com/archives/libvirt-users/2011-November/msg00018.html

Use of a NUL byte in the first byte of a socket address is a Linux-only
hack to get an anonymous socket namespace.

> 
> Guess that means libvirtd doesn't work on *BSD either?

Correct, for anywhere that libvirt currently uses an anonymous socket
(such as in qemu:///session).

> 
> Perhaps gnulib has a cross platform way to take care of this?

No.  There's no way to fake anonymous namespace sockets if the kernel
does not have them.  Rather, libvirt needs to have a graceful fallback
to something in the file system (perhaps under ~/.libvirt/...) on
platforms that don't have an anonymous socket namespace.

> 
> (Note, I could have sworn eblake started looking into this ages ago,
> but then I moved on to the Aeolus team.  Unsure if there was useful
> progress back then. ?)

No, I haven't really done anything with this.  Sorry.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120208/70e8f24c/attachment-0001.sig>


More information about the libvir-list mailing list