Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ievms from microsoft cdn #343

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Next Next commit
WIP: Update ievms to use microsoft CDM VMs
DrkCloudStrife committed Jun 29, 2018
commit dd97574857ef477dc36e7e65ffadedc106765618
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
CHANGELOG
---

## unreleased

* Add CHANGELOG with last 2 releases
* Drops support for WinXP, WinVista, IE6 & IE7

## v0.3.3

* https://github.com/xdissent/ievms/compare/v0.3.2...v0.3.3

## v0.3.2

* https://github.com/xdissent/ievms/compare/v0.3.1...v0.3.2
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
Overview
========

Microsoft provides virtual machine disk images to facilitate website testing
in multiple versions of IE, regardless of the host operating system.
With a single command, you can have IE6, IE7, IE8,
IE9, IE10, IE11 and MSEdge running in separate virtual machines.
Microsoft provides virtual machine disk images to facilitate website testing
in multiple versions of IE, regardless of the host operating system.
With a single command, you can have IE8, IE9, IE10, IE11
and MSEdge running in separate virtual machines.

[![Click here to lend your support to ievms and make a donation at pledgie.com!](http://pledgie.com/campaigns/15995.png?skin_name=chrome)](http://pledgie.com/campaigns/15995)


Quickstart
==========

Just paste this into a terminal:
Just paste this into a terminal:

curl -s https://raw.githubusercontent.com/xdissent/ievms/master/ievms.sh | bash

@@ -35,7 +35,7 @@ Installation

**2.)** Download and unpack ievms:

* To install IE versions 6, 7, 8, 9, 10, 11 and EDGE use:
* To install IE versions 8, 9, 10, 11 and EDGE use:

curl -s https://raw.githubusercontent.com/xdissent/ievms/master/ievms.sh | bash

@@ -47,9 +47,9 @@ Installation

**4.)** Choose ievms image from Virtual Box.

The OVA images are massive and can take hours or tens of minutes to
The OVA images are massive and can take hours or tens of minutes to
download, depending on the speed of your internet connection. You might want
to start the install and then go catch a movie, or maybe dinner, or both.
to start the install and then go catch a movie, or maybe dinner, or both.


Recovering from a failed installation
@@ -73,7 +73,7 @@ To specify where the VMs are installed, use the `INSTALL_PATH` variable:
Passing additional options to curl
----------------------------------

The `curl` command is passed any options present in the `CURL_OPTS`
The `curl` command is passed any options present in the `CURL_OPTS`
environment variable. For example, you can set a download speed limit:

curl -s https://raw.githubusercontent.com/xdissent/ievms/master/ievms.sh | env CURL_OPTS="--limit-rate 50k" bash
@@ -107,7 +107,7 @@ A full ievms install will require approximately 69G:
4.5M unar
4.1M unar1.5.zip
69G total

You may remove all files except `*.vmdk` after installation and they will be
re-downloaded if ievms is run again in the future:

@@ -135,7 +135,7 @@ A full installation will download roughly 12.5G of data.
amount of space and bandwidth. If it is disabled (`REUSE_XP=no`) the disk space
required climbs to 95G (49G if cleaned post-install) and around 22G will be
downloaded. Reusing the Win7 VM on the other hand (also the default), saves
tons of bandwidth but pretty much breaks even on disk space. Disable it with
tons of bandwidth but pretty much breaks even on disk space. Disable it with
`REUSE_WIN7=no`.


@@ -147,7 +147,7 @@ Clean Snapshot
--------------

A snapshot is automatically taken upon install, allowing rollback to the
pristine virtual environment configuration. Anything can go wrong in
pristine virtual environment configuration. Anything can go wrong in
Windows and rather than having to worry about maintaining a stable VM,
you can simply revert to the `clean` snapshot to reset your VM to the
initial state.
@@ -164,7 +164,7 @@ guest control from the host machine.
Resuming Downloads
------------------

~~If one of the comically large files fails to download, the `curl`
~~If one of the comically large files fails to download, the `curl`
command used will automatically attempt to resume where it left off.~~
Unfortunately, the modern.IE download servers do not support resume.

@@ -179,7 +179,7 @@ IE7 and IE8. To save bandwidth, space and time, ievms will reuse
to run the appropriate IE installer within the VM. The `clean` snapshot
includes the updated browser version.

**NOTE:** If you'd like to disable XP VM reuse for IE7 and IE8, set the
**NOTE:** If you'd like to disable XP VM reuse for IE7 and IE8, set the
environment variable `REUSE_XP` to anything other than `yes`:

