sahara
sahara copied to clipboard
"vagrant sandbox on" return "connection to libvirt error"
german@german-HP-ProDesk:~/vagrant/nop$ vagrant sandbox on Error while connecting to libvirt: Error making a connection to libvirt URI qemu://localhost/system?no_verify=1&keyfile=/home/german/.ssh/id_rsa: Call to virConnectOpen failed: Cannot read CA certificate '/etc/pki/CA/cacert.pem': No such file or directory
Only if I set :
config.vm.provider :libvirt do |libvirt|
libvirt.driver = "kvm"
libvirt.host = ''
in Vagrantfile ,it works for me.
Perhaps it's worth adding the ** uri ** option from the vagrant-libvirt provider for an accurate definition :
libvirt https://github.com/vagrant-libvirt/vagrant-libvirt#provider-options
Now the option has no effect :
config.vm.provider :libvirt do |libvirt|
libvirt.driver = "kvm"
libvirt.uri = "qemu:///system"
german@german-HP-ProDesk:~/vagrant/nop$ vagrant sandbox on Error while connecting to libvirt: Error making a connection to libvirt URI qemu://localhost/system?no_verify=1&keyfile=/home/german/.ssh/id_rsa: Call to virConnectOpen failed: Cannot read CA certificate '/etc/pki/CA/cacert.pem': No such file or directory
just change the line
conn_attr[:libvirt_uri] = uri
to
conn_attr[:libvirt_uri] = 'qemu:///system'
in file
/qemu/vagrant/.vagrant.d/gems/2.6.5/gems/sahara-0.0.17/lib/sahara/session/libvirt.rb