Vagrant 2.2.19 support?

I’m trying to get started with Trellis (and Vagrant, as my experience with that is pretty thin), and I’m wondering about the maximum supported version of Vagrant?

The short version of what I’m seeing right now is:

% trellis check
Checking Trellis requirements...

Required:

[✓] Python [>= 3.8.0]: 3.8.13

Optional:

[✓] Vagrant [>= 2.1.0]: 2.2.19
[✓] VirtualBox [>= 4.3.10]: 6.1.32r149290

See requirements documentation for more information:
https://docs.roots.io/trellis/master/installation/#install-requirements

However, when I try to run trellis up on the project I created yesterday, I see:

% trellis up
Starting galaxy role install process
- composer (1.9.0) is already installed, skipping.
- ntp (2.2.0) is already installed, skipping.
- logrotate (v0.0.5) is already installed, skipping.
- swapfile (v2.0.32) is already installed, skipping.
- mailhog (2.2.0) is already installed, skipping.

Running command => vagrant up
Vagrant failed to initialize at a very early stage:

This Vagrant environment has specified that it requires the Vagrant
version to satisfy the following version requirements:

  >= 2.1.0, < 2.2.19

You are running Vagrant 2.2.19, which does not satisfy
these requirements. Please change your Vagrant version or update
the Vagrantfile to allow this Vagrant version. However, be warned
that if the Vagrantfile has specified another version, it probably has
good reason to do so, and changing that may cause the environment to
not function properly.
exit status 1

Is support for Vagrant 2.2.19 coming soon, or is there some aspect of it that prevents support (and thus I should try downgrading to an earlier release) ?

Sidenote: If there is a better place to ask questions like this, I’m happy to ask there. It felt like this question was better suited for this forum, rather than an issue in the GitHub repo (I’m not sure this is a bug in Trellis so much as a problem I’m running into)

It’s technically a small bug because the version constraints are out of sync between the two (trellis and trellis-cli). So the developer experience can be confusing as you’ve just found.

2.2.19 is supported by Trellis, but that version of Vagrant itself is actually broken for most people so we decided to prevent that confusion.

If you want to use 2.2.19, then follow these two steps:

  1. change this line in Vagrantfile to >= 2.1.0
  2. apply this fix vagrant 2.2.19 nfs folders uninitialized constant error on Mac OS · Issue #12583 · hashicorp/vagrant · GitHub
2 Likes

Great, thanks! Those steps appear to have gotten me over that hump. I’m watching the provisioning steps scroll by right now, so fingers crossed.

Hi @swalkinshaw

I’m also just trying out trellis for the first time. I’m using:

vagrant_box: 'jeffnoxon/ubuntu-20.04-arm64' vagrant_box_version: '>= 1.0.0' vagrant_ansible_version: '2.10.7' vagrant_ansible_python_interpreter: '/usr/bin/python3'

Is a newer version of vagrant better or does it not matter?

my golden rule with Vagrant is “if its working, never upgrade”. So depends if you need a specific fix or not.

1 Like