- Package:
- libvirt-bin
- Source:
- libvirt
- Submitter:
- martin f krafft
- Date:
- 2023-04-17 15:57:37 UTC
- Severity:
- wishlist
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
severity 507585 wishlist retitile 507585 virsh should look at /etc/libvirt/libvirtd.conf too thanks It's virsh you're callling, not libvirtd. -- Guido
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...
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