vagrant plugin install libvirt fails

Created on 23 Jan 2018  ·  11Comments  ·  Source: hashicorp/vagrant

Vagrant version

vagrant -v ==>> Vagrant 2.0.1

Host operating system

uname -r ==>> 4.14.13-300.fc27.x86_64 [Fedora 27]

Guest operating system

vagrant box add --name debian/stretch64 debian/stretch64 --provider libvirt

Vagrantfile

Vagrant.configure(2) do |config|
  config.vm.provider :libvirt do |libvirt|
    ## config.vm.box = "debian/stretch64"
    libvirt.memory = 2048
    libvirt.cpus = 2
  end

  ## Common stuff, independept of the "any" Virtual Provider used!
  ## system('vagrant plugin install vagrant-proxyconf')
  if !Vagrant.has_plugin?("vagrant-proxyconf")
    system('vagrant plugin install vagrant-proxyconf')

    raise("vagrant-proxyconf installed. Run command again.");
  end

  if Vagrant.has_plugin?("vagrant-proxyconf")
    config.proxy.http     = "http://xxx.xxx.xxx.xxxx:yyyy/"
    config.proxy.https    = "http://xxx.xxx.xxx.xxxx:yyyy/"
    config.proxy.no_proxy = "localhost,127.0.0.1,..
  end

  #### Forward port 8888 for the internal REST server 
  config.vm.network :forwarded_port, guest: 8888, host: 8888
  #### Forward port 8010 for the Storage Server
  config.vm.network :forwarded_port, guest: 8010, host: 8010
  #### Forward port 5000 for the KernelCI Frontend Web Server
  config.vm.network :forwarded_port, guest: 5000, host: 5000
  #### Forward port 8080 for the http Lava Frontend Web Server
  config.vm.network :forwarded_port, guest: 8080, host: 8080
  #### Forward port 443 for the https Lava Frontend Web Server
  config.vm.network :forwarded_port, guest: 443, host: 4443
  #### Configure network accessibility for tftp server
  config.vm.network "public_network", use_dhcp_assigned_default_route: true

  config.vm.provision "shell" do |s|
    s.privileged = false
    s.inline = $build
  end

  config.vm.synced_folder ".", "/vagrant", type: "rsync"
end

Debug output

None.

Expected behavior

Build libvirt VM

Actual behavior

[6] Executing the command: **_vagrant up --provider libvirt_**
The provider 'libvirt$' could not be found, but was requested to
back the machine 'default'. Please use a provider that exists.
The above should end with ==> default: KernelCI already configured remove ~/mybbb.dat to force configuration
and a report that the ssh command responded with a non-zero exit status. This is expected!

new KernelCI board at desk ready for use
[user@localhost]$ **_vagrant plugin list_**
vagrant-libvirt (0.0.40)
vagrant-proxyconf (1.5.2)
vagrant-share (1.1.9, system)
[user@localhost]$ vagrant plugin install libvirt
Installing the 'libvirt' plugin. This can take a few minutes...
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:

conflicting dependencies ffi (~ > 0.6.3) and ffi (= 1.9.18)
  Activated ffi-1.9.18
  which does not match conflicting dependency (~ > 0.6.3)

  Conflicting dependency chains:
    ffi (= 1.9.18), 1.9.18 activated

  versus:
    libvirt (> 0), 0.1.0 activated, depends on
    ffi (~ > 0.6.3)
[user@localhost]$ 

Steps to reproduce

See above!

References

None

waiting-reply

Most helpful comment

Hello @ZoranStojsavljevic -

After a second look at your original gist, you are installing the wrong plugin. You want to install vagrant-libvirt, not libvirt.

What you did was:

vagrant plugin install libvirt --debug > output.txt

Which is the incorrect plugin. What you want to install is vagrant-libvirt:

vagrant plugin install vagrant-libvirt

Thanks.

All 11 comments

Debug output here (WARNING - long recording): https://pastebin.com/UbcnP2Lz

Hello @ZoranStojsavljevic - it seems like this might be a duplicate of #8948. Right now the workaround is to run the Vagrant uninstaller, and then reinstall Vagrant. Please do that, and let us know if it solves your problem when you install the libvirt plugin. Thanks!

