In my environment i run it like this <br><br>Note that i run OPENNEBULA-3.4.1 ... your link point to 3.0 so if you are running that it might be different:<br><br>/etc/libvirt/libvirtd.conf:<br>listen_tls = 0<br>listen_tcp = 1<br>
tcp_port = "16509"<br>log_level = 2<br><br>/etc/libvirt/qemu.conf:<br>user = "oneadmin"<br>group = "oneadmin"<br>dynamic_ownership = 0<br><br>also:<br># id oneadmin<br>uid=495(oneadmin) gid=495(oneadmin) groups=495(oneadmin),6(disk),36(kvm),107(qemu)<br>
<br>[root@one-vmhost1 libvirt]# id qemu<br>uid=107(qemu) gid=107(qemu) groups=107(qemu),6(disk),36(kvm)<br><br>This gives me:<br><br># ls -la /var/run/libvirt/|grep sock<br>srwxrwxrwx   1 root root    0 May 14 17:51 libvirt-sock<br>
srwxrwxrwx   1 root root    0 May 14 17:51 libvirt-sock-ro<br><br># ps -auxwww|grep -i libvirtd<br>Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ<br>root     14857  1.4  0.7 1014556 14468 ?       Sl   May14  21:33 libvirtd --daemon --listen<br>
root     20922  0.0  0.0 103292   872 pts/0    S+   18:36   0:00 grep -i libvirtd<br><br>and<br><br>oneadmin 23975 44.7  8.1 964248 167836 ?       Sl   May14 535:03 /usr/bin/kvm -S -M rhel6.2.0 -enable-kvm ... .... ...<br>
<br>As you can see my libvirtd run as root and starts kvm VM as oneadmin.<br><br>Hope it helps ... honestly i am not sure i really like it like this, i tried to get libvirtd less privileges but i failed so far and just wanted to get it running and test it.<br>
<br>If you can try upgrading to 3.4.1 (or whatever is latest now) and fix the few conf like that.<br><br>Good luck :)<br><br>-FC<br><br><br><br><div class="gmail_quote">On Thu, May 10, 2012 at 8:37 AM, Mohit Dhingra <span dir="ltr"><<a href="mailto:mohitdhingras@gmail.com" target="_blank">mohitdhingras@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, <br><br>Thanks for your reply.  /var/run/libvirt/  was accesible to the oneadmin. Going through the further search, we found the following:<br>
<br>When we run the following executable, ( which is called by kvm.rb <br><br>

oneadmin@cloud:/var/tmp/one/im> ./run_probes kvm 21 cloud<div class="im"><br>error: unable to connect to '/var/run/libvirt/libvirt-sock', libvirtd may need to be started: Connection refused<br></div><div class="im">
error: failed to connect to the hypervisor<br></div>

ERROR MESSAGE --8<------<br>Error executing kvm.rb<br>ERROR MESSAGE ------>8--<br>ARCH=x86_64 MODELNAME="Six-Core AMD Opteron(tm) Processor 2431" oneadmin@cloud:/var/tmp/one/im> <br><br><br>Socket file is already there, created by root.<br>


srwxrwxrwx 1 root cloud 0 May 10 18:03 /var/run/libvirt/libvirt-sock<br><br>We are not sure how to do the following (in documentation - <a href="http://www.opennebula.org/documentation:archives:rel3.0:kvmg" target="_blank">http://www.opennebula.org/documentation:archives:rel3.0:kvmg</a> )<br>


To be able to use the images copied by OpenNebula, change also the user and group under which the libvirtd is run to “oneadmin”.<br>
<br>We tried restarting libvirtd as oneadmin, <br><br>oneadmin@cloud:/var/tmp/one/im> /etc/init.d/libvirtd restart<br>Shutting down libvirtd                                              done<br>Starting libvirtd                                                   done<br>


<br>Still, it didn't work. Any other clues? <br><br clear="all"><b><div><b>---------------------------- <br></b></div>Thanks & Regards<span class="HOEnZb"><font color="#888888"><br><font color="#888888">Mohit Dhingra <br>
<a href="tel:%2B919611190435" value="+919611190435" target="_blank">+919611190435</a></font></font></span></b><div class="HOEnZb"><div class="h5"><br>
<br><br><div class="gmail_quote">On 10 May 2012 00:27, fc lists <span dir="ltr"><<a href="mailto:fclists@pr-z.info" target="_blank">fclists@pr-z.info</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



Hi<br><br>did you find anything in the libvirt log that could be useful?<br><br>Might want to check permissions on directories before the socket file <br><br>is it /var/run/libvirt/ accessible to the user?<br><br>Can't think og anything else right now , hope it helps :)<br>




<br>FC<br><br><div class="gmail_quote"><div><div>On Wed, May 9, 2012 at 6:56 PM, Mohit Dhingra <span dir="ltr"><<a href="mailto:mohitdhingras@gmail.com" target="_blank">mohitdhingras@gmail.com</a>></span> wrote:<br>



</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>
<b>Hello All,</b><br><br>We are trying to install OpenNebula with kvm as hypervisor, and getting some problem while creating host.<br>We have googled the error, but of no use. <br><br>Logs from oned.log file <br>------------------------------------------------------------------------------------------------<br>






Thu May 10 04:41:32 2012 [ReM][D]: HostPoolInfo method invoked<br>Thu May 10 04:41:32 2012 [ReM][D]: HostPoolInfo method invoked<br>Thu May 10 04:41:34 2012 [InM][I]: Monitoring host cloud (17)<br>Thu May 10 04:41:34 2012 [ReM][D]: HostPoolInfo method invoked<br>






Thu May 10 04:41:34 2012 [ReM][D]: VirtualMachinePoolInfo method invoked<br>Thu May 10 04:41:34 2012 [ReM][D]: AclInfo method invoked<br>Thu May 10 04:41:34 2012 [InM][I]: ExitCode: 0<br>Thu May 10 04:41:34 2012 [InM][I]: Command execution fail: 'if [ -x "/var/tmp/one/im/run_probes" ]; then /var/tmp/one/im/run_probes kvm 17 cloud; else                              exit 42; fi'<br>






Thu May 10 04:41:34 2012 [InM][I]: error: unable to connect to '/var/run/libvirt/libvirt-sock', libvirtd may need to be started: Connection refused<br>Thu May 10 04:41:34 2012 [InM][I]: error: failed to connect to the hypervisor<br>






Thu May 10 04:41:34 2012 [InM][E]: Error executing kvm.rb<br>Thu May 10 04:41:34 2012 [InM][I]: ExitCode: 255<br>Thu May 10 04:41:34 2012 [InM][E]: Error monitoring host 17 : MONITOR FAILURE 17 Error executing kvm.rb<br>





<br>
Thu May 10 04:41:39 2012 [ReM][D]: HostInfo method invoked<br>--------------------------------------------------------------------------------------------------------------<br><br><br>Also, libvirtd is running as oneadmin.<br>






<br>oneadmin@cloud:~/var> ps -A -f | grep libvirt<br>oneadmin  9295     1  0 04:40 ?        00:00:00 /usr/sbin/libvirtd -l -d<br><br><br>And, we have done the changes in libvirtd.conf<br>unix_sock_group = "cloud"<br>






unix_sock_rw_perms = "0777"<br>listen_tcp = 1<br><br>and in qemu.conf<br>user = "oneadmin"<br>group = "cloud"<br>dynamic_ownership = 0<br><br>And, in  50-localauthority.conf, <br>Identity=unix-user:oneadmin<br>






Action=org.libvirt.unix.manage<br>#Action=org.libvirt.unix.monitor<br>ResultAny=yes<br>ResultInactive=yes<br>ResultActive=yes<br><br><br>Is there something we are missing out.?? Can somebody please help us out.<br><br><br clear="all">






<b><div><b>---------------------------- <br></b></div>Thanks & Regards<span><font color="#888888"><br><font color="#888888">Mohit Dhingra <br></font></font></span></b><br>
<br></div></div>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opennebula.org" target="_blank">Users@lists.opennebula.org</a><br>
<a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><br>
<br></blockquote></div><br>
</blockquote></div><br>
</div></div></blockquote></div><br>