Question

I'm helping to write a program that manages VMs remotely. When I try to connect to a XenServer machine to discover the hypervisor, I get a "Unable to connect: Cannot read CA certificate '/etc/pki/CA/cacert.pem': No such file or directory" error. I've tried creating the cacert.pem file that it's looking for, but that doesn't fix anything. I've read that this certain error isn't accurately showing what's wrong.

This only happens when I use the Java bindings - I can successfully connect to the machine with virsh. I turned on debug mode for libvirt and tried to connect with both the bindings and virsh. The only major difference that I saw is virsh calling several virEvent type methods that libvirt doesn't do. (As I think about it, this may just be libvirt using my custom ConnectAuth class that doesn't prompt for a password)

Using:

  • libvirt 0.9.12 --with-xenapi
  • libvirt-java 0.4.7

I can't seem to find anybody else who has had this problem. Any help would be appreciated!

Was it helpful?

Solution

We ended up having to modify the Connect object in libvirt-java. The object was still valid, but somehow an error was being thrown. It's a messy hack, but we just ignore the certain error that is thrown and pass up the Connect object and are able to connect.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top