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_vm.vm.box = "test" test_vm.vm.network :private_network, :ip => '10.20.30.40' end config.vm.provider :libvirt do |libvirt| libvirt.driver = "qemu" libvirt.host = "localhost" libvirt.connect_via_ssh = false libvirt.username = "root" libvirt.storage_pool_name = "data" end end
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 http://libvirt.org/remote.html#Remote_TLS_CA 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!