Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"vagrant sandbox on" return "connection to libvirt error" #59

Open
GSergeevich opened this issue Aug 28, 2018 · 1 comment
Open

"vagrant sandbox on" return "connection to libvirt error" #59

GSergeevich opened this issue Aug 28, 2018 · 1 comment

Comments

@GSergeevich
Copy link

GSergeevich commented Aug 28, 2018

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

@dthpulse
Copy link

dthpulse commented Apr 9, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants