On 08/23/11 - 09:16:14PM, Matthias Bolte wrote: > 2011/8/23 Ohad Levy <ohadlevy@xxxxxxxxx>: > > Hi, > > I've been trying to use the ruby libvirt binding with vmware esx on F15, > > however it doesnt seems to work, I get: > > Libvirt::ConnectionError: Call to virConnectOpen failed: Cannot access CA > > certificate '/etc/pki/CA/cacert.pem': No such file or directory > > I've using the same uri with virsh and it works. > > it seems like somehow the no_verify is not passed, or we are back to old > > libvirt error messages :) > > any idea? > > thanks, > > Ohad > > As the ESX driver documentation says, you need to use > virConnectOpenAuth (what virsh does by default). You're error message > talks about virConnectOpen so there is your problem. You need to use > virConnectOpenAuth with the Ruby Bindings too. > > Until libvirt 0.9.2 the ESX driver declines connection attempts when > virConnectOpen is used. Since 0.9.2 this is reported as the error it > actually is. > > When the ESX driver declines the connection attempt libvirt will end > up trying to connect to a non-existing libvirtd on the ESX server in > order to find a driver that accepts the connection attempt. By default > it uses TLS for this and that's why it's looking for TLS certificates. > This is not related to the no_verify option. > > So you're probably using libvirt < 0.9.2 and are using virConnectOpen > instead of virConnectOpenAuth. Ohad, please let me know your experience using the ruby Libvirt::open_auth method. I tried to make it "ruby-ish", and it works for me, but I will be the first to admit that it is a bit baroque. -- Chris Lalancette