#507585 virsh should look at /etc/libvirt/libvirtd.conf too

#507585#5
Date:
2008-12-02 18:52:18 UTC
From:
To:
piper:~|master|% grep cacert /etc/libvirt/libvirtd.conf
ca_file = "/etc/ssl/certs/cacert.org.pem"
piper:~|master|% ls /etc/ssl/certs/cacert.org.pem
/etc/ssl/certs/cacert.org.pem
piper:~|master|% virsh -d5 --connect qemu:///khyber.madduck.net
libvir: error : could not connect to qemu:///khyber.madduck.net
error: failed to connect to the hypervisor
  # note the -d5 in there!
piper:~|master|% virsh --connect qemu+tls:///khyber.madduck.net
libvir: Remote error : Cannot access CA certificate '/etc/pki/CA/cacert.pem': No such file or directory (2)
error: failed to connect to the hypervisor
  # note how it ignores /etc/libvirt/libvirtd.conf

#507585#10
Date:
2008-12-02 22:34:48 UTC
From:
To:
severity 507585 wishlist
retitile 507585 virsh should look at /etc/libvirt/libvirtd.conf too
thanks
It's virsh you're callling, not libvirtd.
 -- Guido

#507585#17
Date:
2008-12-02 22:59:22 UTC
From:
To:
also sprach Guido Günther <agx@sigxcpu.org> [2008.12.02.2334 +0100]:

Sure, but there is no mention of any other configuration file in the
manpage, and it *is* part of libvirt, so /etc/libvirt seemed right.
I should have spotted libvirtd.conf...

#507585#26
Date:
2009-07-28 10:52:02 UTC
From:
To:
I've just run into this problem writing my own libvirt client with the
Sys::Virt perl module. Unfortunately it's not something that is easily
worked around, because the paths are not configurable, but hard-coded
into the client libraries:

 % grep LIBVIRT_ libvirt-0.6.3/src/remote_internal.h
#define LIBVIRT_PKI_DIR SYSCONF_DIR "/pki"
#define LIBVIRT_CACERT LIBVIRT_PKI_DIR "/CA/cacert.pem"
#define LIBVIRT_CLIENTKEY LIBVIRT_PKI_DIR "/libvirt/private/clientkey.pem"
#define LIBVIRT_CLIENTCERT LIBVIRT_PKI_DIR "/libvirt/clientcert.pem"
#define LIBVIRT_SERVERKEY LIBVIRT_PKI_DIR "/libvirt/private/serverkey.pem"
#define LIBVIRT_SERVERCERT LIBVIRT_PKI_DIR "/libvirt/servercert.pem"

Simon