Will,<div><br></div><div>I have been running the libvirt daemon as "shawn" because when running as "root", "ps aux | grep libvirtd" does not show that the daemon is running. So I uninstalled and re-installed libvirt as "root" but to no avail. For some reason I cannot start the daemon as root. I don't get any errors when doing this, it just doesn't run.</div>
<div><br></div><div>Shawn<br><br><div class="gmail_quote">On Thu, Aug 23, 2012 at 2:08 PM, Whit Blauvelt <span dir="ltr"><<a href="mailto:whit.virt@transpect.com" target="_blank">whit.virt@transpect.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Shawn,<br>
<br>
Are you starting libvirtd as root, from a # prompt rather than as shawn, from<br>
a $ prompt? If not, try "sudo -i" to get to a root prompt and start it from<br>
there. If it still puts libvirt-sock in the wrong place, did you compile<br>
this as root? Perhaps it sets up to default to a user's home if that user<br>
compiles it. No idea.<br>
<br>
Also, just to be lazy, you can get away without the "-c qemu:///system" part<br>
- virsh defaults to that.<br>
<span class="HOEnZb"><font color="#888888"><br>
Whit<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Thu, Aug 23, 2012 at 01:55:59PM -0400, Shawn Furrow wrote:<br>
> Will (and all other users),<br>
><br>
> So I think I figured out what my issue is but I'm not certain where and how to<br>
> fix it. As I stated before when I run "sudo virsh -c qemu:///system list" I get<br>
> these errors:<br>
><br>
> error: Failed to connect socket to '/usr/local/var/run/libvirt/libvirt-sock':<br>
> Permission denied<br>
> error: failed to connect to the hypervisor<br>
><br>
> Well interesting enough, when I start the daemon and run "lsof | grep<br>
> libvirt-sock" it returns this path:<br>
><br>
> libvirtd 5598 shawn 11u unix 0xffff88042192d050 0t0 39057 /<br>
> home/users/shawn/.cache/libvirt/libvirt-sock<br>
><br>
> So if I'm not mistaken, it appears that the daemon is creating the socket at "/<br>
> home/users/shawn/.cache/libvirt" but the virsh command is trying to connect at<br>
> "/usr/local/var/run/libvirt". I figured that changing the unix_sock_dir<br>
> variable in "/usr/local/etc/libvirt/libvirtd.conf" to be set to "/usr/local/var<br>
> /run/libvirt" would fix it but it doesn't. The daemon still creates the<br>
> libvirt-sock socket at "/home/users/shawn/.cache/libvirt/libvirt-sock".<br>
><br>
> Do you happen to know where or how to set daemon's default location for<br>
> creating the libvirt-sock?<br>
><br>
> Shawn<br>
><br>
> On Thu, Aug 23, 2012 at 12:52 PM, Whit Blauvelt <<a href="mailto:whit.virt@transpect.com">whit.virt@transpect.com</a>><br>
> wrote:<br>
><br>
> Shawn,<br>
><br>
> First off, nobody would call me an expert at this. Fumbling like you are.<br>
> But it's working for me.<br>
><br>
> Are you sure you killed all libvirtd processes before starting libvirtd?<br>
> You<br>
> might check for them with "ps aux | grep libvirtd". I recall a tendency for<br>
> them to hang around short of explicitly killing them.<br>
><br>
> Which user did you start libvirtd as? I'd doing that as root.<br>
><br>
> Speaking of users, there's another step I took, and I'm not sure if it was<br>
> essential or not. In /usr/local/etc/libvirt/qemu.conf I set the qemu user<br>
> and group to the Ubuntu defaults:<br>
><br>
> # The user ID for QEMU processes run by the system instance.<br>
> #user = "root"<br>
> user = "libvirt-qemu"<br>
><br>
> # The group ID for QEMU processes run by the system instance.<br>
> #group = "root"<br>
> group = "kvm"<br>
><br>
> Did that while I was fumbling. Not sure if it was critical.<br>
><br>
> Whit<br>
><br>
><br>
><br>
><br>
> On Thu, Aug 23, 2012 at 12:27:01PM -0400, Shawn Furrow wrote:<br>
> > Whit,<br>
> ><br>
> > I was able to get around the library problem by simply uninstalling the<br>
> > xsltproc distribution package. The docs are not made but the installation<br>
> > finishes. (Let me know if you think this is a bad idea or if it will mess<br>
> up<br>
> > the running of libvirt somehow)<br>
> ><br>
> > I tried your suggestion and I can run the libvirt daemon from the<br>
> location you<br>
> > suggested. However, when I cannot seem to connect to the libvirt-sock<br>
> socket or<br>
> > the qemu hypervisor. When I run the command "sudo virsh -c qemu:///system<br>
> list"<br>
> > I get the follow error messages:<br>
> ><br>
> > error: Failed to connect socket to '/usr/local/var/run/libvirt/<br>
> libvirt-sock':<br>
> > Connection refused<br>
> > error: failed to connect to the hypervisor<br>
> ><br>
> > Any ideas how to get this working. I've been running into this problem<br>
> for<br>
> > several combinations of installs except for when I use the distro<br>
> packages for<br>
> > both qemu-kvm and libvirt.<br>
> ><br>
> > Thanks,<br>
> > Shawn<br>
> ><br>
> ><br>
> ><br>
> > On Wed, Aug 22, 2012 at 4:20 PM, Whit Blauvelt <<a href="mailto:whit.virt@transpect.com">whit.virt@transpect.com</a>><br>
> wrote:<br>
> ><br>
> > What works for me (Ubuntu 10.10):<br>
> ><br>
> > Stop the old version.<br>
> ><br>
> > Start the new one with:<br>
> ><br>
> > /usr/local/sbin/libvirtd -d<br>
> ><br>
> > That's assuming that you did a "make install" and let it go to the<br>
> default<br>
> > location, which that is. Now, if it's all default (both the original<br>
> and<br>
> > your builds), then replace /usr/local/etc/libvirt/qemu with a symlink<br>
> to<br>
> > /etc/libvirt/qemu before starting.<br>
> ><br>
> > Also, if you've built qemu-kvm to replace the distro version, then<br>
> > /usr/bin/kvm should be a symlink to /usr/local/bin/qemu-system-x86_64<br>
> > rather<br>
> > than the distro's /usr/bin/qemu-system-x86_64.<br>
> ><br>
> > There's also another daemon or two that you may or may not need<br>
> running<br>
> > according to how you're handling the VM interfaces. Since I'm<br>
> bridging<br>
> > them,<br>
> > I haven't concerned myself with that.<br>
> ><br>
> > In recent versions Ubuntu has omitted a proper /etc/init.d script in<br>
> favor<br>
> > of upstart (which I hate; YMMV). There's still a decent init.d script<br>
> for<br>
> > libvirt in Debian, which can be edited to work with a<br>
> built-from-source<br>
> > version. Of course, Ubuntu will replace that whenever you do updates,<br>
> if it<br>
> > still thinks that libvirt is something it should update.<br>
> ><br>
> > BTW, what did you do to get around the library problem?<br>
> ><br>
> > Whit<br>
> ><br>
> > On Wed, Aug 22, 2012 at 03:50:12PM -0400, Shawn Furrow wrote:<br>
> > > Daniel (and all others),<br>
> > ><br>
> > > I have been able to get past the libvirt installation but I cannot<br>
> start<br>
> > the<br>
> > > libvirtd daemon. For ubuntu, what is the best way to start the<br>
> libvirtd<br>
> > daemon?<br>
> > > "sudo make install" did not put libvirtd in /etc/init.d so the only<br>
> place<br>
> > I see<br>
> > > it is in libvirt-0.10.0/daemon/. I have looked up this issue online<br>
> and<br>
> > the<br>
> > > best I have seen is to install the distribution package and replace<br>
> the<br>
> > daemon<br>
> > > with the one I build from source. Does anyone know anything about<br>
> this?<br>
> > ><br>
> > > Thanks,<br>
> > > Shawn<br>
> > ><br>
> > > On Wed, Aug 22, 2012 at 10:40 AM, Shawn Furrow <<a href="mailto:sfurrow@vt.edu">sfurrow@vt.edu</a>><br>
> wrote:<br>
> > ><br>
> > > If I run xmllint --noout docs/<a href="http://news.html.in" target="_blank">news.html.in</a> inside the<br>
> libvirt-0.10.0<br>
> > > directory I get no output.<br>
> > ><br>
> > > Shawn<br>
> > ><br>
> > ><br>
> > > On Wed, Aug 22, 2012 at 10:33 AM, Daniel Veillard <<br>
> > <a href="mailto:veillard@redhat.com">veillard@redhat.com</a>><br>
> > > wrote:<br>
> > ><br>
> > > On Wed, Aug 22, 2012 at 10:02:53AM -0400, Shawn Furrow<br>
> wrote:<br>
> > > > Daniel,<br>
> > > ><br>
> > > > I tried re-installing all of those libraries and I still<br>
> get<br>
> > the same<br>
> > > > segfault. Here are the outputs you requested:<br>
> > > ><br>
> > > > *xsltproc --version*<br>
> > > > Using libxml 20706, libxslt 10126 and libexslt 815<br>
> > > > xsltproc was compiled against libxml 20706, libxslt 10126<br>
> and<br>
> > > libexslt 815<br>
> > > > libxslt 10126 was compiled against libxml 20706<br>
> > > > libexslt 815 was compiled against libxml 20706<br>
> > > ><br>
> > > > *xmllint --version*<br>
> > > > xmllint: using libxml version 20706<br>
> > > > compiled with: Threads Tree Output Push Reader<br>
> Patterns<br>
> > Writer<br>
> > > SAXv1 FTP<br>
> > > > HTTP DTDValid HTML Legacy C14N Catalog XPath XPointer<br>
> XInclude<br>
> > Iconv<br>
> > > > ISO8859X Unicode Regexps Automata Expr Schemas Schematron<br>
> > Modules<br>
> > > Debug Zlib<br>
> > ><br>
> > > what does xmllint --noout docs/<a href="http://news.html.in" target="_blank">news.html.in</a> gives within<br>
> > libvirt ?<br>
> > > if it crashes then check which libz is used by<br>
> > > ldd /usr/bin/xmllint<br>
> > > and check where that library comes from, it's very likely a<br>
> > problem<br>
> > > like that, xsltproc should not crash<br>
> > ><br>
> > > Daniel<br>
> > ><br>
> > > --<br>
> > > Daniel Veillard | libxml Gnome XML XSLT toolkit http:<br>
> //<br>
> > > <a href="http://xmlsoft.org/" target="_blank">xmlsoft.org/</a><br>
> > > <a href="mailto:daniel@veillard.com">daniel@veillard.com</a> | Rpmfind RPM search engine http://<br>
> > <a href="http://rpmfind.net/" target="_blank">rpmfind.net/</a><br>
> > > <a href="http://veillard.com/" target="_blank">http://veillard.com/</a> | virtualization library http://<br>
> <a href="http://libvirt.org" target="_blank">libvirt.org</a><br>
> > /<br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > > --<br>
> > > Virginia Tech<br>
> > > Bradley Department of Electrical and Computer Engineering<br>
> > > B.S. Electrical Engineering<br>
> > > B.S. Computer Engineering<br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > > --<br>
> > > Virginia Tech<br>
> > > Bradley Department of Electrical and Computer Engineering<br>
> > > B.S. Electrical Engineering<br>
> > > B.S. Computer Engineering<br>
> > ><br>
> ><br>
> > > _______________________________________________<br>
> > > libvirt-users mailing list<br>
> > > <a href="mailto:libvirt-users@redhat.com">libvirt-users@redhat.com</a><br>
> > > <a href="https://www.redhat.com/mailman/listinfo/libvirt-users" target="_blank">https://www.redhat.com/mailman/listinfo/libvirt-users</a><br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > --<br>
> > Virginia Tech<br>
> > Bradley Department of Electrical and Computer Engineering<br>
> > B.S. Electrical Engineering<br>
> > B.S. Computer Engineering<br>
> ><br>
><br>
><br>
><br>
><br>
> --<br>
> Virginia Tech<br>
> Bradley Department of Electrical and Computer Engineering<br>
> B.S. Electrical Engineering<br>
> B.S. Computer Engineering<br>
><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Virginia Tech<br>Bradley Department of Electrical and Computer Engineering<br>B.S. Electrical Engineering</div><div>B.S. Computer Engineering</div>
<br>
</div>