Nope. It does not work. Here is the outcome of what I did (deletion of vagrant 2.0.1 is not shown in the traces): https://pastebin.com/NTiv1qaZ

It is very ugly problem, with the circular dependencies. For Virtual Box I do not see this problem (as they claim in https://github.com/hashicorp/vagrant/issues/8948), and here I am using advanced Virtual Box 5.2.6 and Vagrant 2.0.1. So, I am able to rebuild from scratch Hashicorp generic debian/stretch64 for --provider virtualbox, and insert several complex packages to the stretch64 VBox VM with complex Vagrantfile (using ansible playbook scripts), built especially for test purposes!

Output (from pastebin) spaks for itself, does it?!

Zoran

@ZoranStojsavljevic - When you run sudo dnf remove vagrant, is there anything inside of the folder /opt/vagrant? And if so, does this folder exist with gems inside? /opt/vagrant/embedded/gems/gems

Thanks!

Please, @briancain - See for yourself: https://pastebin.com/FJWXNGCs

Two things here:
[1] You need to notify people that vagrant with VBox happily works (it works for me);
[2] You should conduct your own testing, your requests are eating my time!

Thank you,
Zoran

Hello @ZoranStojsavljevic -

After a second look at your original gist, you are installing the wrong plugin. You want to install vagrant-libvirt, not libvirt.

What you did was:

vagrant plugin install libvirt --debug > output.txt

Which is the incorrect plugin. What you want to install is vagrant-libvirt:

vagrant plugin install vagrant-libvirt

Thanks.

Hello @briancain,

I am sure I have checked everything WITHOUT libvirt plugin (using ONLY vagrant-libvirt), but the system is still asking for libvirt plugin (which should, since one would like to use virsh and standalone libvirt, doesn't he???).

So here we have already major failure with vagrant: libvirt MUST be used/live together with vagrant-libvirt, by obvious logic (what is Hashicorp logic here, any clue?)!

Your reasons for closing this tickets are very vague, don't they???

Let me do some magic over the weekend and check upon all of this. ;-)

Zoran

Hi there,

The vagrant-libvirt plugin is a third party plugin and not part of Vagrant, nor maintained by the Vagrant team. As @briancain pointed out in the last comment, you are attempting to install a plugin with the incorrect name. The name of the plugin you want is vagrant-libvirt. The plugin you attempted to install was libvirt.

The libvirt RubyGem package is not a Vagrant plugin, nor is it a dependency of the vagrant-libvirt plugin. The libvirt RubyGem was last released in 2010, and is no longer being maintained. It is also not a valid Vagrant plugin, and as such there is little value in installing it as a plugin.

The root cause of your issue can be fixed by installing the correct plugin:

vagrant plugin install vagrant-libvirt

Any other problems with the vagrant-libvirt plugin should be directed to the plugin author.

Cheers!

Hello @chrisroberts,

Thank you many times for taking some time, to explain to me the problem. It is all very clear to me, now, after you wrote the following: _"The libvirt RubyGem was last released in 2010, and is no longer being maintained."_

All this, what I see now, makes sense, all the way:

The error from Bundler is:

conflicting dependencies ffi (~ > 0.6.3) and ffi (= 1.9.18)
  Activated ffi-1.9.18
  which does not match conflicting dependency (~ > 0.6.3)

  Conflicting dependency chains:
    ffi (= 1.9.18), 1.9.18 activated

  versus:
    libvirt (> 0), 0.1.0 activated, depends on
    ffi (~ > 0.6.3)

_ffi (~ > 0.6.3) and ffi (= 1.9.18)_! Well... vagrant-libvirt and outdated libvirt have conflicting dependencies!?

Thank you again,
Zoran

So basically the vagrant plugin install foo would try to install foo gem without having any knowledge if that was ever a plugin or so. 🤔

I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RobertSwirsky picture RobertSwirsky  ·  3Comments

rrzaripov picture rrzaripov  ·  3Comments

lebogan picture lebogan  ·  3Comments

DreadPirateShawn picture DreadPirateShawn  ·  3Comments

StefanScherer picture StefanScherer  ·  3Comments