Have a fresh install of vagrant (without any plugins installed).
Run vagrant up for the first time.
Actual result
Failure with the following error:
Vagrant:
* Unknown configuration section 'env'.
Full log
```
$ vagrant up
Bringing machine 'laprimaire_2022' up with 'virtualbox' provider...
Bringing machine 'ansible' up with 'virtualbox' provider...
==> laprimaire_2022: Box 'ubuntu/focal64' could not be found. Attempting to find and install...
laprimaire_2022: Box Provider: virtualbox
laprimaire_2022: Box Version: >= 0
==> laprimaire_2022: Loading metadata for box 'ubuntu/focal64'
laprimaire_2022: URL: https://vagrantcloud.com/ubuntu/focal64
==> laprimaire_2022: Adding box 'ubuntu/focal64' (v20210401.0.0) for provider: virtualbox
laprimaire_2022: Downloading: https://vagrantcloud.com/ubuntu/boxes/focal64/versions/20210401.0.0/providers/virtualbox.box
Download redirected to host: cloud-images.ubuntu.com
==> laprimaire_2022: Successfully added box 'ubuntu/focal64' (v20210401.0.0) for 'virtualbox'!
==> laprimaire_2022: Importing base box 'ubuntu/focal64'...
==> laprimaire_2022: Matching MAC address for NAT networking...
==> laprimaire_2022: Checking if box 'ubuntu/focal64' version '20210401.0.0' is up to date...
==> laprimaire_2022: Setting the name of the VM: github-democratech-2022_laprimaire_2022_1617635108546_63096
==> laprimaire_2022: Clearing any previously set network interfaces...
==> laprimaire_2022: Preparing network interfaces based on configuration...
laprimaire_2022: Adapter 1: nat
laprimaire_2022: Adapter 2: hostonly
==> laprimaire_2022: Forwarding ports...
laprimaire_2022: 22 (guest) => 2222 (host) (adapter 1)
==> laprimaire_2022: Running 'pre-boot' VM customizations...
==> laprimaire_2022: Booting VM...
==> laprimaire_2022: Waiting for machine to boot. This may take a few minutes...
laprimaire_2022: SSH address: 127.0.0.1:2222
laprimaire_2022: SSH username: vagrant
laprimaire_2022: SSH auth method: private key
laprimaire_2022: Warning: Connection reset. Retrying...
laprimaire_2022: Warning: Remote connection disconnect. Retrying...
laprimaire_2022:
laprimaire_2022: Vagrant insecure key detected. Vagrant will automatically replace
laprimaire_2022: this with a newly generated keypair for better security.
laprimaire_2022:
laprimaire_2022: Inserting generated public key within guest...
laprimaire_2022: Removing insecure key from the guest if it's present...
laprimaire_2022: Key inserted! Disconnecting and reconnecting using new SSH key...
==> laprimaire_2022: Machine booted and ready!
==> laprimaire_2022: Checking for guest additions in VM...
==> laprimaire_2022: Setting hostname...
==> laprimaire_2022: Configuring and enabling network interfaces...
==> laprimaire_2022: Mounting shared folders...
laprimaire_2022: /vagrant => /home/jerome/CDocuments/github-democratech-2022
==> ansible: Box 'ubuntu/focal64' could not be found. Attempting to find and install...
ansible: Box Provider: virtualbox
ansible: Box Version: >= 0
==> ansible: Loading metadata for box 'ubuntu/focal64'
ansible: URL: https://vagrantcloud.com/ubuntu/focal64
==> ansible: Adding box 'ubuntu/focal64' (v20210401.0.0) for provider: virtualbox
There are errors in the configuration of this machine. Please fix
the following errors and try again:
Vagrant:
* Unknown configuration section 'env'.
```
Expected result
Successful vagrant up.
Fix suggestion
This happened because the plugin vagrant-env was not installed.
I suggest adding the following line to the Vagrantfile above line 28:
config.vagrant.plugins = {"vagrant-env" => {"version" => "0.0.3"}}
How to reproduce
vagrant up
for the first time.Actual result
Failure with the following error:
Full log
``` $ vagrant up Bringing machine 'laprimaire_2022' up with 'virtualbox' provider... Bringing machine 'ansible' up with 'virtualbox' provider... ==> laprimaire_2022: Box 'ubuntu/focal64' could not be found. Attempting to find and install... laprimaire_2022: Box Provider: virtualbox laprimaire_2022: Box Version: >= 0 ==> laprimaire_2022: Loading metadata for box 'ubuntu/focal64' laprimaire_2022: URL: https://vagrantcloud.com/ubuntu/focal64 ==> laprimaire_2022: Adding box 'ubuntu/focal64' (v20210401.0.0) for provider: virtualbox laprimaire_2022: Downloading: https://vagrantcloud.com/ubuntu/boxes/focal64/versions/20210401.0.0/providers/virtualbox.box Download redirected to host: cloud-images.ubuntu.com ==> laprimaire_2022: Successfully added box 'ubuntu/focal64' (v20210401.0.0) for 'virtualbox'! ==> laprimaire_2022: Importing base box 'ubuntu/focal64'... ==> laprimaire_2022: Matching MAC address for NAT networking... ==> laprimaire_2022: Checking if box 'ubuntu/focal64' version '20210401.0.0' is up to date... ==> laprimaire_2022: Setting the name of the VM: github-democratech-2022_laprimaire_2022_1617635108546_63096 ==> laprimaire_2022: Clearing any previously set network interfaces... ==> laprimaire_2022: Preparing network interfaces based on configuration... laprimaire_2022: Adapter 1: nat laprimaire_2022: Adapter 2: hostonly ==> laprimaire_2022: Forwarding ports... laprimaire_2022: 22 (guest) => 2222 (host) (adapter 1) ==> laprimaire_2022: Running 'pre-boot' VM customizations... ==> laprimaire_2022: Booting VM... ==> laprimaire_2022: Waiting for machine to boot. This may take a few minutes... laprimaire_2022: SSH address: 127.0.0.1:2222 laprimaire_2022: SSH username: vagrant laprimaire_2022: SSH auth method: private key laprimaire_2022: Warning: Connection reset. Retrying... laprimaire_2022: Warning: Remote connection disconnect. Retrying... laprimaire_2022: laprimaire_2022: Vagrant insecure key detected. Vagrant will automatically replace laprimaire_2022: this with a newly generated keypair for better security. laprimaire_2022: laprimaire_2022: Inserting generated public key within guest... laprimaire_2022: Removing insecure key from the guest if it's present... laprimaire_2022: Key inserted! Disconnecting and reconnecting using new SSH key... ==> laprimaire_2022: Machine booted and ready! ==> laprimaire_2022: Checking for guest additions in VM... ==> laprimaire_2022: Setting hostname... ==> laprimaire_2022: Configuring and enabling network interfaces... ==> laprimaire_2022: Mounting shared folders... laprimaire_2022: /vagrant => /home/jerome/CDocuments/github-democratech-2022 ==> ansible: Box 'ubuntu/focal64' could not be found. Attempting to find and install... ansible: Box Provider: virtualbox ansible: Box Version: >= 0 ==> ansible: Loading metadata for box 'ubuntu/focal64' ansible: URL: https://vagrantcloud.com/ubuntu/focal64 ==> ansible: Adding box 'ubuntu/focal64' (v20210401.0.0) for provider: virtualbox There are errors in the configuration of this machine. Please fix the following errors and try again: Vagrant: * Unknown configuration section 'env'. ```Expected result
vagrant up
.Fix suggestion
vagrant-env
was not installed.config.vagrant.plugins = {"vagrant-env" => {"version" => "0.0.3"}}