Installation of plugin fails with strange: Unable to resolve dependency

Dear all,

I just start with vagrant. I maintain the gitlab port for FreeBSD and use here vagrant to spin up a virtual machine to test the gitlab FreeBSD package.
The problem is now, that the disc for virtualbox is to small to allow a gitlab installation.

I searched and for vagrant there is a plugin available called vagrant-disksize (https://github.com/sprotheroe/vagrant-disksize).

Regarding there installation I should execute: vagrant plugin install vagrant-disksize

But I get this not clear error message:

vagrant plugin install vagrant-disksize
==> vagrant: A new version of Vagrant is available: 2.2.8 (installed version: 2.2.7)!
==> vagrant: To upgrade visit: https://www.vagrantup.com/downloads.html

Installing the 'vagrant-disksize' plugin. This can take a few minutes...
Vagrant failed to properly resolve required dependencies. These
errors can commonly be caused by misconfigured plugin installations
or transient network issues. The reported error is:

Unable to resolve dependency: 'gitlab-puma_worker_killer (= 0.1.1.gitlab.1)' requires 'gitlab-puma (>= 2.7, < 5)'

There are hundreds of gems installed which are required for gitlab, but what has this to do with vagrant.

I also created a new FreeBSD package for this plugin, but the package does install the rubygem only to /usr/local/lib/ruby/gems/2.6/gems/vagrant-disksize-0.1.3/ but I have no idea, how I can register this plugin with vagrant without getting this error message.

Could you please point me in the right direction to fix this problem or how I can register the plugin without getting the strange error message and not downloading anything but use the files locally available?

Thanks a lot.
Matthias

Hey there,

How did you initially install Vagrant? Official Vagrant packages have their own gem folder to prevent any collisions with outside gems like gitlab, and sometimes third party packages use system ruby instead of an isolated folder.

However, I’d like to recommend to you the official supported way of managing and increasing disk size: https://www.vagrantup.com/docs/disks/usage.html

Then once the experimental flag has been enabled, you should be able to manage disks with the virtualbox provider without any external plugins.

I installed vagrant using pkg on FreeBSD with pkg install vagrant.

I tried the experimental feature, but it is seems it will not work with virtualbox:
╰─ vagrant up
==> vagrant: You have enabled the experimental flag with all features enabled.
==> vagrant: Please use with caution, as some of the features may not be fully
==> vagrant: functional yet.
Bringing machine ‘default’ up with ‘virtualbox’ provider…
==> default: Box ‘freebsd/FreeBSD-12.1-RELEASE’ could not be found. Attempting to find and install…
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Loading metadata for box ‘freebsd/FreeBSD-12.1-RELEASE’
default: URL: https://vagrantcloud.com/freebsd/FreeBSD-12.1-RELEASE
==> default: Adding box ‘freebsd/FreeBSD-12.1-RELEASE’ (v2019.11.01) for provider: virtualbox
default: Downloading: https://vagrantcloud.com/freebsd/boxes/FreeBSD-12.1-RELEASE/versions/2019.11.01/providers/virtualbox.box
default: Download redirected to host: vagrantcloud-files-production.s3.amazonaws.com
==> default: Successfully added box ‘freebsd/FreeBSD-12.1-RELEASE’ (v2019.11.01) for ‘virtualbox’!
==> default: Importing base box ‘freebsd/FreeBSD-12.1-RELEASE’…
==> default: Matching MAC address for NAT networking…
==> default: Checking if box ‘freebsd/FreeBSD-12.1-RELEASE’ version ‘2019.11.01’ is up to date…
==> default: Setting the name of the VM: gitlab-vagrant_default_1588944196889_87620
==> default: Clearing any previously set network interfaces…
==> default: Preparing network interfaces based on configuration…
default: Adapter 1: nat
==> default: Forwarding ports…
default: 80 (guest) => 10080 (host) (adapter 1)
default: 22 (guest) => 2223 (host) (adapter 1)
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Guest provider ‘virtualbox’ does not support the disk feature, and will not use the disk configuration defined.

You’ll need to use Vagrant version 2.2.9+ for it to work with VirtualBox.

Thanks, I will wait for the update to arrive on FreeBSD and will retest it then again.

The vagrant version was now upgraded to 2.2.9 so I gave it again a try.

The vagrant file I use is this one:

But I get the following output:
╰─ VAGRANT_EXPERIMENTAL=“disks” vagrant up
==> vagrant: You have requested to enabled the experimental flag with the following features:
==> vagrant:
==> vagrant: Features: disks
==> vagrant:
==> vagrant: Please use with caution, as some of the features may not be fully
==> vagrant: functional yet.
Bringing machine ‘default’ up with ‘virtualbox’ provider…
==> default: Box ‘freebsd/FreeBSD-12.1-RELEASE’ could not be found. Attempting to find and install…
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Loading metadata for box ‘freebsd/FreeBSD-12.1-RELEASE’
default: URL: https://vagrantcloud.com/freebsd/FreeBSD-12.1-RELEASE
==> default: Adding box ‘freebsd/FreeBSD-12.1-RELEASE’ (v2019.11.01) for provider: virtualbox
default: Downloading: https://vagrantcloud.com/freebsd/boxes/FreeBSD-12.1-RELEASE/versions/2019.11.01/providers/virtualbox.box
Download redirected to host: vagrantcloud-files-production.s3.amazonaws.com
==> default: Successfully added box ‘freebsd/FreeBSD-12.1-RELEASE’ (v2019.11.01) for ‘virtualbox’!
==> default: Importing base box ‘freebsd/FreeBSD-12.1-RELEASE’…
==> default: Matching MAC address for NAT networking…
==> default: Checking if box ‘freebsd/FreeBSD-12.1-RELEASE’ version ‘2019.11.01’ is up to date…
==> default: Setting the name of the VM: gitlab-vagrant_default_1589617657251_57616
==> default: Clearing any previously set network interfaces…
==> default: Preparing network interfaces based on configuration…
default: Adapter 1: nat
==> default: Forwarding ports…
default: 80 (guest) => 10080 (host) (adapter 1)
default: 22 (guest) => 2223 (host) (adapter 1)
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Configuring storage mediums…
default: Disk ‘vagrant_primary’ not found in guest. Creating and attaching disk to guest…
There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["storageattach", "1dacb5d0-9689-49a9-aa5a-db15dc7f597c", "--storagectl", "SATA Controller", "--port", "0", "--device", "0",                                      "--type", "hdd", "--medium", "/usr/home/idefix/VirtualBox VMs/gitlab-vagrant_default_1589617657251_57616/vagrant_primary.vdi", "--co                                     mment", "This disk is managed externally by Vagrant. Removing or adjusting settings could potentially cause issues with Vagrant."]

Stderr: VBoxManage: error: Could not find a controller named 'SATA Controller'

Do I have to define here more to get this auto-disc-resize working?