Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to setup a box with vagrant and libvirt with the following Vagrantfile

Vagrant.configure("2") do |config|
  config.vm.define :test_vm do |test_vm| = "test" :private_network, :ip => ''

  config.vm.provider :libvirt do |libvirt|
    libvirt.driver = "qemu" = "localhost"
    libvirt.connect_via_ssh = false
    libvirt.username = "root"
    libvirt.storage_pool_name = "data"

On RHEL 6.4 I get the following error

Error while connecting to libvirt: Error making a connection to libvirt URI qemu://localhost/system?no_verify=1:
Call to virConnectOpen failed: Unable to import client certificate /etc/pki/CA/cacert.pem

I tried to setup the cert like described here but this didnt change anything.

If i try to connect via ssh vagrant is able to slowly upload the box but afterwards I get the next failure

Call to virDomainCreateWithFlags failed: internal error Process exited while reading console log output: char device redirected to /dev/pts/20
qemu-kvm: -drive file=/local/data/virtualbox/root_1372773363.img,if=none,id=drive-virtio-disk0,format=qcow2: could not open disk image /local/data/virtualbox/root_1372773363.img: Invalid argument

On Fedora 17 or Arch Linux I cannot even install the vagrant-libvirt plugin, because it cannot find the libvirt library (lying under /usr/lib).

Does someone somehow manage to get vagrant working with libvirt or is the libvirt plugin still to alpha?

TIA && have a nice day!


share|improve this question

I too had this same issue. To fix it I had to essentially follow this guide :

Note that the guide has multiple steps and it is LONG. Its not an "easy" fix though once you have the CAcert/key HostCert/key and ClientCert/key all in place, with the correct permissions and the correct ownership, everything works as expected.

thanks for reporting this and I hope this helps.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .