Last active
August 28, 2018 20:47
-
-
Save elisechant/8f94639b6fda7a793592 to your computer and use it in GitHub Desktop.
Vagrantfile for IE testing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ vagrant box add "XPIE6" "http://aka.ms/vagrant-xp-ie6" | |
$ vagrant init "XPIE6" | |
$ vagrant up | |
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: IE={box} vagrant up | |
# | |
# Eg. IE=XPIE6 vagrant up | |
boxes = { | |
"XPIE6" => "http://aka.ms/vagrant-xp-ie6", | |
"XPIE8" => "http://aka.ms/vagrant-xp-ie8", | |
"VistaIE7" => "http://aka.ms/vagrant-vista-ie7", | |
"Win7IE8" => "http://aka.ms/vagrant-win7-ie8", | |
"Win7IE9" => "http://aka.ms/vagrant-win7-ie9", | |
"Win7IE10" => "http://aka.ms/vagrant-win7-ie10", | |
"Win7IE11" => "http://aka.ms/vagrant-win7-ie11", | |
"Win8IE10" => "http://aka.ms/vagrant-win8-ie10", | |
"Win8.1IE11" => "http://aka.ms/vagrant-win8.1-ie11", | |
} | |
unless boxes.has_key? ENV['IE'] | |
abort('Invalid box supplied') | |
end | |
Vagrant.configure("2") do |config| | |
config.vm.box = ENV['IE'] | |
config.vm.box_url = boxes[ ENV['IE'] ] | |
config.vm.guest = :windows | |
config.vm.boot_timeout = 1 | |
config.vm.communicator = "winrm" | |
config.vm.provider "virtualbox" do |vm| | |
vm.gui = true | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've got an error after the download process:
"==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'win7IE8' (v0) for provider:
box: Downloading: http://aka.ms/ie8.xp.vagrant
box: Download redirected to host: az792536.vo.msecnd.net
box: Progress: 100% (Rate: 1074k/s, Estimated time remaining: --:--:--)
The "metadata.json" file for the box 'win7IE8' was not found.
Boxes require this file in order for Vagrant to determine the
provider it was made for. If you made the box, please add a
"metadata.json" file to it. If someone else made the box, please
notify the box creator that the box is corrupt. Documentation for
box file format can be found at the URL below:
https://www.vagrantup.com/docs/boxes/format.html"
And then after the command "vagrant init win7IE8" I've got the following error:
"Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'win7IE8' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Box file was not detected as metadata. Adding it directly...
==> default: Adding box 'win7IE8' (v0) for provider: virtualbox
default: Downloading: win7IE8
default:
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
Couldn't open file /c:/WORK/VIRTUALMACHINES/ie8/win7IE8"
The box win7IE8 is up to date?