ubuntuvagrantvagrant-plugin

Vagrant how to install 'vagrant-disksize' plugin


On Ubunto 18 and Windows 10 Vagrant could install vagrant-disksize plugin, configured as:

Vagrant.configure("2") do |config|

  config.vagrant.plugins = ["vagrant-disksize"]

On Ubuntu 20Lts it does not work, here is an error:

 vagrant up
Vagrant has detected project local plugins configured for this
project which are not installed.

  vagrant-disksize
Install local plugins (Y/N) [N]: Y
Installing the 'vagrant-disksize' plugin. This can take a few minutes...
/usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/environment.rb:1013: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/plugin/manager.rb:116: warning: The called method `install_plugin' is defined here
Traceback (most recent call last):
    16: from /usr/bin/vagrant:23:in `<main>'
    15: from /usr/bin/vagrant:23:in `load'
    14: from /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/bin/vagrant:145:in `<top (required)>'
    13: from /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/bin/vagrant:145:in `new'
    12: from /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/environment.rb:178:in `initialize'
    11: from /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/environment.rb:1004:in `process_configured_plugins'
    10: from /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/environment.rb:1004:in `each'
     9: from /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/environment.rb:1013:in `block in process_configured_plugins'
     8: from /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/plugin/manager.rb:148:in `install_plugin'
     7: from /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/plugin/manager.rb:138:in `block in install_plugin'
     6: from /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/bundler.rb:143:in `install'
     5: from /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/bundler.rb:370:in `internal_install'
     4: from /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/bundler.rb:512:in `activate_solution'
     3: from /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/bundler.rb:512:in `each'
     2: from /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/bundler.rb:515:in `block in activate_solution'
     1: from /usr/lib/ruby/2.7.0/rubygems/specification.rb:1367:in `activate'
/usr/lib/ruby/2.7.0/rubygems/specification.rb:2235:in `check_version_conflict': can't activate vagrant-libvirt-0.1.2, already activated vagrant-libvirt-0.0.45 (Gem::LoadError)

Vagrant is installed from default repositories:

$ vagrant --version
Vagrant 2.2.6

Vagrant is used with VirtualBox. VirtualBox is installed as:

wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib"
sudo apt update && sudo apt install virtualbox-6.1

If it could be an issue.

Current gems:

$ ls /usr/share/rubygems-integration/all/gems/
builder-3.2.4  i18n-1.8.2  mime-types-3.3.1  net-scp-2.0.0  rake-13.0.1  test-unit-3.3.5  vagrant-2.2.6  vagrant-libvirt-0.0.45

What could be possible solutions?


Solution

  • I could install the plugin manually via vagrant plugin install vagrant-disksize command.

    Via Vagrant itself, it is still not working.