curl -s https://raw.githubusercontent.com/xdissent/ievms/master/ievms.sh | env REUSE_XP="no" bash
@@ -188,14 +188,14 @@ environment variable `REUSE_XP` to anything other than `yes`:
Reusing Win7 VMs
----------------

Currently there exists a [bug](https://www.virtualbox.org/ticket/11134) in
Currently there exists a [bug](https://www.virtualbox.org/ticket/11134) in
VirtualBox (or possibly elsewhere) that disables guest control after a Windows 8
virtual machine's state is saved. To better support guest control and to
eliminate yet another image download, ievms will re-use the IE9 Win7 image for
IE10 and IE11 by default. In addition, the Win7 VMs are the only ones which can
be successfully "rearmed" to extend the activation period.

**NOTE:** If you'd like to disable Win7 VM reuse for IE10, set the environment
**NOTE:** If you'd like to disable Win7 VM reuse for IE10, set the environment
variable `REUSE_WIN7` to anything other than `yes`:

curl -s https://raw.githubusercontent.com/xdissent/ievms/master/ievms.sh | REUSE_WIN7="no" bash
@@ -219,8 +219,8 @@ script may then use Virtualbox guest controls to manage the VM.

The control ISO is built within a [Vagrant](http://vagrantup.com) Ubuntu VM.
If you'd like to build it yourself, clone the ievms repository, install
Vagrant and run `vagrant up`. The base ntpasswd boot disk will be downloaded,
unpacked and customized within the Vagrant VM. A custom linux kernel is
Vagrant and run `vagrant up`. The base ntpasswd boot disk will be downloaded,
unpacked and customized within the Vagrant VM. A custom linux kernel is
cross-compiled for the image as well.


97 changes: 34 additions & 63 deletions ievms.sh
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ set -o pipefail
# ## Global Variables

# The ievms version.
ievms_version="0.3.3"
ievms_version="0.4.0"

# Options passed to each `curl` command.
curl_opts=${CURL_OPTS:-""}
@@ -340,68 +340,65 @@ install_ie_win7() { # vm url md5
}

# Build an ievms virtual machine given the IE version desired.
# VMs are downloaded from https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/
build_ievm() {
unset archive
unset unit
local prefix="IE"
local suffix=""
local version="${1}"
case $1 in
6|7|8)
os="WinXP"
if [ "${reuse_xp}" != "yes" ]
then
if [ "$1" == "6" ]; then unit="10"; fi
if [ "$1" == "7" ]; then os="Vista"; fi
if [ "$1" == "8" ]; then os="Win7"; fi
else
archive="IE6_WinXP.zip"
unit="10"
fi
6|7)
fail "No longer supports IE6 or IE7"
;;
9) os="Win7" ;;
8|9) os="Win7" ;;
10|11)
if [ "${reuse_win7}" != "yes" ]
then
if [ "$1" == "11" ]; then fail "IE11 is only available if REUSE_WIN7 is set"; fi
os="Win8"
if [ "$1" == "10" ]; then fail "IE10 is only available if REUSE_WIN7 is set"; fi
os="Win81"
else
os="Win7"
archive="IE9_Win7.zip"
fi
;;
EDGE)
prefix="MS"
suffix="_preview"
version="Edge"
os="Win10"
unit="8"
;;
*) fail "Invalid IE version: ${1}" ;;
esac

local vm="${prefix}${version} - ${os}"
local browser="${prefix}${version}"
local vm="${browser} - ${os}"
local def_archive="${vm/ - /_}.zip"
archive=${archive:-$def_archive}
unit=${unit:-"11"}
local ova="`basename "${archive/_/ - }" .zip`${suffix}.ova"

local url
local build_timestamp
if [ "${os}" == "Win10" ]
then
url="https://az792536.vo.msecnd.net/vms/VMBuild_20160802/VirtualBox/MSEdge/MSEdge.Win10_RS1.VirtualBox.zip"
build_timestamp="20180425"
elif [ "${os}" == "Win81" ]
then
build_timestamp="20180102"
else
url="https://az412801.vo.msecnd.net/vhd/IEKitV1_Final/VirtualBox/OSX/${archive}"
build_timestamp="20150916"
fi
local url="https://az792536.vo.msecnd.net/vms/VMBuild_${build_timestamp}/VirtualBox/${browser}/${browser}.${os}.VirtualBox.zip"

