[one-users] OpenNebula 3.4.1 - Error creating host for kvm

Mohit Dhingra mohitdhingras at gmail.com
Thu May 10 00:37:38 PDT 2012


Hi,

Thanks for your reply. /var/run/libvirt/  was accesible to the oneadmin.
Going through the further search, we found the following:

When we run the following executable, ( which is called by kvm.rb

oneadmin at cloud:/var/tmp/one/im> ./run_probes kvm 21 cloud
error: unable to connect to '/var/run/libvirt/libvirt-sock', libvirtd may
need to be started: Connection refused
error: failed to connect to the hypervisor
ERROR MESSAGE --8<------
Error executing kvm.rb
ERROR MESSAGE ------>8--
ARCH=x86_64 MODELNAME="Six-Core AMD Opteron(tm) Processor 2431"
oneadmin at cloud:/var/tmp/one/im>


Socket file is already there, created by root.
srwxrwxrwx 1 root cloud 0 May 10 18:03 /var/run/libvirt/libvirt-sock

We are not sure how to do the following (in documentation -
http://www.opennebula.org/documentation:archives:rel3.0:kvmg )
To be able to use the images copied by OpenNebula, change also the user and
group under which the libvirtd is run to “oneadmin”.

We tried restarting libvirtd as oneadmin,

oneadmin at cloud:/var/tmp/one/im> /etc/init.d/libvirtd restart
Shutting down libvirtd                                              done
Starting libvirtd                                                   done

Still, it didn't work. Any other clues?

*
----------------------------
Thanks & Regards
Mohit Dhingra
+919611190435*


On 10 May 2012 00:27, fc lists <fclists at pr-z.info> wrote:

> Hi
>
> did you find anything in the libvirt log that could be useful?
>
> Might want to check permissions on directories before the socket file
>
> is it /var/run/libvirt/ accessible to the user?
>
> Can't think og anything else right now , hope it helps :)
>
> FC
>
> On Wed, May 9, 2012 at 6:56 PM, Mohit Dhingra <mohitdhingras at gmail.com>wrote:
>
>> *Hello All,*
>>
>> We are trying to install OpenNebula with kvm as hypervisor, and getting
>> some problem while creating host.
>> We have googled the error, but of no use.
>>
>> Logs from oned.log file
>>
>> ------------------------------------------------------------------------------------------------
>> Thu May 10 04:41:32 2012 [ReM][D]: HostPoolInfo method invoked
>> Thu May 10 04:41:32 2012 [ReM][D]: HostPoolInfo method invoked
>> Thu May 10 04:41:34 2012 [InM][I]: Monitoring host cloud (17)
>> Thu May 10 04:41:34 2012 [ReM][D]: HostPoolInfo method invoked
>> Thu May 10 04:41:34 2012 [ReM][D]: VirtualMachinePoolInfo method invoked
>> Thu May 10 04:41:34 2012 [ReM][D]: AclInfo method invoked
>> Thu May 10 04:41:34 2012 [InM][I]: ExitCode: 0
>> 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'
>> 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
>> Thu May 10 04:41:34 2012 [InM][I]: error: failed to connect to the
>> hypervisor
>> Thu May 10 04:41:34 2012 [InM][E]: Error executing kvm.rb
>> Thu May 10 04:41:34 2012 [InM][I]: ExitCode: 255
>> Thu May 10 04:41:34 2012 [InM][E]: Error monitoring host 17 : MONITOR
>> FAILURE 17 Error executing kvm.rb
>>
>> Thu May 10 04:41:39 2012 [ReM][D]: HostInfo method invoked
>>
>> --------------------------------------------------------------------------------------------------------------
>>
>>
>> Also, libvirtd is running as oneadmin.
>>
>> oneadmin at cloud:~/var> ps -A -f | grep libvirt
>> oneadmin  9295     1  0 04:40 ?        00:00:00 /usr/sbin/libvirtd -l -d
>>
>>
>> And, we have done the changes in libvirtd.conf
>> unix_sock_group = "cloud"
>> unix_sock_rw_perms = "0777"
>> listen_tcp = 1
>>
>> and in qemu.conf
>> user = "oneadmin"
>> group = "cloud"
>> dynamic_ownership = 0
>>
>> And, in  50-localauthority.conf,
>> Identity=unix-user:oneadmin
>> Action=org.libvirt.unix.manage
>> #Action=org.libvirt.unix.monitor
>> ResultAny=yes
>> ResultInactive=yes
>> ResultActive=yes
>>
>>
>> Is there something we are missing out.?? Can somebody please help us out.
>>
>>
>> *
>> ----------------------------
>> Thanks & Regards
>> Mohit Dhingra
>> *
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opennebula.org
>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20120510/5b3fb9ae/attachment-0003.htm>


More information about the Users mailing list