jerkovicl
9/11/2015 - 11:24 PM

Vagrant on Windows

Vagrant on Windows

#How to use Vagrant on Windows

One example for usage of Vagrant is testing your websites perfomance and look in IE8.
Thx to ModernIE we can download preconfigured images to run with Vagrant. List of all images:

vagrant box add "XPIE6" "http://aka.ms/vagrant-xp-ie6"
vagrant box add "XPIE8" "http://aka.ms/vagrant-xp-ie8"
vagrant box add "VistaIE7" "http://aka.ms/vagrant-vista-ie7"
vagrant box add "Win7IE8" "http://aka.ms/vagrant-win7-ie8"
vagrant box add "Win7IE9" "http://aka.ms/vagrant-win7-ie9"
vagrant box add "Win7IE10" "http://aka.ms/vagrant-win7-ie10"
vagrant box add "Win7IE11" "http://aka.ms/vagrant-win7-ie11"
vagrant box add "Win8IE10" "http://aka.ms/vagrant-win8-ie10"
vagrant box add "Win8.1IE11" "http://aka.ms/vagrant-win8.1-ie11"

To cut the story short here are some instructions to follow:

  • Step 1 - Install Vagrant and necessary plugins with powershell script located here:
  • Step 2 - After instalation is complete, restart your pc
  • Step 3 - Using your command prompt cd to your project folder and write these commands (make sure you have enough disk space before running them):
  • vagrant box add "Win7IE8" "http://aka.ms/vagrant-win7-ie8"
  • vagrant init "Win7IE8" //this will create preconfigured Vagrantfile
  • find the Vagrantfile and uncomment the part about VirtualBox GUI, so that file looks like this:
  config.vm.provider "virtualbox" do |vb|
 #   # Display the VirtualBox GUI when booting the machine
vb.gui = true
 #
 #   # Customize the amount of memory on the VM:
 #   vb.memory = "1024"
end
  • vagrant up
  • Step 4 - To shutdown Vagrant machine you can write vagrant halt