local md5
# TODO: get md5 of missing archives once downloaded
case $archive in
IE6_WinXP.zip) md5="3d5b7d980296d048de008d28305ca224" ;;
IE7_Vista.zip) md5="d5269b2220f5c7fb9786dad513f2c05a" ;;
IE8_Win7.zip) md5="21b0aad3d66dac7f88635aa2318a3a55" ;;
IE9_Win7.zip) md5="58d201fe7dc7e890ad645412264f2a2c" ;;
IE10_Win8.zip) md5="cc4e2f4b195e1b1e24e2ce6c7a6f149c" ;;
MSEdge_Win10.zip) md5="467d8286cb8cbed90f0761c3566abdda" ;;
IE8_Win7.zip) md5="" ;;
IE9_Win7.zip) md5="0e1d3669b426fce8b0d772665f113302" ;;
IE10_Win7.zip) md5="21d0dee59fd11bdfce237864ef79063b" ;;
IE11_Win7.zip) md5="" ;;
IE11_Win81.zip) md5="" ;;
MSEdge_Win10.zip) md5="" ;;
esac

log "Checking for existing OVA at ${ievms_home}/${ova}"
@@ -435,35 +432,9 @@ build_ievm() {
fi
}

# Build the IE6 virtual machine.
build_ievm_ie6() {
boot_auto_ga "IE6 - WinXP"
set_xp_password "IE6 - WinXP"
shutdown_xp "IE6 - WinXP"
}

# Build the IE7 virtual machine, reusing the XP VM if requested (the default).
build_ievm_ie7() {
if [ "${reuse_xp}" != "yes" ]
then
boot_auto_ga "IE7 - Vista"
else
boot_auto_ga "IE7 - WinXP"
set_xp_password "IE7 - WinXP"
install_ie_xp "IE7 - WinXP" "http://download.microsoft.com/download/3/8/8/38889dc1-848c-4bf2-8335-86c573ad86d9/IE7-WindowsXP-x86-enu.exe" "ea16789f6fc1d2523f704e8f9afbe906"
fi
}

# Build the IE8 virtual machine, reusing the XP VM if requested (the default).
build_ievm_ie8() {
if [ "${reuse_xp}" != "yes" ]
then
boot_auto_ga "IE8 - Win7"
else
boot_auto_ga "IE8 - WinXP"
set_xp_password "IE8 - WinXP"
install_ie_xp "IE8 - WinXP" "http://download.microsoft.com/download/C/C/0/CC0BD555-33DD-411E-936B-73AC6F95AE11/IE8-WindowsXP-x86-ENU.exe" "616c2e8b12aaa349cd3acb38bf581700"
fi
boot_auto_ga "IE8 - Win7"
}

# Build the IE9 virtual machine.
@@ -473,19 +444,19 @@ build_ievm_ie9() {

# Build the IE10 virtual machine, reusing the Win7 VM if requested (the default).
build_ievm_ie10() {
if [ "${reuse_win7}" != "yes" ]
then
boot_auto_ga "IE10 - Win8"
else
boot_auto_ga "IE10 - Win7"
install_ie_win7 "IE10 - Win7" "https://raw.githubusercontent.com/kbandla/installers/master/MSIE/IE10-Windows6.1-x86-en-us.exe" "0f14b2de0b3cef611b9c1424049e996b"
fi
boot_auto_ga "IE10 - Win7"
install_ie_win7 "IE10 - Win7" "https://raw.githubusercontent.com/kbandla/installers/master/MSIE/IE10-Windows6.1-x86-en-us.exe" "0f14b2de0b3cef611b9c1424049e996b"
}

# Build the IE11 virtual machine, reusing the Win7 VM always.
build_ievm_ie11() {
boot_auto_ga "IE11 - Win7"
install_ie_win7 "IE11 - Win7" "http://download.microsoft.com/download/9/2/F/92FC119C-3BCD-476C-B425-038A39625558/IE11-Windows6.1-x86-en-us.exe" "7d3479b9007f3c0670940c1b10a3615f"
if [ "${reuse_win7}" != "yes" ]
then
boot_auto_ga "IE11 - Win81"
else
boot_auto_ga "IE11 - Win7"
install_ie_win7 "IE11 - Win7" "http://download.microsoft.com/download/9/2/F/92FC119C-3BCD-476C-B425-038A39625558/IE11-Windows6.1-x86-en-us.exe" "7d3479b9007f3c0670940c1b10a3615f"
fi
}

# ## Main Entry Point
@@ -498,7 +469,7 @@ check_ext_pack
check_unar

# Install each requested virtual machine sequentially.
all_versions="6 7 8 9 10 11 EDGE"
all_versions="8 9 10 11 EDGE"
for ver in ${IEVMS_VERSIONS:-$all_versions}
do
log "Building IE ${ver} VM"