On Mon, Oct 25, 2010 at 07:09, Justin Clift <jclift@xxxxxxxxxx> wrote: > On 10/25/2010 12:18 PM, Ruben Kerkhof wrote: >> On Sun, Oct 24, 2010 at 02:46, Justin Clift <jclift@xxxxxxxxxx> wrote: >>> On 10/24/2010 09:33 AM, Ruben Kerkhof wrote: >>> <snip> >>>> None at all, actually. I just started libvirtd on my local mac on >>>> which I also have VirtualBox installed. >>>> Speaking of which, it would be nice to have a launchctl file for >>>> libvirtd. I might be able to come up with something... >>> >>> Please do. It'd be nice to have that part working "out of the box" for >>> people as well. :) >> >> For that to work, I'd like to run libvirtd as my own user, so I can >> add the launchtl file to my own Library directory. >> >> I'm curious, can you successfully run libvirtd as your own user (no sudo)? >> >> 03:10:17.562: error : qemudListenUnix:582 : Failed to bind socket to >> '@/Users/ruben/.libvirt/libvirt-sock': No such file or directory > > Actually, that looks familiar. ÂI think I tried the same thing, but was > ok running it as root instead after getting the same error. > > I didn't look into it any more though. ;) > > >> Stepping through the code now, I see 2 (possible) issues: >> >> First: qemudInitPaths doesn't seem to create the ~/.libvirt directory >> Second: in qemudListenUnix, this piece of code: >> >> addr.sun_family = AF_UNIX; >> Â Â if (virStrcpyStatic(addr.sun_path, path) == NULL) { >> Â Â Â Â VIR_ERROR(_("Path %s too long for unix socket"), path); >> Â Â Â Â goto cleanup; >> Â Â } >> Â Â if (addr.sun_path[0] == '@') >> Â Â Â Â addr.sun_path[0] = '\0'; >> >> So the first byte of the sun_path is '\0', something that Leopard >> doesn't seem to like. >> Breaking into gdb and setting the path manually to >> "/Users/ruben/.libvirt/libvirt-sock" seems to work. > > Interesting. ÂWe can definitely pull together a temporary OSX workaround > patch for the moment (purely in the Homebrew formula). ÂBut it would be > better to have a proper fix in libvirt instead. > > How good is your C coding? :) Terrible ;) I think the easiest fix is if (addr[0] == '@') addr[0] = '\0'; if (virStrcpyStatic(addr.sun_path, path) == NULL) { VIR_ERROR(_("Path %s too long for unix socket"), path); goto cleanup; } Or am I missing something? I haven't been able to bootstrap a build from libvirt git yet, mainly gettext issues. Otherwise I would have come up with a proper patch. Thanks, Ruben -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list