1

I'm trying to set up vagrant for the first time in my life while following a tutorial. I'm using the VVCW box because I want to work with WordPress with it. So I downloaded the zip file and unzip it on a folder at my /home and didn't change the default.yml file.

That is the result: (I'm on a Xubuntu 18.04)

fabio@thinkpad:~/Vagrant/vccw$ vagrant up

Bringing machine 'vccw.test' up with 'libvirt' provider... #<Thread:0x000055ef7b1cc6c0@/usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/batch_action.rb:71 run> terminated with exception (report_on_exception is true): Traceback (most recent call last): 25: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/batch_action.rb:82:inblock (2 levels) in run' 24: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/machine.rb:188:in action' 23: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/machine.rb:188:incall' 22: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/environment.rb:592:in lock' 21: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/machine.rb:202:inblock in action' 20: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/machine.rb:227:in action_raw' 19: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/runner.rb:66:inrun' 18: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/util/busy.rb:19:in busy' 17: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/runner.rb:66:inblock in run' 16: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/builder.rb:116:in call' 15: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:incall' 14: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/builtin/config_validate.rb:25:in call' 13: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:incall' 12: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/builtin/box_check_outdated.rb:31:in call' 11: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:incall' 10: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/builtin/call.rb:52:in call' 9: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/builder.rb:170:into_app' 8: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/builder.rb:170:in new' 7: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:20:ininitialize' 6: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:20:in map' 5: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:20:inblock in initialize' 4: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:90:in finalize_action' 3: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:90:innew' 2: from /usr/share/rubygems-integration/all/gems/vagrant-libvirt-0.0.43/lib/vagrant-libvirt/action/create_networks.rb:26:in initialize' 1: from /usr/share/rubygems-integration/all/gems/vagrant-libvirt-0.0.43/lib/vagrant-libvirt/driver.rb:40:inconnection' /usr/share/rubygems-integration/all/gems/vagrant-libvirt-0.0.43/lib/vagrant-libvirt/driver.rb:43:in rescue in connection': Error while connecting to libvirt: Error making a connection to libvirt URI qemu:///system?no_verify=1&keyfile=/home/fabio/.ssh/id_rsa: (VagrantPlugins::ProviderLibvirt::Errors::FogLibvirtConnectionError) Call to virConnectOpen failed: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory Error while connecting to libvirt: Error making a connection to libvirt URI qemu:///system?no_verify=1&keyfile=/home/fabio/.ssh/id_rsa: Call to virConnectOpen failed: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory

I just tried with another box and the same error happened.

Someone can help me? Thanks a lot!

Edit-1: looking for the error elsewhere, I just installed vagrant-libvirt plugin.

fabio@thinkpad:~/Vagrant/teste$ vagrant plugin install vagrant-libvirt Installing the 'vagrant-libvirt' plugin. This can take a few minutes... Installed the plugin 'vagrant-libvirt (0.0.43)'!

But when I did vagrant up, the same error was shown. :(

Edit-2: I followed instructions and did that:

$ vagrant plugin install vagrant-libvirt $ sudo apt install qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils virt-manager $ sudo adduser fabio libvirt $ sudo adduser fabio libvirt-qemu $ sudo /etc/init.d/libvirtd restart

The error persists the same... :(

2 Answers 2

1

I just discovered the issue

I'm using VirtualBox version 6.0 from the repositories and the Vagrant version of the repositories isn't the latest version so the conflict.

So first I removed vagrant with

sudo apt --purge remove vagrant

sudo apt autoremove

After that I downloaded the final release of Vagrant from here and installed:

sudo dpkg -i vagrant_x.x.x_x86_64.deb

The installation was pretty fast and so I call for the Vagrant version to be sure it was installed:

vagrant version

I got this output:

Vagrant failed to initialize at a very early stage:

The plugins failed to initialize correctly. This may be due to manual modifications made within the Vagrant home directory. Vagrant can attempt to automatically correct this issue by running:

vagrant plugin repair

If Vagrant was recently updated, this error may be due to incompatible versions of dependencies. To fix this problem please remove and re-install all plugins. Vagrant can attempt to do this automatically by running:

vagrant plugin expunge --reinstall

Or you may want to try updating the installed plugins to their latest versions:

vagrant plugin update

Error message given during initialization: Unable to resolve dependency: user requested 'vagrant-libvirt (= 0.0.43)'

So I decided (actually remembered) to uninstall vagrant-libvirt:

sudo apt --purge remove vagrant-libvirt

Did a sudo apt update - just in case...

and vagrant up again.

And It works!!!!!!! :)

1
  • 1
    Worked like a charm running Ubuntu 18.04, VirtualBox 6.0.10. Upgraded to Vagrant 2.2.5 and the problems disappeared. Many thanks FabioB!
    – dougB
    Jul 20, 2019 at 1:32
0

I had the same error starting with Vagrant failed to initialize at a very early stage: and ending with Error message given during initialization: Unable to resolve dependency: user requested 'vagrant-libvirt (= 0.12.0)'.

Additionally, I had the issue of Plugin 'vagrant-proxyconf' not found.

I was already on the newest Vagrant version (2.3.6), so it was not an issue of having a too old Vagrant version. libvirt seemed installed and active as a virsh command worked:

# virsh list --all
 Id   Name   State
--------------------

As you did, I tried dnf remove vagrant-libvirt, but got No match for argument: vagrant-libvirt

After reading vagrant libvirt documentation, an older version (2.2.19) of Vagrant was installed and this worked! It seems like vagrant-libvirt is not yet supported on Vagrant version 2.6.6 yet. Thus, using an older Vagrant version <2.3 is the solution.

You must log in to answer this question.

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