vagrant up command stuck at checking if box is up to date - How to solve

The Objective

How to solve the situation where the vagrant up command gets stuck while checking if box is up to date .

By default when you bring up the virtual machine provisioned with vagrant using vagrant up command.vagrant will look for the updates associated with the box and make sure it is up to date.

This can be controlled by your Vagrantfile

The Fix

By default this update checking feature is enabled for all the new VMs being created with Vagrant unless you explicitly disable it by adding the following line into your vagrant file

config.vm.box_check_update = false

After adding this property in Vagrantfile,  vagrant up command will not check for the new updates as it brings up the virtual machines

The Sample Vagrantfile with  this feature enabled.


This Vagrant file created web server and application servers with two different boxes and two different configurations.

you can notice that we have added the  config.vm.box_check_update = false  in both web and app server provisioning segments.

Hope it helps.

Cheers

Sarav AK