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
3 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

@swalkinshaw could you please give me a suggestion (related to this topic)?
I just bought a new macbook (Apple M1 Pro) and I started to install all the necessary things for trellis. (parallels, vagrant etc)
I saw that it is an old post, but I just jumped into the same issue.
because it is a brand new laptop, I would like to go ahead with the best solution in order to avoid bringing hypothetical incompatibility issues in the future.

today (july 2022), do you recommend installing an earlier Vagrant release (2.2.18) or using the 2.2.19 and doing the 2 steps that you recommend in the previous reply?

which of these options do you recommend the most today?

thanks

I’d probably install 2.2.18 first. If that works as expected, then you have no problems :smile: If it doesn’t, I’d try 2.2.19 and apply that fix/hack.

1 Like

I am running Vagrant 2.2.18 on my m1 macbook. I couldn’t get 2.2.19 working as of the spring. However our site runs on an older version of Trellis.