From 06d7311d857cc59efe42f710af70062af43704cb Mon Sep 17 00:00:00 2001 From: Dave King Date: Thu, 30 May 2013 19:13:42 +0200 Subject: [PATCH 01/34] Prefix envars in README.md with 'env' --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1a0a155..2e5daca 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ Specifying the install path To specify where the VMs are installed, use the `INSTALL_PATH` variable: - curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | INSTALL_PATH="/Path/to/.ievms" bash + curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | env INSTALL_PATH="/Path/to/.ievms" bash Passing additional options to curl @@ -130,7 +130,7 @@ Passing additional options to curl 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.github.com/xdissent/ievms/master/ievms.sh | CURL_OPTS="--limit-rate 50k" bash + curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | env CURL_OPTS="--limit-rate 50k" bash Features @@ -167,7 +167,7 @@ includes the updated browser version. **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.github.com/xdissent/ievms/master/ievms.sh | REUSE_XP="no" bash + curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | env REUSE_XP="no" bash Control ISO From 4bb7cd5b112250de85a45aef5602639ffe6c709a Mon Sep 17 00:00:00 2001 From: Greg Thornton Date: Wed, 12 Jun 2013 09:04:51 -0500 Subject: [PATCH 02/34] GA for all --- control/build.sh | 3 ++ control/deuac.reg | 5 +++ control/reuac.reg | Bin 0 -> 388 bytes control/stage2 | 17 +++++++- control/vboxga.bat | 8 ++++ ievms.sh | 98 +++++++++++++++++++++++++++++++-------------- 6 files changed, 98 insertions(+), 33 deletions(-) create mode 100755 control/deuac.reg create mode 100755 control/reuac.reg create mode 100644 control/vboxga.bat diff --git a/control/build.sh b/control/build.sh index bdeae5e..6edb410 100755 --- a/control/build.sh +++ b/control/build.sh @@ -119,6 +119,9 @@ copy_scripts() { log "Copying scripts" cp "/vagrant/control/stage2" "${initrd}/scripts/" cp "/vagrant/control/ievms.reg" "${initrd}/scripts/" + cp "/vagrant/control/deuac.reg" "${initrd}/scripts/" + cp "/vagrant/control/reuac.reg" "${initrd}/scripts/" + cp "/vagrant/control/vboxga.bat" "${initrd}/scripts/" cp "/vagrant/control/isolinux.cfg" "${remaster_iso}/isolinux.cfg" cp "/vagrant/control/isolinux.cfg" "${remaster_iso}/syslinux.cfg" cp "${kernel}" "${remaster_iso}/" diff --git a/control/deuac.reg b/control/deuac.reg new file mode 100755 index 0000000..482afc8 --- /dev/null +++ b/control/deuac.reg @@ -0,0 +1,5 @@ +Windows Registry Editor Version 5.00 + +[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System] +"EnableLUA"=dword:00000000 +"ConsentPromptBehaviorAdmin"=dword:00000000 diff --git a/control/reuac.reg b/control/reuac.reg new file mode 100755 index 0000000000000000000000000000000000000000..5458616ef150346060e84bc3b99db37d7409cb7a GIT binary patch literal 388 zcmaKo%Sr=L5Jb;f@E<}xK+GZ=!G#V=M57@-f;bY?j5=WM$Q?E0=hc&r3*E?NXu7Jq zs(QXYC)6ZnG%RT8Fs9;3tmTc&Qsh9kwrlJ=T*+tI+CJI$*<#zb$wquP3^;b@nkgro zQLty7GPD+QN1V!*oXZ_@!9;u<$WYA(wHwtN9(62bf2S)|cy}V3A<6&EQZjPyB~)rB z+HhIMB^7gSBVSjq#2xoeRwldDzss&SF5J%6ow#Rp)B5#(_6qr=+S+>*N$0$pV_)o9 T&5!siS;d)ttK|PH_e1#`%tS(9 literal 0 HcmV?d00001 diff --git a/control/stage2 b/control/stage2 index ccd3ecd..f997892 100755 --- a/control/stage2 +++ b/control/stage2 @@ -4,7 +4,20 @@ mkdir /tmp /disk chmod 777 /tmp sh /scripts/prepdriver.sh mdev -s -ntfs-3g /dev/sda1 /disk -o rw,noatime -reged -IC /disk/WINDOWS/system32/config/system HKEY_LOCAL_MACHINE\\SYSTEM /scripts/ievms.reg +if [ -b /dev/sda2 ] +then + ntfs-3g /dev/sda2 /disk -o rw,noatime + reged -IC /disk/Windows/System32/config/SOFTWARE HKEY_LOCAL_MACHINE\\SOFTWARE /scripts/deuac.reg + if [ -d /disk/ProgramData/Microsoft/Windows/Start\ Menu/Programs/Startup ] + then + cp /scripts/vboxga.bat /disk/ProgramData/Microsoft/Windows/Start\ Menu/Programs/Startup/ + else + cp /scripts/vboxga.bat /disk/ProgramData/Microsoft/Windows/Start\ Menu/Programs/StartUp/ + fi + cp /scripts/reuac.reg /disk/reuac.reg +else + ntfs-3g /dev/sda1 /disk -o rw,noatime + reged -IC /disk/WINDOWS/system32/config/system HKEY_LOCAL_MACHINE\\SYSTEM /scripts/ievms.reg +fi umount /disk 2>/dev/null poweroff \ No newline at end of file diff --git a/control/vboxga.bat b/control/vboxga.bat new file mode 100644 index 0000000..8c8bc91 --- /dev/null +++ b/control/vboxga.bat @@ -0,0 +1,8 @@ +cd /d D:\ +cd \cert +VBoxCertUtil.exe add-trusted-publisher oracle-vbox.cer --root oracle-vbox.cer +cd \ +VBoxWindowsAdditions.exe /S +regedit.exe /S C:\reuac.reg +shutdown.exe /s /t 00 +del %0 \ No newline at end of file diff --git a/ievms.sh b/ievms.sh index f22ad7e..2b84d70 100755 --- a/ievms.sh +++ b/ievms.sh @@ -8,6 +8,7 @@ set -o pipefail curl_opts=${CURL_OPTS:-""} reuse_xp=${REUSE_XP:-"yes"} +sleep_wait="10" log() { printf "$*\n" ; return $? ; } @@ -174,18 +175,25 @@ build_ievm() { fi } -build_ievm_xp() { - sleep_wait="10" +wait_for_shutdown() { + x="0" ; until [ "${x}" != "0" ]; do + log "Waiting for ${1} to shutdown..." + sleep "${sleep_wait}" + VBoxManage list runningvms | grep "${1}" >/dev/null && x=$? || x=$? + done + sleep "${sleep_wait}" # Extra sleep for good measure. +} - installer=`basename "${2}"` - installer_host="${ievms_home}/${installer}" - installer_guest="/Documents and Settings/IEUser/Desktop/Install IE${1}.exe" - log "Downloading IE${1} installer from ${2}" - if [[ ! -f "${installer}" ]] && ! curl ${curl_opts} -L "${2}" -o "${installer}" - then - fail "Failed to download ${url} to ${ievms_home}/${installer} using 'curl', error code ($?)" - fi +wait_for_guestcontrol() { + x="1" ; until [ "${x}" == "0" ]; do + log "Waiting for ${1} to be available for guestcontrol..." + sleep "${sleep_wait}" + VBoxManage guestcontrol "${1}" cp "/etc/passwd" "/" --username IEUser --dryrun && x=$? || x=$? + done + sleep "${sleep_wait}" # Extra sleep for good measure. +} +find_iso() { iso_url="https://dl.dropbox.com/u/463624/ievms-control.iso" dev_iso=`pwd`/ievms-control.iso # Use local iso if in ievms dev root if [[ -f "${dev_iso}" ]]; then iso=$dev_iso; else iso="${ievms_home}/ievms-control.iso"; fi @@ -194,32 +202,39 @@ build_ievm_xp() { then fail "Failed to download ${iso_url} to ${ievms_home}/${iso} using 'curl', error code ($?)" fi +} +boot_ievms() { + find_iso log "Attaching ievms.iso" - VBoxManage storageattach "${vm}" --storagectl "IDE Controller" --port 1 --device 0 --type dvddrive --medium "${iso}" + VBoxManage storageattach "${1}" --storagectl "IDE Controller" --port 1 --device 0 --type dvddrive --medium "${iso}" - log "Starting VM ${vm}" - VBoxManage startvm "${vm}" --type headless + log "Starting VM ${1}" + VBoxManage startvm "${1}" --type headless - log "Waiting for ${vm} to shutdown..." - x="0" ; until [ "${x}" != "0" ]; do - sleep "${sleep_wait}" - VBoxManage list runningvms | grep "${vm}" >/dev/null && x=$? || x=$? - done + wait_for_shutdown "${1}" log "Ejecting ievms.iso" - VBoxManage modifyvm "${vm}" --dvd none + VBoxManage modifyvm "${1}" --dvd none +} + +build_ievm_xp() { + installer=`basename "${2}"` + installer_host="${ievms_home}/${installer}" + installer_guest="/Documents and Settings/IEUser/Desktop/Install IE${1}.exe" + log "Downloading IE${1} installer from ${2}" + if [[ ! -f "${installer}" ]] && ! curl ${curl_opts} -L "${2}" -o "${installer}" + then + fail "Failed to download ${url} to ${ievms_home}/${installer} using 'curl', error code ($?)" + fi + + boot_ievms "${vm}" log "Starting VM ${vm}" VBoxManage startvm "${vm}" --type headless - log "Waiting for ${vm} to be available for guestcontrol..." - x="1" ; until [ "${x}" == "0" ]; do - sleep "${sleep_wait}" - VBoxManage guestcontrol "${vm}" cp "${installer_host}" "${installer_guest}" --username IEUser --dryrun && x=$? || x=$? - done + wait_for_guestcontrol "${vm}" - sleep "${sleep_wait}" # Extra sleep for good measure. log "Copying IE${1} installer to Desktop" VBoxManage guestcontrol "${vm}" cp "${installer_host}" "${installer_guest}" --username IEUser @@ -229,13 +244,11 @@ build_ievm_xp() { log "Shutting down VM ${vm}" VBoxManage guestcontrol "${vm}" exec --image "/WINDOWS/system32/shutdown.exe" --username IEUser --wait-exit -- -s -f -t 0 - x="0" ; until [ "${x}" != "0" ]; do - sleep "${sleep_wait}" - log "Waiting for ${vm} to shutdown..." - VBoxManage list runningvms | grep "${vm}" >/dev/null && x=$? || x=$? - done + wait_for_shutdown "${vm}" +} - sleep "${sleep_wait}" # Extra sleep for good measure. +build_ievm_ie6() { + boot_ievms "IE6 - WinXP" } build_ievm_ie7() { @@ -248,6 +261,29 @@ build_ievm_ie8() { build_ievm_xp 8 "http://download.microsoft.com/download/C/C/0/CC0BD555-33DD-411E-936B-73AC6F95AE11/IE8-WindowsXP-x86-ENU.exe" } +build_auto_ga() { + boot_ievms "${1}" + + log "Attaching Guest Additions ISO" + VBoxManage storageattach "${1}" --storagectl "IDE Controller" --port 1 --device 0 --type dvddrive --medium additions + + log "Starting VM ${1}" + VBoxManage startvm "${1}" --type headless + + wait_for_shutdown "${1}" + + log "Ejecting Guest Additions" + VBoxManage modifyvm "${1}" --dvd none +} + +build_ievm_ie9() { + build_auto_ga "IE9 - Win7" +} + +build_ievm_ie10() { + build_auto_ga "IE10 - Win8" +} + check_system create_home check_virtualbox From 72f48ba50150a17f31d1415459fd800d21ab4ecc Mon Sep 17 00:00:00 2001 From: Greg Thornton Date: Wed, 12 Jun 2013 10:49:41 -0500 Subject: [PATCH 03/34] Fix iso path for dev env --- ievms.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ievms.sh b/ievms.sh index 2b84d70..1b2c7af 100755 --- a/ievms.sh +++ b/ievms.sh @@ -9,6 +9,7 @@ set -o pipefail curl_opts=${CURL_OPTS:-""} reuse_xp=${REUSE_XP:-"yes"} sleep_wait="10" +orig_cwd=`pwd` log() { printf "$*\n" ; return $? ; } @@ -195,7 +196,7 @@ wait_for_guestcontrol() { find_iso() { iso_url="https://dl.dropbox.com/u/463624/ievms-control.iso" - dev_iso=`pwd`/ievms-control.iso # Use local iso if in ievms dev root + dev_iso="${orig_cwd}/ievms-control.iso" # Use local iso if in ievms dev root if [[ -f "${dev_iso}" ]]; then iso=$dev_iso; else iso="${ievms_home}/ievms-control.iso"; fi log "Downloading ievms ISO from ${iso_url}" if [[ ! -f "${iso}" ]] && ! curl ${curl_opts} -L "${iso_url}" -o "${iso}" From bfd852162ee1e71b6dbc7151ecb237210d8a098f Mon Sep 17 00:00:00 2001 From: Greg Thornton Date: Wed, 12 Jun 2013 10:51:58 -0500 Subject: [PATCH 04/34] Rename ievms.reg to xp.reg for clarity --- control/build.sh | 2 +- control/stage2 | 2 +- control/{ievms.reg => xp.reg} | Bin 3 files changed, 2 insertions(+), 2 deletions(-) rename control/{ievms.reg => xp.reg} (100%) diff --git a/control/build.sh b/control/build.sh index 6edb410..1819ccd 100755 --- a/control/build.sh +++ b/control/build.sh @@ -118,7 +118,7 @@ extract_initrd() { copy_scripts() { log "Copying scripts" cp "/vagrant/control/stage2" "${initrd}/scripts/" - cp "/vagrant/control/ievms.reg" "${initrd}/scripts/" + cp "/vagrant/control/xp.reg" "${initrd}/scripts/" cp "/vagrant/control/deuac.reg" "${initrd}/scripts/" cp "/vagrant/control/reuac.reg" "${initrd}/scripts/" cp "/vagrant/control/vboxga.bat" "${initrd}/scripts/" diff --git a/control/stage2 b/control/stage2 index f997892..2f73cc2 100755 --- a/control/stage2 +++ b/control/stage2 @@ -17,7 +17,7 @@ then cp /scripts/reuac.reg /disk/reuac.reg else ntfs-3g /dev/sda1 /disk -o rw,noatime - reged -IC /disk/WINDOWS/system32/config/system HKEY_LOCAL_MACHINE\\SYSTEM /scripts/ievms.reg + reged -IC /disk/WINDOWS/system32/config/system HKEY_LOCAL_MACHINE\\SYSTEM /scripts/xp.reg fi umount /disk 2>/dev/null poweroff \ No newline at end of file diff --git a/control/ievms.reg b/control/xp.reg similarity index 100% rename from control/ievms.reg rename to control/xp.reg From 4c88607d18fd579eaa1fceef642e2b550b07354e Mon Sep 17 00:00:00 2001 From: Greg Thornton Date: Wed, 12 Jun 2013 10:52:17 -0500 Subject: [PATCH 05/34] Remove reuac.reg after it's imported --- control/vboxga.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/control/vboxga.bat b/control/vboxga.bat index 8c8bc91..c590b66 100644 --- a/control/vboxga.bat +++ b/control/vboxga.bat @@ -4,5 +4,6 @@ VBoxCertUtil.exe add-trusted-publisher oracle-vbox.cer --root oracle-vbox.cer cd \ VBoxWindowsAdditions.exe /S regedit.exe /S C:\reuac.reg +del C:\reuac.reg shutdown.exe /s /t 00 del %0 \ No newline at end of file From 8a4b9af81dd7307e94724b9ba67e949be72f1eef Mon Sep 17 00:00:00 2001 From: Greg Thornton Date: Wed, 12 Jun 2013 13:16:46 -0500 Subject: [PATCH 06/34] Handle more disk inconsistencies in stage2 --- control/stage2 | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/control/stage2 b/control/stage2 index 2f73cc2..4a47942 100755 --- a/control/stage2 +++ b/control/stage2 @@ -4,20 +4,28 @@ mkdir /tmp /disk chmod 777 /tmp sh /scripts/prepdriver.sh mdev -s + if [ -b /dev/sda2 ] then ntfs-3g /dev/sda2 /disk -o rw,noatime +else + ntfs-3g /dev/sda1 /disk -o rw,noatime +fi + +if [ -d /disk/WINDOWS ] +then + reged -IC /disk/WINDOWS/system32/config/system HKEY_LOCAL_MACHINE\\SYSTEM /scripts/xp.reg +else reged -IC /disk/Windows/System32/config/SOFTWARE HKEY_LOCAL_MACHINE\\SOFTWARE /scripts/deuac.reg + if [ -d /disk/ProgramData/Microsoft/Windows/Start\ Menu/Programs/Startup ] then cp /scripts/vboxga.bat /disk/ProgramData/Microsoft/Windows/Start\ Menu/Programs/Startup/ else cp /scripts/vboxga.bat /disk/ProgramData/Microsoft/Windows/Start\ Menu/Programs/StartUp/ fi + cp /scripts/reuac.reg /disk/reuac.reg -else - ntfs-3g /dev/sda1 /disk -o rw,noatime - reged -IC /disk/WINDOWS/system32/config/system HKEY_LOCAL_MACHINE\\SYSTEM /scripts/xp.reg fi umount /disk 2>/dev/null poweroff \ No newline at end of file From 44a7c125eb000d3e53398681056b37e5df1f9850 Mon Sep 17 00:00:00 2001 From: Greg Thornton Date: Wed, 12 Jun 2013 13:17:16 -0500 Subject: [PATCH 07/34] Add guest additions to non-XP IE7/8 --- ievms.sh | 48 ++++++++++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/ievms.sh b/ievms.sh index 1b2c7af..367121e 100755 --- a/ievms.sh +++ b/ievms.sh @@ -211,7 +211,7 @@ boot_ievms() { VBoxManage storageattach "${1}" --storagectl "IDE Controller" --port 1 --device 0 --type dvddrive --medium "${iso}" log "Starting VM ${1}" - VBoxManage startvm "${1}" --type headless + VBoxManage startvm "${1}" # --type headless wait_for_shutdown "${1}" @@ -219,6 +219,21 @@ boot_ievms() { VBoxManage modifyvm "${1}" --dvd none } +build_auto_ga() { + boot_ievms "${1}" + + log "Attaching Guest Additions ISO" + VBoxManage storageattach "${1}" --storagectl "IDE Controller" --port 1 --device 0 --type dvddrive --medium additions + + log "Starting VM ${1}" + VBoxManage startvm "${1}" # --type headless + + wait_for_shutdown "${1}" + + log "Ejecting Guest Additions" + VBoxManage modifyvm "${1}" --dvd none +} + build_ievm_xp() { installer=`basename "${2}"` installer_host="${ievms_home}/${installer}" @@ -253,28 +268,21 @@ build_ievm_ie6() { } build_ievm_ie7() { - if [ "${reuse_xp}" != "yes" ]; then return; fi - build_ievm_xp 7 "http://download.microsoft.com/download/3/8/8/38889dc1-848c-4bf2-8335-86c573ad86d9/IE7-WindowsXP-x86-enu.exe" + if [ "${reuse_xp}" != "yes" ] + then + build_auto_ga "IE7 - Vista" + else + build_ievm_xp 7 "http://download.microsoft.com/download/3/8/8/38889dc1-848c-4bf2-8335-86c573ad86d9/IE7-WindowsXP-x86-enu.exe" + fi } build_ievm_ie8() { - if [ "${reuse_xp}" != "yes" ]; then return; fi - build_ievm_xp 8 "http://download.microsoft.com/download/C/C/0/CC0BD555-33DD-411E-936B-73AC6F95AE11/IE8-WindowsXP-x86-ENU.exe" -} - -build_auto_ga() { - boot_ievms "${1}" - - log "Attaching Guest Additions ISO" - VBoxManage storageattach "${1}" --storagectl "IDE Controller" --port 1 --device 0 --type dvddrive --medium additions - - log "Starting VM ${1}" - VBoxManage startvm "${1}" --type headless - - wait_for_shutdown "${1}" - - log "Ejecting Guest Additions" - VBoxManage modifyvm "${1}" --dvd none + if [ "${reuse_xp}" != "yes" ] + then + build_auto_ga "IE8 - Win7" + else + build_ievm_xp 8 "http://download.microsoft.com/download/C/C/0/CC0BD555-33DD-411E-936B-73AC6F95AE11/IE8-WindowsXP-x86-ENU.exe" + fi } build_ievm_ie9() { From 9d146b804ac79f202d88ad8e2b8e0523704b1fda Mon Sep 17 00:00:00 2001 From: Greg Thornton Date: Wed, 12 Jun 2013 13:28:32 -0500 Subject: [PATCH 08/34] Missed one env prefix in readme. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2e5daca..15c2a4e 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ Installation * Install specific IE versions (IE7 and IE9 only for example): - curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | IEVMS_VERSIONS="7 9" bash + curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | env IEVMS_VERSIONS="7 9" bash 3. Launch Virtual Box. From 4d5e3d62197d37b4930fc769035037d1acab61b0 Mon Sep 17 00:00:00 2001 From: Greg Thornton Date: Thu, 20 Jun 2013 15:21:50 -0500 Subject: [PATCH 09/34] Working on ie10 bs --- control/activate.xml | Bin 0 -> 2844 bytes control/boot.bat | 1 + control/boot.xml | 43 ++++++++ control/build.sh | 4 + control/rearm.xml | Bin 0 -> 2850 bytes control/stage2 | 4 + control/vboxga.bat | 6 ++ ievms.sh | 229 +++++++++++++++++++++++++++---------------- 8 files changed, 201 insertions(+), 86 deletions(-) create mode 100644 control/activate.xml create mode 100644 control/boot.bat create mode 100644 control/boot.xml create mode 100644 control/rearm.xml diff --git a/control/activate.xml b/control/activate.xml new file mode 100644 index 0000000000000000000000000000000000000000..6992d99c159a47519e95d13860d65e2a54df60a3 GIT binary patch literal 2844 zcmbW3T~8WO5QgWvN&f@!zJT9tLp4-wC9$nhj5pjMAQG3=uvqG!Z~MIGu+XgnV#71^!v3;>MTeqs!`Bsp`)?>bpG`69WURc|{ z*$1?C(Al>=dvEWo!E6_l+h-9s9HRFcqbW}}Hs!gu&sO6}@O6XFu|ulz9WgV(f5Pt? z&8mxLjPA@u)MtK%v}PMbT(>Pob;dPkJLNl_N3}MOvqF3gJHyKmgar8njVWWXZ}Gck zmNFu0rT>+ZkzD0!(Un0g890Agu}Ld;;kr@KWXmp-o{_eG6ZESLvGpw-f!?Z z0lj5MU|c$GyVi04FNjhV5=y9@B1y73BUNgGhar!zd^b^-J#6(UG^5~mC??q zNNgvdXk|oT9lLC)Gu1Cm=DW;9ysvl<9Cq0%kE{xnGnUW!B6&XR4Liq^R*PSWd6}=s z58{rT{N6>SURJzazC9QFDY=NS?~x^CeTYQa8Q4#LGsok#C?U&3&=WjHJX)FO&i{mW zi*@x2e_xS`g*tEKqS`~^d(3C@Z5Ux3@_R=o$m@4TK4;JQ*B} zQrEQ|Pwiu|GsQbK~EO_tY#DX@jb1qMRbgEsXm#`*VOF_Uf+Tc z#-JTSYixP<`xTJZP7$YeM~t<{EUNJ$y}Wmis+~2#UKO3X9!{}~IbNoj$5o%D7|VGz z$Z>fsDegm}(m7dXx0*#5kFu2RX2on3Wuc|^#y*d33dMYcve2&F8EHm}D9bcM%u6`j z5=omC@2!ehi!?%vBkn~5c1WGd{!Y;5J7(_0eMijebZK+CpSvAnHH*-TKMSIJi2wFzTD*A)8SvlcnHfXXXX|E#iEFoGR*unu^3VTWnCO}*43!3_H-dElIKyR SQ|99>^I7s-HJ{#H_v}A+8Og-} literal 0 HcmV?d00001 diff --git a/control/boot.bat b/control/boot.bat new file mode 100644 index 0000000..31342c6 --- /dev/null +++ b/control/boot.bat @@ -0,0 +1 @@ +if exist c:\ievms.bat start c:\ievms.bat \ No newline at end of file diff --git a/control/boot.xml b/control/boot.xml new file mode 100644 index 0000000..88b142b --- /dev/null +++ b/control/boot.xml @@ -0,0 +1,43 @@ + + + + 2013-06-20T12:19:16.22375 + IE9Win7\IEUser + + + + true + + + + + IE9Win7\IEUser + Password + HighestAvailable + + + + IgnoreNew + false + false + false + false + false + + true + false + + true + true + false + false + false + PT0S + 7 + + + + C:\boot.bat + + + \ No newline at end of file diff --git a/control/build.sh b/control/build.sh index 1819ccd..dd48bc0 100755 --- a/control/build.sh +++ b/control/build.sh @@ -122,6 +122,10 @@ copy_scripts() { cp "/vagrant/control/deuac.reg" "${initrd}/scripts/" cp "/vagrant/control/reuac.reg" "${initrd}/scripts/" cp "/vagrant/control/vboxga.bat" "${initrd}/scripts/" + cp "/vagrant/control/activate.xml" "${initrd}/scripts/" + cp "/vagrant/control/rearm.xml" "${initrd}/scripts/" + cp "/vagrant/control/boot.xml" "${initrd}/scripts/" + cp "/vagrant/control/boot.bat" "${initrd}/scripts/" cp "/vagrant/control/isolinux.cfg" "${remaster_iso}/isolinux.cfg" cp "/vagrant/control/isolinux.cfg" "${remaster_iso}/syslinux.cfg" cp "${kernel}" "${remaster_iso}/" diff --git a/control/rearm.xml b/control/rearm.xml new file mode 100644 index 0000000000000000000000000000000000000000..3fead053ef346d6b4858a56b71fa2bf0a6d464ec GIT binary patch literal 2850 zcmbW3T~8WO5QgWvN&f@!zJg!1HB>{@RubD9#dyOF0wNL6uvqJ#Z~MG+Sa%PLh-Sm? z;mpiC^Uloq`1iMJd-lhMHn5WYwyupWvA*5f$iCQ$t=Xzo_?D22tj&A}>BxF6J-3E^ zvkz!}L}$--?Y+ITDzhz6Zk|P4cf{azgr+=Q+l1%NcC5^k;OiQnLq}TW+h=Bs|AgNa znyVho5ZwolsKfjN(z2}+am6+nRT!7ucEWcujcR2YXNmZ#c8ZrC2nq5r8WYB1U*~tl zC~%T)&_8gUF7xuUW*hLYz+YL|g!!6%hJzy5LE|HFe&W4_-WIYgJeDoPP`)zkn%(37 z8n0vU>vjm%g|pkXrvE=DPSr>#v380i$?}|3t1%vWJfZd_>@&_)J8`*c-={h)`XtH8 zLr#i1CA2$U*L;-u%xA1qPIW9^W*uv%tTVJ@ve)wpHtdmzRjCuNd_sRHvmMXgJiQ{? zDHR#nF(_Ia1F()fTk1`9OpW;#GXvh2yt|HFw8|r^LdA^bb3RX=&wAC)@TBz;)?!{3 zD)NK42QI(!sMO7hx5c;Zv7eBO0rqXOq^$RlC_7#I$?w5=ycQ*9c>sEX#{rMl=9&8+ z^RBb9e&O#cQn66y^*yRxB%#MbCf|k;$05JBbb`EoXB2YwoPX^C_r#(qz0NZBT6^Ms z1S54_!+B~a8#!-vX3Tauo7hj5)eGM-M{{~|*3WV_v7gY>%G!XAQ7+Xdlj)keS;FgE z5aJlLLuidH?*6a>(%LEF)b5b6_LzA!o~M`h9#FNjCfKW@6Yt>^dp5_5H1oLXvlL@7 zuPQk%t|i5NKvX&@i|m%Oh~rU~(%oz}TeGs*QhQ^EM|XwUe8jTYuGkrAMrKhKX~vir zaJV6o1}i>T&0@{dh%pYi8Fkqqbt;EjL4)s*xnuwKnb+yk;Iu#U9b-9**h@GIwD$^6 zyYaST73WjCus1z-0;o^gPZ1~FFZRj7h?y>YCNG}KRqh>ucXlRa=c}-Wxo+F%p3|J( zQqntElWaWtI#FM4a1UzoZ@{<*%T>/dev/null poweroff \ No newline at end of file diff --git a/control/vboxga.bat b/control/vboxga.bat index c590b66..4de1f26 100644 --- a/control/vboxga.bat +++ b/control/vboxga.bat @@ -5,5 +5,11 @@ cd \ VBoxWindowsAdditions.exe /S regedit.exe /S C:\reuac.reg del C:\reuac.reg +FOR /F "usebackq" %%i IN (`hostname`) DO SET HOST=%%i +schtasks.exe /create /s %HOST% /ru %HOST%\IEUser /rp Passw0rd! /tn activate /xml C:\activate.xml +schtasks.exe /create /s %HOST% /ru %HOST%\IEUser /rp Passw0rd! /tn rearm /xml C:\rearm.xml +schtasks.exe /create /s %HOST% /ru %HOST%\IEUser /rp Passw0rd! /tn boot /xml C:\boot.xml +schtasks.exe /run /tn activate +timeout /t 30 shutdown.exe /s /t 00 del %0 \ No newline at end of file diff --git a/ievms.sh b/ievms.sh index 367121e..b54c85d 100755 --- a/ievms.sh +++ b/ievms.sh @@ -1,20 +1,40 @@ #!/usr/bin/env bash -# Caution is a virtue +# Caution is a virtue. set -o nounset set -o errtrace set -o errexit set -o pipefail +# ## Gobal Variables + +# Options passed to each `curl` command. curl_opts=${CURL_OPTS:-""} + +# Reuse XP virtual machines for IE versions that are supported. reuse_xp=${REUSE_XP:-"yes"} + +# Reuse Win7 virtual machines for IE versions that are supported. +reuse_win7=${REUSE_WIN7:-"yes"} + +# Timeout interval to wait between checks for various states. sleep_wait="10" + +# Store the original `cwd`. orig_cwd=`pwd` +# ## Utilities + +# Print a message to the console. log() { printf "$*\n" ; return $? ; } +# Print an error message to the console and bail out of the script. fail() { log "\nERROR: $*\n" ; exit 1 ; } +# ## General Setup + +# Create the ievms home folder and `cd` into it. The `INSTALL_PATH` env variable +# is used to determine the full path. create_home() { def_ievms_home="${HOME}/.ievms" ievms_home=${INSTALL_PATH:-$def_ievms_home} @@ -22,12 +42,12 @@ create_home() { mkdir -p "${ievms_home}" cd "${ievms_home}" - # Move old ovas and zips into place: + # Move ovas and zips from a very old installation into place. mv -f ./ova/IE*/IE*.{ova,zip} "${ievms_home}/" 2>/dev/null || true } +# Check for a supported host system (Linux/OS X). check_system() { - # Check for supported system kernel=`uname -s` case $kernel in Darwin|Linux) ;; @@ -35,11 +55,14 @@ check_system() { esac } +# Ensure VirtualBox is installed and `VBoxManage` is on the `PATH`. check_virtualbox() { log "Checking for VirtualBox" hash VBoxManage 2>&- || fail "VirtualBox command line utilities are not installed, please reinstall! (http://virtualbox.org)" } +# Determine the VirtualBox version details, querying the download page to ensure +# validity. check_version() { version=`VBoxManage -v` major_minor_release="${version%%[-_r]*}" @@ -63,6 +86,7 @@ check_version() { done } +# Check for the VirtualBox Extension Pack and install if not found. check_ext_pack() { log "Checking for Oracle VM VirtualBox Extension Pack" if ! VBoxManage list extpacks | grep "Oracle VM VirtualBox Extension Pack" @@ -88,6 +112,7 @@ check_ext_pack() { fi } +# Download `unar` from Google Code if required. download_unar() { unar_url="http://theunarchiver.googlecode.com/files/unar1.5.zip" unar_archive=`basename "${unar_url}"` @@ -107,6 +132,8 @@ download_unar() { hash unar 2>&- || fail "Could not find unar in ${ievms_home}" } +# Check for the `unar` command, downloading and installing it if not found. Adds +# ievms home folder to the `PATH` if `unar` must be downloaded. check_unar() { if [ "${kernel}" == "Darwin" ] then @@ -117,65 +144,7 @@ check_unar() { fi } -build_ievm() { - unset archive - unset unit - case $1 in - 6|7|8) - os="WinXP" - if [ "${reuse_xp}" != "yes" ] - then - if [ "$1" == "7" ]; then os="Vista"; fi - if [ "$1" == "8" ]; then os="Win7"; fi - else - archive="IE6_WinXP.zip" - unit="10" - fi - ;; - 9) os="Win7" ;; - 10) os="Win8" ;; - *) fail "Invalid IE version: ${1}" ;; - esac - - vm="IE${1} - ${os}" - def_archive="${vm/ - /_}.zip" - archive=${archive:-$def_archive} - unit=${unit:-"11"} - ova=`basename "${archive/_/ - }" .zip`.ova - url="http://virtualization.modern.ie/vhd/IEKitV1_Final/VirtualBox/OSX/${archive}" - - log "Checking for existing OVA at ${ievms_home}/${ova}" - if [[ ! -f "${ova}" ]] - then - log "Downloading OVA ZIP from ${url} to ${ievms_home}/${archive}" - if [[ ! -f "${archive}" ]] && ! curl ${curl_opts} -L -O "${url}" - then - fail "Failed to download ${url} to ${ievms_home}/ using 'curl', error code ($?)" - fi - - log "Extracting OVA from ${ievms_home}/${archive}" - if ! unar "${archive}" - then - fail "Failed to extract ${archive} to ${ievms_home}/${ova}," \ - "unar command returned error code $?" - fi - fi - - log "Checking for existing ${vm} VM" - if ! VBoxManage showvminfo "${vm}" >/dev/null 2>/dev/null - then - disk_path="${ievms_home}/${vm}-disk1.vmdk" - log "Creating ${vm} VM (disk: ${disk_path})" - VBoxManage import "${ova}" --vsys 0 --vmname "${vm}" --unit "${unit}" --disk "${disk_path}" - - log "Building ${vm} VM" - declare -F "build_ievm_ie${1}" && "build_ievm_ie${1}" - - log "Creating clean snapshot" - VBoxManage snapshot "${vm}" take clean --description "The initial VM state" - fi -} - +# Pause execution until the virtual machine with a given name shuts down. wait_for_shutdown() { x="0" ; until [ "${x}" != "0" ]; do log "Waiting for ${1} to shutdown..." @@ -185,15 +154,18 @@ wait_for_shutdown() { sleep "${sleep_wait}" # Extra sleep for good measure. } +# Pause execution until guest control is available for a virtual wait_for_guestcontrol() { + pass=${2:-""} x="1" ; until [ "${x}" == "0" ]; do log "Waiting for ${1} to be available for guestcontrol..." sleep "${sleep_wait}" - VBoxManage guestcontrol "${1}" cp "/etc/passwd" "/" --username IEUser --dryrun && x=$? || x=$? + VBoxManage guestcontrol "${1}" cp "/etc/passwd" "/" --username IEUser --password "${pass}" --dryrun && x=$? || x=$? done sleep "${sleep_wait}" # Extra sleep for good measure. } +# Find or download the ievms control ISO. find_iso() { iso_url="https://dl.dropbox.com/u/463624/ievms-control.iso" dev_iso="${orig_cwd}/ievms-control.iso" # Use local iso if in ievms dev root @@ -219,7 +191,7 @@ boot_ievms() { VBoxManage modifyvm "${1}" --dvd none } -build_auto_ga() { +boot_auto_ga() { boot_ievms "${1}" log "Attaching Guest Additions ISO" @@ -234,71 +206,155 @@ build_auto_ga() { VBoxManage modifyvm "${1}" --dvd none } -build_ievm_xp() { - installer=`basename "${2}"` +install_ie() { + pass=${4:-""} + installer=`basename "${3}"` installer_host="${ievms_home}/${installer}" - installer_guest="/Documents and Settings/IEUser/Desktop/Install IE${1}.exe" - log "Downloading IE${1} installer from ${2}" - if [[ ! -f "${installer}" ]] && ! curl ${curl_opts} -L "${2}" -o "${installer}" + installer_guest="/Documents and Settings/IEUser/Desktop/Install IE${2}.exe" + log "Downloading IE${2} installer from ${3}" + if [[ ! -f "${installer}" ]] && ! curl ${curl_opts} -L "${3}" -o "${installer}" then fail "Failed to download ${url} to ${ievms_home}/${installer} using 'curl', error code ($?)" fi - boot_ievms "${vm}" + log "Starting VM ${1}" + VBoxManage startvm "${1}" # --type headless - log "Starting VM ${vm}" - VBoxManage startvm "${vm}" --type headless + wait_for_guestcontrol "${1}" "${pass}" - wait_for_guestcontrol "${vm}" + log "Copying IE${2} installer to Desktop" + VBoxManage guestcontrol "${1}" cp "${installer_host}" "${installer_guest}" --username IEUser --password "${pass}" - log "Copying IE${1} installer to Desktop" - VBoxManage guestcontrol "${vm}" cp "${installer_host}" "${installer_guest}" --username IEUser + log "Installing IE${2}" # Always "fails" + VBoxManage guestcontrol "${1}" exec --image "${installer_guest}" --username IEUser --password "${pass}" --wait-exit -- /passive /norestart || true - log "Installing IE${1}" # Always "fails" - VBoxManage guestcontrol "${vm}" exec --image "${installer_guest}" --username IEUser --wait-exit -- /passive /norestart || true + log "Shutting down VM ${1}" + VBoxManage guestcontrol "${1}" exec --image "shutdown.exe" --username IEUser --password "${pass}" --wait-exit -- -s -f -t 0 - log "Shutting down VM ${vm}" - VBoxManage guestcontrol "${vm}" exec --image "/WINDOWS/system32/shutdown.exe" --username IEUser --wait-exit -- -s -f -t 0 + wait_for_shutdown "${1}" +} + +# Build an ievms virtual machine given the IE version desired. +build_ievm() { + unset archive + unset unit + case $1 in + 6|7|8) + os="WinXP" + if [ "${reuse_xp}" != "yes" ] + then + if [ "$1" == "7" ]; then os="Vista"; fi + if [ "$1" == "8" ]; then os="Win7"; fi + else + archive="IE6_WinXP.zip" + unit="10" + fi + ;; + 9) os="Win7" ;; + 10) + if [ "${reuse_win7}" != "yes" ] + then + os="Win8" + else + os="Win7" + archive="IE9_Win7.zip" + fi + ;; + *) fail "Invalid IE version: ${1}" ;; + esac + + vm="IE${1} - ${os}" + def_archive="${vm/ - /_}.zip" + archive=${archive:-$def_archive} + unit=${unit:-"11"} + ova=`basename "${archive/_/ - }" .zip`.ova + url="http://virtualization.modern.ie/vhd/IEKitV1_Final/VirtualBox/OSX/${archive}" + + log "Checking for existing OVA at ${ievms_home}/${ova}" + if [[ ! -f "${ova}" ]] + then + log "Downloading OVA ZIP from ${url} to ${ievms_home}/${archive}" + if [[ ! -f "${archive}" ]] && ! curl ${curl_opts} -L -O "${url}" + then + fail "Failed to download ${url} to ${ievms_home}/ using 'curl', error code ($?)" + fi - wait_for_shutdown "${vm}" + log "Extracting OVA from ${ievms_home}/${archive}" + if ! unar "${archive}" + then + fail "Failed to extract ${archive} to ${ievms_home}/${ova}," \ + "unar command returned error code $?" + fi + fi + + log "Checking for existing ${vm} VM" + if ! VBoxManage showvminfo "${vm}" >/dev/null 2>/dev/null + then + disk_path="${ievms_home}/${vm}-disk1.vmdk" + log "Creating ${vm} VM (disk: ${disk_path})" + VBoxManage import "${ova}" --vsys 0 --vmname "${vm}" --unit "${unit}" --disk "${disk_path}" + + log "Building ${vm} VM" + declare -F "build_ievm_ie${1}" && "build_ievm_ie${1}" + + log "Creating clean snapshot" + VBoxManage snapshot "${vm}" take clean --description "The initial VM state" + fi } +# Build the IE6 virtual machine. build_ievm_ie6() { boot_ievms "IE6 - WinXP" } +# Build the IE7 virtual machine, reusing the XP VM if requested (the default). build_ievm_ie7() { if [ "${reuse_xp}" != "yes" ] then - build_auto_ga "IE7 - Vista" + boot_auto_ga "IE7 - Vista" else - build_ievm_xp 7 "http://download.microsoft.com/download/3/8/8/38889dc1-848c-4bf2-8335-86c573ad86d9/IE7-WindowsXP-x86-enu.exe" + boot_ievms "IE7 - WinXP" + install_ie "IE7 - WinXP" 7 "http://download.microsoft.com/download/3/8/8/38889dc1-848c-4bf2-8335-86c573ad86d9/IE7-WindowsXP-x86-enu.exe" fi } +# Build the IE8 virtual machine, reusing the XP VM if requested (the default). build_ievm_ie8() { if [ "${reuse_xp}" != "yes" ] then - build_auto_ga "IE8 - Win7" + boot_auto_ga "IE8 - Win7" else - build_ievm_xp 8 "http://download.microsoft.com/download/C/C/0/CC0BD555-33DD-411E-936B-73AC6F95AE11/IE8-WindowsXP-x86-ENU.exe" + boot_ievms "IE8 - WinXP" + install_ie "IE8 - WinXP" 8 "http://download.microsoft.com/download/C/C/0/CC0BD555-33DD-411E-936B-73AC6F95AE11/IE8-WindowsXP-x86-ENU.exe" fi } +# Build the IE9 virtual machine. build_ievm_ie9() { - build_auto_ga "IE9 - Win7" + boot_auto_ga "IE9 - Win7" } +# Build the IE10 virtual machine, reusing the Win7 VM if requested (the default). build_ievm_ie10() { - build_auto_ga "IE10 - Win8" + if [ "${reuse_win7}" != "yes" ] + then + boot_auto_ga "IE10 - Win8" + else + boot_auto_ga "IE10 - Win7" + install_ie "IE10 - Win7" 10 "http://download.microsoft.com/download/8/A/C/8AC7C482-BC74-492E-B978-7ED04900CEDE/IE10-Windows6.1-x86-en-us.exe" "Passw0rd!" + fi } +# ## Main Entry Point + +# Run through all checks to get the host ready for installation. check_system create_home check_virtualbox check_ext_pack check_unar +# Install each requested virtual machine sequentially. all_versions="6 7 8 9 10" for ver in ${IEVMS_VERSIONS:-$all_versions} do @@ -306,4 +362,5 @@ do build_ievm $ver done +# We made it! log "Done!" From 0a9b13142fe80e37df1db7e7d754c6527b205ce8 Mon Sep 17 00:00:00 2001 From: Greg Thornton Date: Fri, 21 Jun 2013 02:06:08 -0500 Subject: [PATCH 10/34] Refactor --- control/activate.xml | Bin 2844 -> 0 bytes control/boot.bat | 1 - control/build.sh | 6 +- control/ievms.bat | 1 + control/{boot.xml => ievms.xml} | 8 +- control/rearm.xml | Bin 2850 -> 0 bytes control/stage2 | 6 +- control/vboxga.bat | 8 +- ievms.sh | 242 ++++++++++++++++++-------------- 9 files changed, 149 insertions(+), 123 deletions(-) delete mode 100644 control/activate.xml delete mode 100644 control/boot.bat create mode 100644 control/ievms.bat rename control/{boot.xml => ievms.xml} (90%) delete mode 100644 control/rearm.xml diff --git a/control/activate.xml b/control/activate.xml deleted file mode 100644 index 6992d99c159a47519e95d13860d65e2a54df60a3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2844 zcmbW3T~8WO5QgWvN&f@!zJT9tLp4-wC9$nhj5pjMAQG3=uvqG!Z~MIGu+XgnV#71^!v3;>MTeqs!`Bsp`)?>bpG`69WURc|{ z*$1?C(Al>=dvEWo!E6_l+h-9s9HRFcqbW}}Hs!gu&sO6}@O6XFu|ulz9WgV(f5Pt? z&8mxLjPA@u)MtK%v}PMbT(>Pob;dPkJLNl_N3}MOvqF3gJHyKmgar8njVWWXZ}Gck zmNFu0rT>+ZkzD0!(Un0g890Agu}Ld;;kr@KWXmp-o{_eG6ZESLvGpw-f!?Z z0lj5MU|c$GyVi04FNjhV5=y9@B1y73BUNgGhar!zd^b^-J#6(UG^5~mC??q zNNgvdXk|oT9lLC)Gu1Cm=DW;9ysvl<9Cq0%kE{xnGnUW!B6&XR4Liq^R*PSWd6}=s z58{rT{N6>SURJzazC9QFDY=NS?~x^CeTYQa8Q4#LGsok#C?U&3&=WjHJX)FO&i{mW zi*@x2e_xS`g*tEKqS`~^d(3C@Z5Ux3@_R=o$m@4TK4;JQ*B} zQrEQ|Pwiu|GsQbK~EO_tY#DX@jb1qMRbgEsXm#`*VOF_Uf+Tc z#-JTSYixP<`xTJZP7$YeM~t<{EUNJ$y}Wmis+~2#UKO3X9!{}~IbNoj$5o%D7|VGz z$Z>fsDegm}(m7dXx0*#5kFu2RX2on3Wuc|^#y*d33dMYcve2&F8EHm}D9bcM%u6`j z5=omC@2!ehi!?%vBkn~5c1WGd{!Y;5J7(_0eMijebZK+CpSvAnHH*-TKMSIJi2wFzTD*A)8SvlcnHfXXXX|E#iEFoGR*unu^3VTWnCO}*43!3_H-dElIKyR SQ|99>^I7s-HJ{#H_v}A+8Og-} diff --git a/control/boot.bat b/control/boot.bat deleted file mode 100644 index 31342c6..0000000 --- a/control/boot.bat +++ /dev/null @@ -1 +0,0 @@ -if exist c:\ievms.bat start c:\ievms.bat \ No newline at end of file diff --git a/control/build.sh b/control/build.sh index dd48bc0..0e54bbc 100755 --- a/control/build.sh +++ b/control/build.sh @@ -122,10 +122,8 @@ copy_scripts() { cp "/vagrant/control/deuac.reg" "${initrd}/scripts/" cp "/vagrant/control/reuac.reg" "${initrd}/scripts/" cp "/vagrant/control/vboxga.bat" "${initrd}/scripts/" - cp "/vagrant/control/activate.xml" "${initrd}/scripts/" - cp "/vagrant/control/rearm.xml" "${initrd}/scripts/" - cp "/vagrant/control/boot.xml" "${initrd}/scripts/" - cp "/vagrant/control/boot.bat" "${initrd}/scripts/" + cp "/vagrant/control/ievms.xml" "${initrd}/scripts/" + cp "/vagrant/control/ievms.bat" "${initrd}/scripts/" cp "/vagrant/control/isolinux.cfg" "${remaster_iso}/isolinux.cfg" cp "/vagrant/control/isolinux.cfg" "${remaster_iso}/syslinux.cfg" cp "${kernel}" "${remaster_iso}/" diff --git a/control/ievms.bat b/control/ievms.bat new file mode 100644 index 0000000..73369ee --- /dev/null +++ b/control/ievms.bat @@ -0,0 +1 @@ +if exist C:\Users\IEUser\ievms.bat C:\Users\IEUser\ievms.bat \ No newline at end of file diff --git a/control/boot.xml b/control/ievms.xml similarity index 90% rename from control/boot.xml rename to control/ievms.xml index 88b142b..c184f58 100644 --- a/control/boot.xml +++ b/control/ievms.xml @@ -4,11 +4,7 @@ 2013-06-20T12:19:16.22375 IE9Win7\IEUser - - - true - - + IE9Win7\IEUser @@ -37,7 +33,7 @@ - C:\boot.bat + C:\ievms.bat \ No newline at end of file diff --git a/control/rearm.xml b/control/rearm.xml deleted file mode 100644 index 3fead053ef346d6b4858a56b71fa2bf0a6d464ec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2850 zcmbW3T~8WO5QgWvN&f@!zJg!1HB>{@RubD9#dyOF0wNL6uvqJ#Z~MG+Sa%PLh-Sm? z;mpiC^Uloq`1iMJd-lhMHn5WYwyupWvA*5f$iCQ$t=Xzo_?D22tj&A}>BxF6J-3E^ zvkz!}L}$--?Y+ITDzhz6Zk|P4cf{azgr+=Q+l1%NcC5^k;OiQnLq}TW+h=Bs|AgNa znyVho5ZwolsKfjN(z2}+am6+nRT!7ucEWcujcR2YXNmZ#c8ZrC2nq5r8WYB1U*~tl zC~%T)&_8gUF7xuUW*hLYz+YL|g!!6%hJzy5LE|HFe&W4_-WIYgJeDoPP`)zkn%(37 z8n0vU>vjm%g|pkXrvE=DPSr>#v380i$?}|3t1%vWJfZd_>@&_)J8`*c-={h)`XtH8 zLr#i1CA2$U*L;-u%xA1qPIW9^W*uv%tTVJ@ve)wpHtdmzRjCuNd_sRHvmMXgJiQ{? zDHR#nF(_Ia1F()fTk1`9OpW;#GXvh2yt|HFw8|r^LdA^bb3RX=&wAC)@TBz;)?!{3 zD)NK42QI(!sMO7hx5c;Zv7eBO0rqXOq^$RlC_7#I$?w5=ycQ*9c>sEX#{rMl=9&8+ z^RBb9e&O#cQn66y^*yRxB%#MbCf|k;$05JBbb`EoXB2YwoPX^C_r#(qz0NZBT6^Ms z1S54_!+B~a8#!-vX3Tauo7hj5)eGM-M{{~|*3WV_v7gY>%G!XAQ7+Xdlj)keS;FgE z5aJlLLuidH?*6a>(%LEF)b5b6_LzA!o~M`h9#FNjCfKW@6Yt>^dp5_5H1oLXvlL@7 zuPQk%t|i5NKvX&@i|m%Oh~rU~(%oz}TeGs*QhQ^EM|XwUe8jTYuGkrAMrKhKX~vir zaJV6o1}i>T&0@{dh%pYi8Fkqqbt;EjL4)s*xnuwKnb+yk;Iu#U9b-9**h@GIwD$^6 zyYaST73WjCus1z-0;o^gPZ1~FFZRj7h?y>YCNG}KRqh>ucXlRa=c}-Wxo+F%p3|J( zQqntElWaWtI#FM4a1UzoZ@{<*%T>/dev/null poweroff \ No newline at end of file diff --git a/control/vboxga.bat b/control/vboxga.bat index 4de1f26..c28e837 100644 --- a/control/vboxga.bat +++ b/control/vboxga.bat @@ -6,10 +6,10 @@ VBoxWindowsAdditions.exe /S regedit.exe /S C:\reuac.reg del C:\reuac.reg FOR /F "usebackq" %%i IN (`hostname`) DO SET HOST=%%i -schtasks.exe /create /s %HOST% /ru %HOST%\IEUser /rp Passw0rd! /tn activate /xml C:\activate.xml -schtasks.exe /create /s %HOST% /ru %HOST%\IEUser /rp Passw0rd! /tn rearm /xml C:\rearm.xml -schtasks.exe /create /s %HOST% /ru %HOST%\IEUser /rp Passw0rd! /tn boot /xml C:\boot.xml -schtasks.exe /run /tn activate +schtasks.exe /create /s %HOST% /ru %HOST%\IEUser /rp Passw0rd! /tn ievms /xml C:\ievms.xml +echo slmgr.vbs /ato >C:\Users\IEUser\ievms.bat +schtasks.exe /run /tn ievms timeout /t 30 +del C:\Users\IEUser\ievms.bat shutdown.exe /s /t 00 del %0 \ No newline at end of file diff --git a/ievms.sh b/ievms.sh index b54c85d..daead79 100755 --- a/ievms.sh +++ b/ievms.sh @@ -8,6 +8,9 @@ set -o pipefail # ## Gobal Variables +# The ievms version. +ievms_version="0.1.0" + # Options passed to each `curl` command. curl_opts=${CURL_OPTS:-""} @@ -31,17 +34,30 @@ log() { printf "$*\n" ; return $? ; } # Print an error message to the console and bail out of the script. fail() { log "\nERROR: $*\n" ; exit 1 ; } +# Download a URL to a local file. Accepts a name, URL and file. +download() { + if [[ -f "${3}" ]] + then + log "Found ${1} at ${3} - skipping download" + else + log "Downloading ${1} from ${2} to ${3}" + curl ${curl_opts} -L "${2}" -o "${3}" || fail "Failed to download ${2} to ${ievms_home}/${3} using 'curl', error code ($?)" + fi +} + # ## General Setup # Create the ievms home folder and `cd` into it. The `INSTALL_PATH` env variable -# is used to determine the full path. +# is used to determine the full path. The home folder is then added to `PATH`. create_home() { - def_ievms_home="${HOME}/.ievms" + local def_ievms_home="${HOME}/.ievms" ievms_home=${INSTALL_PATH:-$def_ievms_home} mkdir -p "${ievms_home}" cd "${ievms_home}" + PATH="${PATH}:${ievms_home}" + # Move ovas and zips from a very old installation into place. mv -f ./ova/IE*/IE*.{ova,zip} "${ievms_home}/" 2>/dev/null || true } @@ -58,16 +74,16 @@ check_system() { # Ensure VirtualBox is installed and `VBoxManage` is on the `PATH`. check_virtualbox() { log "Checking for VirtualBox" - hash VBoxManage 2>&- || fail "VirtualBox command line utilities are not installed, please reinstall! (http://virtualbox.org)" + hash VBoxManage 2>&- || fail "VirtualBox command line utilities are not installed, please (re)install! (http://virtualbox.org)" } # Determine the VirtualBox version details, querying the download page to ensure # validity. check_version() { - version=`VBoxManage -v` + local version=`VBoxManage -v` major_minor_release="${version%%[-_r]*}" - major_minor="${version%.*}" - dl_page=`curl ${curl_opts} -L "http://download.virtualbox.org/virtualbox/" 2>/dev/null` + local major_minor="${version%.*}" + local dl_page=`curl ${curl_opts} -L "http://download.virtualbox.org/virtualbox/" 2>/dev/null` if [[ "$version" == *"kernel module is not loaded"* ]]; then fail "$version" @@ -81,7 +97,7 @@ check_version() { log "Virtualbox version ${major_minor_release} found." break else - log "Virtualbox version ${major_minor_release} not found - skipping." + log "Virtualbox version ${major_minor_release} not found, skipping." fi done } @@ -92,53 +108,34 @@ check_ext_pack() { if ! VBoxManage list extpacks | grep "Oracle VM VirtualBox Extension Pack" then check_version - archive="Oracle_VM_VirtualBox_Extension_Pack-${major_minor_release}.vbox-extpack" - url="http://download.virtualbox.org/virtualbox/${major_minor_release}/${archive}" + local archive="Oracle_VM_VirtualBox_Extension_Pack-${major_minor_release}.vbox-extpack" + local url="http://download.virtualbox.org/virtualbox/${major_minor_release}/${archive}" - if [[ ! -f "${archive}" ]] - then - log "Downloading Oracle VM VirtualBox Extension Pack from ${url} to ${ievms_home}/${archive}" - if ! curl ${curl_opts} -L "${url}" -o "${archive}" - then - fail "Failed to download ${url} to ${ievms_home}/${archive} using 'curl', error code ($?)" - fi - fi + download "Oracle VM VirtualBox Extension Pack" "${archive}" \ + "${url}" log "Installing Oracle VM VirtualBox Extension Pack from ${ievms_home}/${archive}" - if ! VBoxManage extpack install "${archive}" - then - fail "Failed to install Oracle VM VirtualBox Extension Pack from ${ievms_home}/${archive}, error code ($?)" - fi + VBoxManage extpack install "${archive}" || fail "Failed to install Oracle VM VirtualBox Extension Pack from ${ievms_home}/${archive}, error code ($?)" fi } -# Download `unar` from Google Code if required. -download_unar() { - unar_url="http://theunarchiver.googlecode.com/files/unar1.5.zip" - unar_archive=`basename "${unar_url}"` +# Download and install `unar` from Google Code. +install_unar() { + local url="http://theunarchiver.googlecode.com/files/unar1.5.zip" + local archive=`basename "${url}"` - log "Downloading unar from ${unar_url} to ${ievms_home}/${unar_archive}" - if [[ ! -f "${unar_archive}" ]] && ! curl ${curl_opts} -L "${unar_url}" -o "${unar_archive}" - then - fail "Failed to download ${unar_url} to ${ievms_home}/${unar_archive} using 'curl', error code ($?)" - fi + download "unar" "${archive}" "${url}" - if ! unzip "${unar_archive}" - then - fail "Failed to extract ${ievms_home}/${unar_archive} to ${ievms_home}/," \ - "unzip command returned error code $?" - fi + unzip "${archive}" || fail "Failed to extract ${ievms_home}/${archive} to ${ievms_home}/, unzip command returned error code $?" hash unar 2>&- || fail "Could not find unar in ${ievms_home}" } -# Check for the `unar` command, downloading and installing it if not found. Adds -# ievms home folder to the `PATH` if `unar` must be downloaded. +# Check for the `unar` command, downloading and installing it if not found. check_unar() { if [ "${kernel}" == "Darwin" ] then - PATH="${PATH}:${ievms_home}" - hash unar 2>&- || download_unar + hash unar 2>&- || install_unar else hash unar 2>&- || fail "Linux support requires unar (sudo apt-get install for Ubuntu/Debian)" fi @@ -146,7 +143,7 @@ check_unar() { # Pause execution until the virtual machine with a given name shuts down. wait_for_shutdown() { - x="0" ; until [ "${x}" != "0" ]; do + local x="0" ; until [ "${x}" != "0" ] ; do log "Waiting for ${1} to shutdown..." sleep "${sleep_wait}" VBoxManage list runningvms | grep "${1}" >/dev/null && x=$? || x=$? @@ -154,82 +151,127 @@ wait_for_shutdown() { sleep "${sleep_wait}" # Extra sleep for good measure. } -# Pause execution until guest control is available for a virtual +# Pause execution until guest control is available for a virtual machine. wait_for_guestcontrol() { - pass=${2:-""} - x="1" ; until [ "${x}" == "0" ]; do + local pass=${2:-""} + x="1" ; until [ "${x}" == "0" ] ; do log "Waiting for ${1} to be available for guestcontrol..." sleep "${sleep_wait}" - VBoxManage guestcontrol "${1}" cp "/etc/passwd" "/" --username IEUser --password "${pass}" --dryrun && x=$? || x=$? + VBoxManage guestcontrol "${1}" cp "/etc/passwd" "/" --username IEUser \ + --password "${pass}" --dryrun && x=$? || x=$? done sleep "${sleep_wait}" # Extra sleep for good measure. } # Find or download the ievms control ISO. find_iso() { - iso_url="https://dl.dropbox.com/u/463624/ievms-control.iso" - dev_iso="${orig_cwd}/ievms-control.iso" # Use local iso if in ievms dev root - if [[ -f "${dev_iso}" ]]; then iso=$dev_iso; else iso="${ievms_home}/ievms-control.iso"; fi - log "Downloading ievms ISO from ${iso_url}" - if [[ ! -f "${iso}" ]] && ! curl ${curl_opts} -L "${iso_url}" -o "${iso}" + local url="https://dl.dropboxusercontent.com/u/463624/ievms-control-${ievms_version}.iso" + local dev_iso="${orig_cwd}/ievms-control.iso" # Use local iso if in ievms dev root + if [[ -f "${dev_iso}" ]] then - fail "Failed to download ${iso_url} to ${ievms_home}/${iso} using 'curl', error code ($?)" + iso=$dev_iso + else + iso="${ievms_home}/ievms-control-${ievms_version}.iso" + download "ievms control ISO" "${url}" "${iso}" fi } -boot_ievms() { - find_iso - log "Attaching ievms.iso" - VBoxManage storageattach "${1}" --storagectl "IDE Controller" --port 1 --device 0 --type dvddrive --medium "${iso}" +# Attach a dvd image to the virtual machine. +attach() { + log "Attaching ${3}" + VBoxManage storageattach "${1}" --storagectl "IDE Controller" --port 1 \ + --device 0 --type dvddrive --medium "${2}" +} - log "Starting VM ${1}" - VBoxManage startvm "${1}" # --type headless +# Eject the dvd image from the virtual machine. +eject() { + log "Ejecting ${2}" + VBoxManage modifyvm "${1}" --dvd none +} +# Boot the virtual machine with the control ISO in the dvd drive then wait for +# it to do its magic and shut down. For XP images, the "magic" is simply +# enabling guest control without a password. For other images, it installs +# a batch file that runs on first boot to install guest additions and activate +# the OS if possible. +boot_ievms() { + find_iso + attach "${1}" "${iso}" "ievms control ISO" + start_vm "${1}" wait_for_shutdown "${1}" - - log "Ejecting ievms.iso" - VBoxManage modifyvm "${1}" --dvd none + eject "${1}" "ievms control ISO" } +# Boot the virtual machine with guest additions in the dvd drive. After running +# `boot_ievms`, the next boot will attempt automatically install guest additions +# if present in the drive. It will shut itself down after installation. boot_auto_ga() { boot_ievms "${1}" + attach "${1}" "additions" "Guest Additions" + start_vm "${1}" + wait_for_shutdown "${1}" + eject "${1}" "Guest Additions" +} - log "Attaching Guest Additions ISO" - VBoxManage storageattach "${1}" --storagectl "IDE Controller" --port 1 --device 0 --type dvddrive --medium additions - +# Start a virtual machine in headless mode. +start_vm() { log "Starting VM ${1}" - VBoxManage startvm "${1}" # --type headless - - wait_for_shutdown "${1}" + VBoxManage startvm "${1}" --type headless +} - log "Ejecting Guest Additions" - VBoxManage modifyvm "${1}" --dvd none +# Copy a file to the virtual machine. An optional password will be used +# if given. +copy_to_vm() { + local pass=${4:-""} + log "Copying ${2} to ${3}" + VBoxManage guestcontrol "${1}" cp "${ievms_home}/${2}" "${3}" \ + --username IEUser --password "${pass}" } -install_ie() { - pass=${4:-""} - installer=`basename "${3}"` - installer_host="${ievms_home}/${installer}" - installer_guest="/Documents and Settings/IEUser/Desktop/Install IE${2}.exe" - log "Downloading IE${2} installer from ${3}" - if [[ ! -f "${installer}" ]] && ! curl ${curl_opts} -L "${3}" -o "${installer}" - then - fail "Failed to download ${url} to ${ievms_home}/${installer} using 'curl', error code ($?)" - fi +# Install an alternative version of IE in an XP virtual machine. Downloads the +# installer, copies it to the vm, then runs it before shutting down. +install_ie_xp() { # vm url + local src=`basename "${2}"` + local dest="/Documents and Settings/IEUser/Desktop/${src}" - log "Starting VM ${1}" - VBoxManage startvm "${1}" # --type headless + download "${src}" "${2}" "${src}" + start_vm "${1}" + wait_for_guestcontrol "${1}" + copy_to_vm "${1}" "${src}" "${dest}" - wait_for_guestcontrol "${1}" "${pass}" + log "Installing IE" # Always "fails" + VBoxManage guestcontrol "${1}" exec --image "${dest}" \ + --username IEUser --wait-exit -- /passive /norestart || true - log "Copying IE${2} installer to Desktop" - VBoxManage guestcontrol "${1}" cp "${installer_host}" "${installer_guest}" --username IEUser --password "${pass}" + log "Shutting down ${1}" + VBoxManage guestcontrol "${1}" exec --image "shutdown.exe" \ + --username IEUser --wait-exit -- /s /f /t 0 - log "Installing IE${2}" # Always "fails" - VBoxManage guestcontrol "${1}" exec --image "${installer_guest}" --username IEUser --password "${pass}" --wait-exit -- /passive /norestart || true + wait_for_shutdown "${1}" +} - log "Shutting down VM ${1}" - VBoxManage guestcontrol "${1}" exec --image "shutdown.exe" --username IEUser --password "${pass}" --wait-exit -- -s -f -t 0 +# Install an alternative version of IE in a Win7 virtual machine. Downloads the +# installer, copies it to the vm, then runs it before shutting down. +install_ie_win7() { # vm url + local src=`basename "${2}"` + local dest="/Users/IEUser/Desktop/${src}" + local pass='Passw0rd!' + + download "${src}" "${2}" "${src}" + start_vm "${1}" + wait_for_guestcontrol "${1}" "${pass}" + copy_to_vm "${1}" "${src}" "${dest}" "${pass}" + + log "Installing IE" + VBoxManage guestcontrol "${1}" exec --image "cmd.exe" \ + --username IEUser --password "${pass}" --wait-exit -- \ + /c "echo ${dest} /passive /norestart >C:\\Users\\IEUser\\ievms.bat" + VBoxManage guestcontrol "${1}" exec --image "cmd.exe" \ + --username IEUser --password "${pass}" --wait-exit -- \ + /c "echo shutdown.exe /s /f /t 0 >>C:\\Users\\IEUser\\ievms.bat" + VBoxManage guestcontrol "${1}" exec --image "schtasks.exe" \ + --username IEUser --password "${pass}" --wait-exit -- \ + /run /tn ievms wait_for_shutdown "${1}" } @@ -263,34 +305,26 @@ build_ievm() { *) fail "Invalid IE version: ${1}" ;; esac - vm="IE${1} - ${os}" - def_archive="${vm/ - /_}.zip" + local vm="IE${1} - ${os}" + local def_archive="${vm/ - /_}.zip" archive=${archive:-$def_archive} unit=${unit:-"11"} - ova=`basename "${archive/_/ - }" .zip`.ova - url="http://virtualization.modern.ie/vhd/IEKitV1_Final/VirtualBox/OSX/${archive}" + local ova=`basename "${archive/_/ - }" .zip`.ova + local url="http://virtualization.modern.ie/vhd/IEKitV1_Final/VirtualBox/OSX/${archive}" log "Checking for existing OVA at ${ievms_home}/${ova}" if [[ ! -f "${ova}" ]] then - log "Downloading OVA ZIP from ${url} to ${ievms_home}/${archive}" - if [[ ! -f "${archive}" ]] && ! curl ${curl_opts} -L -O "${url}" - then - fail "Failed to download ${url} to ${ievms_home}/ using 'curl', error code ($?)" - fi + download "OVA ZIP" "${url}" "${archive}" log "Extracting OVA from ${ievms_home}/${archive}" - if ! unar "${archive}" - then - fail "Failed to extract ${archive} to ${ievms_home}/${ova}," \ - "unar command returned error code $?" - fi + unar "${archive}" || fail "Failed to extract ${archive} to ${ievms_home}/${ova}, unar command returned error code $?" fi log "Checking for existing ${vm} VM" if ! VBoxManage showvminfo "${vm}" >/dev/null 2>/dev/null then - disk_path="${ievms_home}/${vm}-disk1.vmdk" + local disk_path="${ievms_home}/${vm}-disk1.vmdk" log "Creating ${vm} VM (disk: ${disk_path})" VBoxManage import "${ova}" --vsys 0 --vmname "${vm}" --unit "${unit}" --disk "${disk_path}" @@ -314,7 +348,7 @@ build_ievm_ie7() { boot_auto_ga "IE7 - Vista" else boot_ievms "IE7 - WinXP" - install_ie "IE7 - WinXP" 7 "http://download.microsoft.com/download/3/8/8/38889dc1-848c-4bf2-8335-86c573ad86d9/IE7-WindowsXP-x86-enu.exe" + install_ie_xp "IE7 - WinXP" "http://download.microsoft.com/download/3/8/8/38889dc1-848c-4bf2-8335-86c573ad86d9/IE7-WindowsXP-x86-enu.exe" fi } @@ -325,7 +359,7 @@ build_ievm_ie8() { boot_auto_ga "IE8 - Win7" else boot_ievms "IE8 - WinXP" - install_ie "IE8 - WinXP" 8 "http://download.microsoft.com/download/C/C/0/CC0BD555-33DD-411E-936B-73AC6F95AE11/IE8-WindowsXP-x86-ENU.exe" + install_ie_xp "IE8 - WinXP" "http://download.microsoft.com/download/C/C/0/CC0BD555-33DD-411E-936B-73AC6F95AE11/IE8-WindowsXP-x86-ENU.exe" fi } @@ -341,7 +375,7 @@ build_ievm_ie10() { boot_auto_ga "IE10 - Win8" else boot_auto_ga "IE10 - Win7" - install_ie "IE10 - Win7" 10 "http://download.microsoft.com/download/8/A/C/8AC7C482-BC74-492E-B978-7ED04900CEDE/IE10-Windows6.1-x86-en-us.exe" "Passw0rd!" + install_ie_win7 "IE10 - Win7" "http://download.microsoft.com/download/8/A/C/8AC7C482-BC74-492E-B978-7ED04900CEDE/IE10-Windows6.1-x86-en-us.exe" fi } From d4717efa9abcc1a599893deefa6ffec6edc9613f Mon Sep 17 00:00:00 2001 From: Greg Thornton Date: Fri, 21 Jun 2013 02:06:33 -0500 Subject: [PATCH 11/34] Ignore control iso --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index bbed26a..2602432 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .rvmrc .vagrant +/ievms-control* \ No newline at end of file From 5cdcf27b9183f82e56c59d203208a2e771d3e61e Mon Sep 17 00:00:00 2001 From: Greg Thornton Date: Fri, 21 Jun 2013 03:12:37 -0500 Subject: [PATCH 12/34] More readme --- README.md | 78 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 52 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 1a0a155..f1f35f8 100644 --- a/README.md +++ b/README.md @@ -36,39 +36,38 @@ Disk requirements A full ievms install will require approximately 37G: Servo:.ievms xdissent$ du -ch * - 5.7G IE10 - Win8-disk1.vmdk - 2.6G IE10 - Win8.ova - 2.5G IE10_Win8.zip - 1.5G IE6 - WinXP-disk1.vmdk - 724M IE6 - WinXP.ova - 717M IE6_WinXP.zip - 1.6G IE7 - WinXP-disk1.vmdk - 15M IE7-WindowsXP-x86-enu.exe - 1.6G IE8 - WinXP-disk1.vmdk - 16M IE8-WindowsXP-x86-ENU.exe - 10G IE9 - Win7-disk1.vmdk - 4.7G IE9 - Win7.ova - 4.7G IE9_Win7.zip - 3.4M ievms-control.iso - 4.6M lsar - 4.5M unar - 4.1M unar1.5.zip - 37G total + 11G IE10 - Win7-disk1.vmdk + 22M IE10-Windows6.1-x86-en-us.exe + 1.5G IE6 - WinXP-disk1.vmdk + 724M IE6 - WinXP.ova + 717M IE6_WinXP.zip + 1.6G IE7 - WinXP-disk1.vmdk + 15M IE7-WindowsXP-x86-enu.exe + 1.6G IE8 - WinXP-disk1.vmdk + 16M IE8-WindowsXP-x86-ENU.exe + 11G IE9 - Win7-disk1.vmdk + 4.7G IE9 - Win7.ova + 4.7G IE9_Win7.zip + 3.4M ievms-control-0.1.0.iso + 4.6M lsar + 4.5M unar + 4.1M unar1.5.zip + 37G total You may remove all files except `*.vmdk` after installation and they will be re-downloaded if ievms is run again in the future: $ find ~/.ievms -type f ! -name "*.vmdk" -exec rm {} \; -If all installation related files are removed, around 21G is required: +If all installation related files are removed, around 26G is required: Servo:.ievms xdissent$ du -ch * - 5.7G IE10 - Win8-disk1.vmdk - 1.5G IE6 - WinXP-disk1.vmdk - 1.6G IE7 - WinXP-disk1.vmdk - 1.6G IE8 - WinXP-disk1.vmdk - 10G IE9 - Win7-disk1.vmdk - 21G total + 11G IE10 - Win7-disk1.vmdk + 1.5G IE6 - WinXP-disk1.vmdk + 1.6G IE7 - WinXP-disk1.vmdk + 1.6G IE8 - WinXP-disk1.vmdk + 11G IE9 - Win7-disk1.vmdk + 26G total Bandwidth requirements @@ -79,7 +78,9 @@ A full installation will download roughly 7.5G of data. **NOTE:** Reusing the XP VM for IE7 and IE8 (the default) saves an incredible amount of space and bandwidth. If it is disabled (`REUSE_XP=no`) the disk space required climbs to 74G (39G if cleaned post-install) and around 17G will be -downloaded. +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 +`REUSE_WIN7=no`. Installation @@ -136,6 +137,7 @@ environment variable. For example, you can set a download speed limit: Features ======== + Clean Snapshot -------------- @@ -146,6 +148,14 @@ you can simply revert to the `clean` snapshot to reset your VM to the initial state. +Guest Control +------------- + +VirtualBox guest additions are installed after each virtual machine is created +(and before the clean snapshot) and the appropriate steps are taken to enable +guest control from the host machine. + + Resuming Downloads ------------------ @@ -170,6 +180,22 @@ environment variable `REUSE_XP` to anything other than `yes`: curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | REUSE_XP="no" bash +Reusing Win7 VMs +---------------- + +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 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 +variable `REUSE_WIN7` to anything other than `yes`: + + curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | REUSE_WIN7="no" bash + + Control ISO ----------- From 2e7e08c0a28b20c78071a524ab64c678ac9fa637 Mon Sep 17 00:00:00 2001 From: Greg Thornton Date: Fri, 21 Jun 2013 03:12:59 -0500 Subject: [PATCH 13/34] Fix download args order. --- ievms.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ievms.sh b/ievms.sh index daead79..2c113a2 100755 --- a/ievms.sh +++ b/ievms.sh @@ -111,8 +111,7 @@ check_ext_pack() { local archive="Oracle_VM_VirtualBox_Extension_Pack-${major_minor_release}.vbox-extpack" local url="http://download.virtualbox.org/virtualbox/${major_minor_release}/${archive}" - download "Oracle VM VirtualBox Extension Pack" "${archive}" \ - "${url}" + download "Oracle VM VirtualBox Extension Pack" "${url}" "${archive}" log "Installing Oracle VM VirtualBox Extension Pack from ${ievms_home}/${archive}" VBoxManage extpack install "${archive}" || fail "Failed to install Oracle VM VirtualBox Extension Pack from ${ievms_home}/${archive}, error code ($?)" @@ -124,7 +123,7 @@ install_unar() { local url="http://theunarchiver.googlecode.com/files/unar1.5.zip" local archive=`basename "${url}"` - download "unar" "${archive}" "${url}" + download "unar" "${url}" "${archive}" unzip "${archive}" || fail "Failed to extract ${ievms_home}/${archive} to ${ievms_home}/, unzip command returned error code $?" @@ -285,6 +284,7 @@ build_ievm() { 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 From 4b0e007e9444198ae7da123db94c930a2485cd56 Mon Sep 17 00:00:00 2001 From: Greg Thornton Date: Fri, 16 Aug 2013 16:28:19 -0500 Subject: [PATCH 14/34] Remove Gemfile --- Gemfile | 5 ----- Gemfile.lock | 29 ----------------------------- 2 files changed, 34 deletions(-) delete mode 100644 Gemfile delete mode 100644 Gemfile.lock diff --git a/Gemfile b/Gemfile deleted file mode 100644 index 93b944e..0000000 --- a/Gemfile +++ /dev/null @@ -1,5 +0,0 @@ -# coding: utf-8 - -source :rubygems - -gem "vagrant" \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 43f551c..0000000 --- a/Gemfile.lock +++ /dev/null @@ -1,29 +0,0 @@ -GEM - remote: http://rubygems.org/ - specs: - archive-tar-minitar (0.5.2) - childprocess (0.3.7) - ffi (~> 1.0, >= 1.0.6) - erubis (2.7.0) - ffi (1.3.1) - i18n (0.6.1) - json (1.5.4) - log4r (1.1.10) - net-scp (1.0.4) - net-ssh (>= 1.99.1) - net-ssh (2.2.2) - vagrant (1.0.6) - archive-tar-minitar (= 0.5.2) - childprocess (~> 0.3.1) - erubis (~> 2.7.0) - i18n (~> 0.6.0) - json (~> 1.5.1) - log4r (~> 1.1.9) - net-scp (~> 1.0.4) - net-ssh (~> 2.2.2) - -PLATFORMS - ruby - -DEPENDENCIES - vagrant From 5c8aa72ee33c806f4393f594c95c2b244623af8d Mon Sep 17 00:00:00 2001 From: Greg Thornton Date: Fri, 16 Aug 2013 17:01:52 -0500 Subject: [PATCH 15/34] Add IE11 and bump version --- ievms.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ievms.sh b/ievms.sh index 2c113a2..13bd995 100755 --- a/ievms.sh +++ b/ievms.sh @@ -9,7 +9,7 @@ set -o pipefail # ## Gobal Variables # The ievms version. -ievms_version="0.1.0" +ievms_version="0.1.1" # Options passed to each `curl` command. curl_opts=${CURL_OPTS:-""} @@ -293,9 +293,10 @@ build_ievm() { fi ;; 9) os="Win7" ;; - 10) + 10|11) if [ "${reuse_win7}" != "yes" ] then + if [ "$1" == "11" ]; then fail "IE11 is only available if REUSE_WIN7 is set"; fi os="Win8" else os="Win7" @@ -379,6 +380,12 @@ build_ievm_ie10() { fi } +# 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/6/4/2/6424D5F5-4514-4D4F-8D8A-285DADF1E06F/IE11-Windows6.1-x86-en-us.exe" +} + # ## Main Entry Point # Run through all checks to get the host ready for installation. @@ -389,7 +396,7 @@ check_ext_pack check_unar # Install each requested virtual machine sequentially. -all_versions="6 7 8 9 10" +all_versions="6 7 8 9 10 11" for ver in ${IEVMS_VERSIONS:-$all_versions} do log "Building IE${ver} VM" From 3d2d4c7de2687d45b0ed8c7dc656dd9c0382c8aa Mon Sep 17 00:00:00 2001 From: Greg Thornton Date: Fri, 16 Aug 2013 17:02:08 -0500 Subject: [PATCH 16/34] Add IE11 to README --- README.md | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index a362599..24cf256 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ in multiple versions of IE, regardless of the host operating system. ~~Unfortunately, setting these virtual machines up without Microsoft's VirtualPC can be extremely difficult. The ievms scripts aim to facilitate that process using VirtualBox on Linux or OS X.~~ With a single command, you can have IE6, IE7, IE8, -IE9 and IE10 running in separate virtual machines. +IE9, IE10 and IE11 running in separate virtual machines. **NOTE:** As of Feb. 1st, 2013, the [MS images](http://www.modern.ie/virtualization-tools) are fully compatible with Virtualbox, thanks to the [modern.IE](http://modern.IE) @@ -33,11 +33,13 @@ Requirements Disk requirements ----------------- -A full ievms install will require approximately 37G: +A full ievms install will require approximately 48G: Servo:.ievms xdissent$ du -ch * 11G IE10 - Win7-disk1.vmdk 22M IE10-Windows6.1-x86-en-us.exe + 11G IE11 - Win7-disk1.vmdk + 28M IE11-Windows6.1-x86-en-us.exe 1.5G IE6 - WinXP-disk1.vmdk 724M IE6 - WinXP.ova 717M IE6_WinXP.zip @@ -52,22 +54,23 @@ A full ievms install will require approximately 37G: 4.6M lsar 4.5M unar 4.1M unar1.5.zip - 37G total + 48G total You may remove all files except `*.vmdk` after installation and they will be re-downloaded if ievms is run again in the future: $ find ~/.ievms -type f ! -name "*.vmdk" -exec rm {} \; -If all installation related files are removed, around 26G is required: +If all installation related files are removed, around 37G is required: Servo:.ievms xdissent$ du -ch * 11G IE10 - Win7-disk1.vmdk + 11G IE11 - Win7-disk1.vmdk 1.5G IE6 - WinXP-disk1.vmdk 1.6G IE7 - WinXP-disk1.vmdk 1.6G IE8 - WinXP-disk1.vmdk 11G IE9 - Win7-disk1.vmdk - 26G total + 37G total Bandwidth requirements @@ -90,7 +93,7 @@ Installation 2. Download and unpack ievms: - * Install IE versions 6, 7, 8, 9 and 10. + * Install IE versions 6, 7, 8, 9, 10 and 11. curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | bash @@ -187,8 +190,8 @@ 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 by default. In addition, the Win7 VMs are the only ones which can be -successfully "rearmed" to extend the activation period. +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 variable `REUSE_WIN7` to anything other than `yes`: @@ -196,6 +199,10 @@ variable `REUSE_WIN7` to anything other than `yes`: curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | REUSE_WIN7="no" bash +**NOTE:** It is currently impossible to install IE11 **without** reusing the +Win7 virtual machine. + + Control ISO ----------- From f0315256d3d7bda631cfd4538c594d0c8e83ede6 Mon Sep 17 00:00:00 2001 From: Tuomas Salo Date: Mon, 28 Oct 2013 14:27:37 +0200 Subject: [PATCH 17/34] fixed the ie11 download url --- ievms.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ievms.sh b/ievms.sh index 13bd995..160368b 100755 --- a/ievms.sh +++ b/ievms.sh @@ -383,7 +383,7 @@ build_ievm_ie10() { # 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/6/4/2/6424D5F5-4514-4D4F-8D8A-285DADF1E06F/IE11-Windows6.1-x86-en-us.exe" + install_ie_win7 "IE11 - Win7" "http://download.microsoft.com/download/1/3/9/139A7FAB-95FF-4E35-9CED-42D24E39AC2F/IE11-Windows6.1-x86-en-us.exe" } # ## Main Entry Point From a11226dd8d2e6925610c50db9f62b9f0c954362b Mon Sep 17 00:00:00 2001 From: cust0dian Date: Mon, 28 Oct 2013 09:40:35 -0700 Subject: [PATCH 18/34] Remove repeating word from "Reusing Win7 VMs" section. "will will" should be just "will" --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 24cf256..2b17523 100644 --- a/README.md +++ b/README.md @@ -172,7 +172,7 @@ Reusing XP VMs IE7 and IE8 ship from MS on Vista and Win7 respectively. Both of these images are far larger than the IE6 XP image, which also technically supports -IE7 and IE8. To save bandwidth, space and time, ievms will will reuse +IE7 and IE8. To save bandwidth, space and time, ievms will reuse (duplicate) the IE6 XP VM image for both. Virtualbox guest control is used to run the appropriate IE installer within the VM. The `clean` snapshot includes the updated browser version. From d19600fb7f006a0491184bd5635a4898a6b9225a Mon Sep 17 00:00:00 2001 From: Tuomas Salo Date: Mon, 11 Nov 2013 21:07:02 +0200 Subject: [PATCH 19/34] IE11 download url changed again See https://github.com/xdissent/ievms/pull/181#issuecomment-28228369 --- ievms.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ievms.sh b/ievms.sh index 160368b..0517266 100755 --- a/ievms.sh +++ b/ievms.sh @@ -383,7 +383,7 @@ build_ievm_ie10() { # 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/1/3/9/139A7FAB-95FF-4E35-9CED-42D24E39AC2F/IE11-Windows6.1-x86-en-us.exe" + 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" } # ## Main Entry Point From 0c7e3945205b82209569214c4b1b3456d423fbd5 Mon Sep 17 00:00:00 2001 From: Greg Thornton Date: Sat, 30 Nov 2013 05:20:51 -0600 Subject: [PATCH 20/34] Set the IEUser password for XP and normalize related commands --- ievms.sh | 109 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 71 insertions(+), 38 deletions(-) diff --git a/ievms.sh b/ievms.sh index 13bd995..8e859d8 100755 --- a/ievms.sh +++ b/ievms.sh @@ -21,15 +21,21 @@ reuse_xp=${REUSE_XP:-"yes"} reuse_win7=${REUSE_WIN7:-"yes"} # Timeout interval to wait between checks for various states. -sleep_wait="10" +sleep_wait="5" # Store the original `cwd`. orig_cwd=`pwd` +# The VM user to use for guest control. +guest_user="IEUser" + +# The VM user password to use for guest control. +guest_pass="Passw0rd!" + # ## Utilities # Print a message to the console. -log() { printf "$*\n" ; return $? ; } +log() { printf "$*\n" ; return $? ; } # Print an error message to the console and bail out of the script. fail() { log "\nERROR: $*\n" ; exit 1 ; } @@ -142,24 +148,20 @@ check_unar() { # Pause execution until the virtual machine with a given name shuts down. wait_for_shutdown() { - local x="0" ; until [ "${x}" != "0" ] ; do + while true ; do log "Waiting for ${1} to shutdown..." sleep "${sleep_wait}" - VBoxManage list runningvms | grep "${1}" >/dev/null && x=$? || x=$? + VBoxManage showvminfo "${1}" | grep "State:" | grep -q "powered off" && return 0 || true done - sleep "${sleep_wait}" # Extra sleep for good measure. } # Pause execution until guest control is available for a virtual machine. wait_for_guestcontrol() { - local pass=${2:-""} - x="1" ; until [ "${x}" == "0" ] ; do + while true ; do log "Waiting for ${1} to be available for guestcontrol..." sleep "${sleep_wait}" - VBoxManage guestcontrol "${1}" cp "/etc/passwd" "/" --username IEUser \ - --password "${pass}" --dryrun && x=$? || x=$? + VBoxManage showvminfo "${1}" | grep 'Additions run level:' | grep -q "3" && return 0 || true done - sleep "${sleep_wait}" # Extra sleep for good measure. } # Find or download the ievms control ISO. @@ -221,56 +223,83 @@ start_vm() { # Copy a file to the virtual machine. An optional password will be used # if given. copy_to_vm() { - local pass=${4:-""} log "Copying ${2} to ${3}" VBoxManage guestcontrol "${1}" cp "${ievms_home}/${2}" "${3}" \ - --username IEUser --password "${pass}" + --username "${guest_user}" --password "${guest_pass}" +} + +# Execute a command with arguments on a virtual machine. +guest_control_exec() { + local vm="${1}" + local image="${2}" + shift; shift + VBoxManage guestcontrol "${vm}" exec --image "${image}" \ + --username "${guest_user}" --password "${guest_pass}" \ + --wait-exit -- "$@" +} + +# Start an XP virtual machine and set the password for the guest user. +set_xp_password() { + start_vm "${1}" + wait_for_guestcontrol "${1}" + + log "Setting ${guest_user} password" + VBoxManage guestcontrol "${1}" exec --image "net.exe" --username \ + Administrator --password "${guest_pass}" --wait-exit -- \ + user "${guest_user}" "${guest_pass}" + + log "Setting auto logon password" + VBoxManage guestcontrol "${1}" exec --image "reg.exe" --username \ + Administrator --password "${guest_pass}" --wait-exit -- add \ + "HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon" \ + /f /v DefaultPassword /t REG_SZ /d "${guest_pass}" + + log "Enabling auto admin logon" + VBoxManage guestcontrol "${1}" exec --image "reg.exe" --username \ + Administrator --password "${guest_pass}" --wait-exit -- add \ + "HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon" \ + /f /v AutoAdminLogon /t REG_SZ /d 1 +} + +# Shutdown an XP virtual machine and wait for it to power off. +shutdown_xp() { + log "Shutting down ${1}" + guest_control_exec "${1}" "shutdown.exe" /s /f /t 0 + wait_for_shutdown "${1}" } # Install an alternative version of IE in an XP virtual machine. Downloads the # installer, copies it to the vm, then runs it before shutting down. install_ie_xp() { # vm url local src=`basename "${2}"` - local dest="/Documents and Settings/IEUser/Desktop/${src}" + local dest="/Documents and Settings/${guest_user}/Desktop/${src}" download "${src}" "${2}" "${src}" - start_vm "${1}" - wait_for_guestcontrol "${1}" copy_to_vm "${1}" "${src}" "${dest}" log "Installing IE" # Always "fails" - VBoxManage guestcontrol "${1}" exec --image "${dest}" \ - --username IEUser --wait-exit -- /passive /norestart || true - - log "Shutting down ${1}" - VBoxManage guestcontrol "${1}" exec --image "shutdown.exe" \ - --username IEUser --wait-exit -- /s /f /t 0 + guest_control_exec "${1}" "${dest}" /passive /norestart || true - wait_for_shutdown "${1}" + shutdown_xp "${1}" } # Install an alternative version of IE in a Win7 virtual machine. Downloads the # installer, copies it to the vm, then runs it before shutting down. install_ie_win7() { # vm url local src=`basename "${2}"` - local dest="/Users/IEUser/Desktop/${src}" - local pass='Passw0rd!' + local dest="/Users/${guest_user}/Desktop/${src}" download "${src}" "${2}" "${src}" start_vm "${1}" - wait_for_guestcontrol "${1}" "${pass}" - copy_to_vm "${1}" "${src}" "${dest}" "${pass}" + wait_for_guestcontrol "${1}" + copy_to_vm "${1}" "${src}" "${dest}" log "Installing IE" - VBoxManage guestcontrol "${1}" exec --image "cmd.exe" \ - --username IEUser --password "${pass}" --wait-exit -- \ - /c "echo ${dest} /passive /norestart >C:\\Users\\IEUser\\ievms.bat" - VBoxManage guestcontrol "${1}" exec --image "cmd.exe" \ - --username IEUser --password "${pass}" --wait-exit -- \ - /c "echo shutdown.exe /s /f /t 0 >>C:\\Users\\IEUser\\ievms.bat" - VBoxManage guestcontrol "${1}" exec --image "schtasks.exe" \ - --username IEUser --password "${pass}" --wait-exit -- \ - /run /tn ievms + guest_control_exec "${1}" "cmd.exe" /c \ + "echo ${dest} /passive /norestart >C:\\Users\\${guest_user}\\ievms.bat" + guest_control_exec "${1}" "cmd.exe" /c \ + "echo shutdown.exe /s /f /t 0 >>C:\\Users\\${guest_user}\\ievms.bat" + guest_control_exec "${1}" "schtasks.exe" /run /tn ievms wait_for_shutdown "${1}" } @@ -331,6 +360,9 @@ build_ievm() { log "Building ${vm} VM" declare -F "build_ievm_ie${1}" && "build_ievm_ie${1}" + + log "Tagging VM with ievms version" + VBoxManage setextradata "${vm}" "ievms" "{\"version\":\"${ievms_version}\"}" log "Creating clean snapshot" VBoxManage snapshot "${vm}" take clean --description "The initial VM state" @@ -339,7 +371,8 @@ build_ievm() { # Build the IE6 virtual machine. build_ievm_ie6() { - boot_ievms "IE6 - WinXP" + set_xp_password "IE6 - WinXP" + shutdown_xp "IE6 - WinXP" } # Build the IE7 virtual machine, reusing the XP VM if requested (the default). @@ -348,7 +381,7 @@ build_ievm_ie7() { then boot_auto_ga "IE7 - Vista" else - boot_ievms "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" fi } @@ -359,7 +392,7 @@ build_ievm_ie8() { then boot_auto_ga "IE8 - Win7" else - boot_ievms "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" fi } From 78edb583f49987849b7fc2433cb891422c21fe0d Mon Sep 17 00:00:00 2001 From: Greg Thornton Date: Sat, 30 Nov 2013 05:23:59 -0600 Subject: [PATCH 21/34] Bump version --- ievms.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ievms.sh b/ievms.sh index 80f7776..6e114ac 100755 --- a/ievms.sh +++ b/ievms.sh @@ -9,7 +9,7 @@ set -o pipefail # ## Gobal Variables # The ievms version. -ievms_version="0.1.1" +ievms_version="0.2.0" # Options passed to each `curl` command. curl_opts=${CURL_OPTS:-""} From b1f6cd340801029c5ed9f9bf230b772416bcef51 Mon Sep 17 00:00:00 2001 From: Tobias Date: Wed, 11 Dec 2013 08:38:20 +0100 Subject: [PATCH 22/34] Cleanup readme introduction - remove the striked-through stuff - remove the reference to mondern.IE - add linkebreak for easy copy-pasting to curl-line --- README.md | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 2b17523..5889334 100644 --- a/README.md +++ b/README.md @@ -3,22 +3,17 @@ Overview Microsoft provides virtual machine disk images to facilitate website testing in multiple versions of IE, regardless of the host operating system. -~~Unfortunately, setting these virtual machines up without Microsoft's VirtualPC -can be extremely difficult. The ievms scripts aim to facilitate that process using -VirtualBox on Linux or OS X.~~ With a single command, you can have IE6, IE7, IE8, +With a single command, you can have IE6, IE7, IE8, IE9, IE10 and IE11 running in separate virtual machines. -**NOTE:** As of Feb. 1st, 2013, the [MS images](http://www.modern.ie/virtualization-tools) -are fully compatible with Virtualbox, thanks to the [modern.IE](http://modern.IE) -project. - [![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: `curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | bash` +Just paste this into a terminal: +`curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | bash` Requirements From 082b3ff70dbb209552a81547169f237bc259fc0d Mon Sep 17 00:00:00 2001 From: Tobias Date: Wed, 11 Dec 2013 08:53:40 +0100 Subject: [PATCH 23/34] Improve readability in readme, move installation section up * Move the installation section up above the file-size-sections * Update markdown syntax so have better formatting --- README.md | 104 +++++++++++++++++++++++++++--------------------------- 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/README.md b/README.md index 2b17523..a99935d 100644 --- a/README.md +++ b/README.md @@ -24,12 +24,63 @@ Just paste this into a terminal: `curl -s https://raw.github.com/xdissent/ievms/ Requirements ============ -* VirtualBox (http://virtualbox.org) +* VirtualBox (http://virtualbox.org), select 'command line utilities' during installation * Curl (Ubuntu: `sudo apt-get install curl`) * Linux Only: unar (Ubuntu: `sudo apt-get install unar`) * Patience +Installation +============ + +**1.)** Install [VirtualBox](http://virtualbox.org) and check the [Requirements](#requirements) + +**2.)** Download and unpack ievms: + + * To install IE versions 6, 7, 8, 9, 10 and 11 use: + + curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | bash + + * To install specific IE versions (IE7 and IE9 only for example) use: + + curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | env IEVMS_VERSIONS="7 9" bash + +**3.)** Launch Virtual Box. + +**4.)** Choose ievms image from Virtual Box. + +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. + + +Recovering from a failed installation +------------------------------------- + +Each version is installed into `~/.ievms/` (or `INSTALL_PATH`). If the installation fails +for any reason (corrupted download, for instance), delete the appropriate ZIP/ova file +and rerun the install. + +If nothing else, you can delete `~/.ievms` (or `INSTALL_PATH`) and rerun the install. + + +Specifying the install path +--------------------------- + +To specify where the VMs are installed, use the `INSTALL_PATH` variable: + + curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | env INSTALL_PATH="/Path/to/.ievms" bash + + +Passing additional options to curl +---------------------------------- + +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.github.com/xdissent/ievms/master/ievms.sh | env CURL_OPTS="--limit-rate 50k" bash + + Disk requirements ----------------- @@ -86,57 +137,6 @@ tons of bandwidth but pretty much breaks even on disk space. Disable it with `REUSE_WIN7=no`. -Installation -============ - -1. Install VirtualBox (make sure command line utilities are selected and installed). - -2. Download and unpack ievms: - - * Install IE versions 6, 7, 8, 9, 10 and 11. - - curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | bash - - * Install specific IE versions (IE7 and IE9 only for example): - - curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | env IEVMS_VERSIONS="7 9" bash - -3. Launch Virtual Box. - -4. Choose ievms image from Virtual Box. - -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. - - -Recovering from a failed installation -------------------------------------- - -Each version is installed into `~/.ievms/` (or `INSTALL_PATH`). If the installation fails -for any reason (corrupted download, for instance), delete the appropriate ZIP/ova file -and rerun the install. - -If nothing else, you can delete `~/.ievms` (or `INSTALL_PATH`) and rerun the install. - - -Specifying the install path ---------------------------- - -To specify where the VMs are installed, use the `INSTALL_PATH` variable: - - curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | env INSTALL_PATH="/Path/to/.ievms" bash - - -Passing additional options to curl ----------------------------------- - -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.github.com/xdissent/ievms/master/ievms.sh | env CURL_OPTS="--limit-rate 50k" bash - - Features ======== From 411c617bc06108a2b9241247b76e2a1360e38fdb Mon Sep 17 00:00:00 2001 From: Tobias Date: Wed, 11 Dec 2013 09:08:54 +0100 Subject: [PATCH 24/34] Change quickstart formatting The previous change was not enough. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5889334..ab278bb 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,8 @@ Quickstart ========== Just paste this into a terminal: -`curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | bash` + + curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | bash Requirements From 41e290051ee24d1fc77c97f0ca357f3f4c010d70 Mon Sep 17 00:00:00 2001 From: Greg Thornton Date: Sat, 26 Apr 2014 12:54:08 -0500 Subject: [PATCH 25/34] Update URLs to reflect github domain name changes. --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 66873a2..046a348 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Quickstart Just paste this into a terminal: - curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | bash + curl -s https://raw.githubusercontent.com/xdissent/ievms/master/ievms.sh | bash Requirements @@ -35,11 +35,11 @@ Installation * To install IE versions 6, 7, 8, 9, 10 and 11 use: - curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | bash + curl -s https://raw.githubusercontent.com/xdissent/ievms/master/ievms.sh | bash * To install specific IE versions (IE7 and IE9 only for example) use: - curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | env IEVMS_VERSIONS="7 9" bash + curl -s https://raw.githubusercontent.com/xdissent/ievms/master/ievms.sh | env IEVMS_VERSIONS="7 9" bash **3.)** Launch Virtual Box. @@ -65,7 +65,7 @@ Specifying the install path To specify where the VMs are installed, use the `INSTALL_PATH` variable: - curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | env INSTALL_PATH="/Path/to/.ievms" bash + curl -s https://raw.githubusercontent.com/xdissent/ievms/master/ievms.sh | env INSTALL_PATH="/Path/to/.ievms" bash Passing additional options to curl @@ -74,7 +74,7 @@ Passing additional options to curl 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.github.com/xdissent/ievms/master/ievms.sh | env CURL_OPTS="--limit-rate 50k" bash + curl -s https://raw.githubusercontent.com/xdissent/ievms/master/ievms.sh | env CURL_OPTS="--limit-rate 50k" bash Disk requirements @@ -176,7 +176,7 @@ includes the updated browser version. **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.github.com/xdissent/ievms/master/ievms.sh | env REUSE_XP="no" bash + curl -s https://raw.githubusercontent.com/xdissent/ievms/master/ievms.sh | env REUSE_XP="no" bash Reusing Win7 VMs @@ -192,7 +192,7 @@ be successfully "rearmed" to extend the activation period. **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.github.com/xdissent/ievms/master/ievms.sh | REUSE_WIN7="no" bash + curl -s https://raw.githubusercontent.com/xdissent/ievms/master/ievms.sh | REUSE_WIN7="no" bash **NOTE:** It is currently impossible to install IE11 **without** reusing the From 96546ebc32932e8b787b0d78407eae3a4dc98b27 Mon Sep 17 00:00:00 2001 From: Greg Thornton Date: Wed, 11 Jun 2014 01:21:43 -0500 Subject: [PATCH 26/34] Add md5sum checking --- ievms.sh | 78 ++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 62 insertions(+), 16 deletions(-) diff --git a/ievms.sh b/ievms.sh index 6e114ac..14bd07f 100755 --- a/ievms.sh +++ b/ievms.sh @@ -40,15 +40,50 @@ log() { printf "$*\n" ; return $? ; } # Print an error message to the console and bail out of the script. fail() { log "\nERROR: $*\n" ; exit 1 ; } +check_md5() { + local md5 + + case $kernel in + Darwin) md5=`md5 "${1}" | rev | cut -c-32 | rev` ;; + Linux) md5=`md5sum "${1}" | cut -c-32` ;; + esac + + if [ "${md5}" != "${2}" ] + then + log "MD5 check failed for ${1} (wanted ${2}, got ${md5})" + return 1 + fi + + log "MD5 check succeeded for ${1}" +} + # Download a URL to a local file. Accepts a name, URL and file. -download() { +download() { # name url path md5 + local attempt=${5:-"0"} + local max=${6:-"3"} + + let attempt+=1 + if [[ -f "${3}" ]] then log "Found ${1} at ${3} - skipping download" - else - log "Downloading ${1} from ${2} to ${3}" - curl ${curl_opts} -L "${2}" -o "${3}" || fail "Failed to download ${2} to ${ievms_home}/${3} using 'curl', error code ($?)" + check_md5 "${3}" "${4}" && return 0 + log "Check failed - redownloading ${1}" + rm -f "${3}" fi + + log "Downloading ${1} from ${2} to ${3} (attempt ${attempt} of ${max})" + curl ${curl_opts} -L "${2}" -o "${3}" || fail "Failed to download ${2} to ${ievms_home}/${3} using 'curl', error code ($?)" + check_md5 "${3}" "${4}" && return 0 + + if [ "${attempt}" == "${max}" ] + then + echo "Failed to download ${2} to ${ievms_home}/${3} (attempt ${attempt} of ${max})" + return 1 + fi + + log "Redownloading ${1}" + download "${1}" "${2}" "${3}" "${4}" "${attempt}" "${max}" } # ## General Setup @@ -116,8 +151,10 @@ check_ext_pack() { check_version local archive="Oracle_VM_VirtualBox_Extension_Pack-${major_minor_release}.vbox-extpack" local url="http://download.virtualbox.org/virtualbox/${major_minor_release}/${archive}" + local md5s="https://www.virtualbox.org/download/hashes/${major_minor_release}/MD5SUMS" + local md5=`curl ${curl_opts} -L "${md5s}" | grep "${archive}" | cut -c-32` - download "Oracle VM VirtualBox Extension Pack" "${url}" "${archive}" + download "Oracle VM VirtualBox Extension Pack" "${url}" "${archive}" "${md5}" log "Installing Oracle VM VirtualBox Extension Pack from ${ievms_home}/${archive}" VBoxManage extpack install "${archive}" || fail "Failed to install Oracle VM VirtualBox Extension Pack from ${ievms_home}/${archive}, error code ($?)" @@ -129,7 +166,7 @@ install_unar() { local url="http://theunarchiver.googlecode.com/files/unar1.5.zip" local archive=`basename "${url}"` - download "unar" "${url}" "${archive}" + download "unar" "${url}" "${archive}" "fbf544d1332c481d7d0f4e3433fbe53b" unzip "${archive}" || fail "Failed to extract ${ievms_home}/${archive} to ${ievms_home}/, unzip command returned error code $?" @@ -173,7 +210,7 @@ find_iso() { iso=$dev_iso else iso="${ievms_home}/ievms-control-${ievms_version}.iso" - download "ievms control ISO" "${url}" "${iso}" + download "ievms control ISO" "${url}" "${iso}" "6699cb421fc2f56e854fd3f5e143e84c" fi } @@ -270,11 +307,11 @@ shutdown_xp() { # Install an alternative version of IE in an XP virtual machine. Downloads the # installer, copies it to the vm, then runs it before shutting down. -install_ie_xp() { # vm url +install_ie_xp() { # vm url md5 local src=`basename "${2}"` local dest="/Documents and Settings/${guest_user}/Desktop/${src}" - download "${src}" "${2}" "${src}" + download "${src}" "${2}" "${src}" "${3}" copy_to_vm "${1}" "${src}" "${dest}" log "Installing IE" # Always "fails" @@ -285,11 +322,11 @@ install_ie_xp() { # vm url # Install an alternative version of IE in a Win7 virtual machine. Downloads the # installer, copies it to the vm, then runs it before shutting down. -install_ie_win7() { # vm url +install_ie_win7() { # vm url md5 local src=`basename "${2}"` local dest="/Users/${guest_user}/Desktop/${src}" - download "${src}" "${2}" "${src}" + download "${src}" "${2}" "${src}" "${3}" start_vm "${1}" wait_for_guestcontrol "${1}" copy_to_vm "${1}" "${src}" "${dest}" @@ -341,11 +378,20 @@ build_ievm() { unit=${unit:-"11"} local ova=`basename "${archive/_/ - }" .zip`.ova local url="http://virtualization.modern.ie/vhd/IEKitV1_Final/VirtualBox/OSX/${archive}" + + local md5 + 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" ;; + esac log "Checking for existing OVA at ${ievms_home}/${ova}" if [[ ! -f "${ova}" ]] then - download "OVA ZIP" "${url}" "${archive}" + download "OVA ZIP" "${url}" "${archive}" "${md5}" log "Extracting OVA from ${ievms_home}/${archive}" unar "${archive}" || fail "Failed to extract ${archive} to ${ievms_home}/${ova}, unar command returned error code $?" @@ -382,7 +428,7 @@ build_ievm_ie7() { boot_auto_ga "IE7 - Vista" else 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" + 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 } @@ -393,7 +439,7 @@ build_ievm_ie8() { boot_auto_ga "IE8 - Win7" else 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" + 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 } @@ -409,14 +455,14 @@ build_ievm_ie10() { boot_auto_ga "IE10 - Win8" else boot_auto_ga "IE10 - Win7" - install_ie_win7 "IE10 - Win7" "http://download.microsoft.com/download/8/A/C/8AC7C482-BC74-492E-B978-7ED04900CEDE/IE10-Windows6.1-x86-en-us.exe" + install_ie_win7 "IE10 - Win7" "http://download.microsoft.com/download/8/A/C/8AC7C482-BC74-492E-B978-7ED04900CEDE/IE10-Windows6.1-x86-en-us.exe" "0f14b2de0b3cef611b9c1424049e996b" fi } # 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" + 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" } # ## Main Entry Point From 07ac40e97ef7f2197cdc1f57315227e015082d1d Mon Sep 17 00:00:00 2001 From: Greg Thornton Date: Fri, 13 Jun 2014 12:09:24 -0500 Subject: [PATCH 27/34] Bump version --- ievms.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ievms.sh b/ievms.sh index 14bd07f..c8acfae 100755 --- a/ievms.sh +++ b/ievms.sh @@ -9,7 +9,7 @@ set -o pipefail # ## Gobal Variables # The ievms version. -ievms_version="0.2.0" +ievms_version="0.2.1" # Options passed to each `curl` command. curl_opts=${CURL_OPTS:-""} From b3fb502ff5fa447908c4d11d95c0fab2c7caeff0 Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Tue, 29 Jul 2014 11:59:34 -0400 Subject: [PATCH 28/34] Fix typo --- ievms.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ievms.sh b/ievms.sh index c8acfae..2149f80 100755 --- a/ievms.sh +++ b/ievms.sh @@ -6,7 +6,7 @@ set -o errtrace set -o errexit set -o pipefail -# ## Gobal Variables +# ## Global Variables # The ievms version. ievms_version="0.2.1" From 827286cb8dbf11f1018f379aad3161a12e71a551 Mon Sep 17 00:00:00 2001 From: Greg Thornton Date: Thu, 20 Aug 2015 20:07:08 -0500 Subject: [PATCH 29/34] Update for VirtualBox 5.0 --- ievms.sh | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/ievms.sh b/ievms.sh index 2149f80..af31980 100755 --- a/ievms.sh +++ b/ievms.sh @@ -9,7 +9,7 @@ set -o pipefail # ## Global Variables # The ievms version. -ievms_version="0.2.1" +ievms_version="0.3.0" # Options passed to each `curl` command. curl_opts=${CURL_OPTS:-""} @@ -257,22 +257,20 @@ start_vm() { VBoxManage startvm "${1}" --type headless } -# Copy a file to the virtual machine. An optional password will be used -# if given. +# Copy a file to the virtual machine from the ievms home folder. copy_to_vm() { log "Copying ${2} to ${3}" - VBoxManage guestcontrol "${1}" cp "${ievms_home}/${2}" "${3}" \ - --username "${guest_user}" --password "${guest_pass}" + guest_control_exec "${1}" cmd.exe /c copy "E:\\${2}" "${3}" } # Execute a command with arguments on a virtual machine. guest_control_exec() { local vm="${1}" local image="${2}" - shift; shift - VBoxManage guestcontrol "${vm}" exec --image "${image}" \ + shift + VBoxManage guestcontrol "${vm}" run \ --username "${guest_user}" --password "${guest_pass}" \ - --wait-exit -- "$@" + --exe "${image}" -- "$@" } # Start an XP virtual machine and set the password for the guest user. @@ -281,19 +279,19 @@ set_xp_password() { wait_for_guestcontrol "${1}" log "Setting ${guest_user} password" - VBoxManage guestcontrol "${1}" exec --image "net.exe" --username \ - Administrator --password "${guest_pass}" --wait-exit -- \ - user "${guest_user}" "${guest_pass}" + VBoxManage guestcontrol "${1}" run --username Administrator \ + --password "${guest_pass}" --exe "net.exe" -- \ + net.exe user "${guest_user}" "${guest_pass}" log "Setting auto logon password" - VBoxManage guestcontrol "${1}" exec --image "reg.exe" --username \ - Administrator --password "${guest_pass}" --wait-exit -- add \ + VBoxManage guestcontrol "${1}" run --username Administrator \ + --password "${guest_pass}" --exe "reg.exe" -- reg.exe add \ "HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon" \ /f /v DefaultPassword /t REG_SZ /d "${guest_pass}" log "Enabling auto admin logon" - VBoxManage guestcontrol "${1}" exec --image "reg.exe" --username \ - Administrator --password "${guest_pass}" --wait-exit -- add \ + VBoxManage guestcontrol "${1}" run --username Administrator \ + --password "${guest_pass}" --exe "reg.exe" -- reg.exe add \ "HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon" \ /f /v AutoAdminLogon /t REG_SZ /d 1 } @@ -309,7 +307,7 @@ shutdown_xp() { # installer, copies it to the vm, then runs it before shutting down. install_ie_xp() { # vm url md5 local src=`basename "${2}"` - local dest="/Documents and Settings/${guest_user}/Desktop/${src}" + local dest="C:\\Documents and Settings\\${guest_user}\\Desktop\\${src}" download "${src}" "${2}" "${src}" "${3}" copy_to_vm "${1}" "${src}" "${dest}" @@ -324,7 +322,7 @@ install_ie_xp() { # vm url md5 # installer, copies it to the vm, then runs it before shutting down. install_ie_win7() { # vm url md5 local src=`basename "${2}"` - local dest="/Users/${guest_user}/Desktop/${src}" + local dest="C:\\Users\\${guest_user}\\Desktop\\${src}" download "${src}" "${2}" "${src}" "${3}" start_vm "${1}" @@ -404,6 +402,10 @@ build_ievm() { log "Creating ${vm} VM (disk: ${disk_path})" VBoxManage import "${ova}" --vsys 0 --vmname "${vm}" --unit "${unit}" --disk "${disk_path}" + log "Adding shared folder" + VBoxManage sharedfolder add "${vm}" --automount --name ievms \ + --hostpath "${ievms_home}" + log "Building ${vm} VM" declare -F "build_ievm_ie${1}" && "build_ievm_ie${1}" From 0416b6a2c8a13a832c7299a52a16172085452679 Mon Sep 17 00:00:00 2001 From: Greg Thornton Date: Fri, 21 Aug 2015 01:01:20 -0500 Subject: [PATCH 30/34] Add edge support --- README.md | 30 ++++++++++++++++++------------ ievms.sh | 24 ++++++++++++++++++++---- 2 files changed, 38 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 046a348..f5b54e8 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ 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 and IE11 running in separate virtual machines. +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) @@ -20,11 +20,13 @@ Just paste this into a terminal: Requirements ============ -* VirtualBox (http://virtualbox.org), select 'command line utilities' during installation +* VirtualBox > 5.0 (http://virtualbox.org), select 'command line utilities' during installation * Curl (Ubuntu: `sudo apt-get install curl`) * Linux Only: unar (Ubuntu: `sudo apt-get install unar`) * Patience +**NOTE** Use [ievms version 0.2.1](https://github.com/xdissent/ievms/raw/v0.2.1/ievms.sh) for VirtualBox < 5.0. + Installation ============ @@ -33,13 +35,13 @@ Installation **2.)** Download and unpack ievms: - * To install IE versions 6, 7, 8, 9, 10 and 11 use: + * To install IE versions 6, 7, 8, 9, 10, 11 and EDGE use: curl -s https://raw.githubusercontent.com/xdissent/ievms/master/ievms.sh | bash - * To install specific IE versions (IE7 and IE9 only for example) use: + * To install specific IE versions (IE7, IE9 and EDGE only for example) use: - curl -s https://raw.githubusercontent.com/xdissent/ievms/master/ievms.sh | env IEVMS_VERSIONS="7 9" bash + curl -s https://raw.githubusercontent.com/xdissent/ievms/master/ievms.sh | env IEVMS_VERSIONS="7 9 EDGE" bash **3.)** Launch Virtual Box. @@ -80,7 +82,7 @@ environment variable. For example, you can set a download speed limit: Disk requirements ----------------- -A full ievms install will require approximately 48G: +A full ievms install will require approximately 69G: Servo:.ievms xdissent$ du -ch * 11G IE10 - Win7-disk1.vmdk @@ -97,18 +99,21 @@ A full ievms install will require approximately 48G: 11G IE9 - Win7-disk1.vmdk 4.7G IE9 - Win7.ova 4.7G IE9_Win7.zip - 3.4M ievms-control-0.1.0.iso + 10G MSEdge - Win10-disk1.vmdk + 5.1G MSEdge - Win10.ova + 5.0G MSEdge_Win10.zip + 3.4M ievms-control-0.3.0.iso 4.6M lsar 4.5M unar 4.1M unar1.5.zip - 48G total + 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: $ find ~/.ievms -type f ! -name "*.vmdk" -exec rm {} \; -If all installation related files are removed, around 37G is required: +If all installation related files are removed, around 47G is required: Servo:.ievms xdissent$ du -ch * 11G IE10 - Win7-disk1.vmdk @@ -117,17 +122,18 @@ If all installation related files are removed, around 37G is required: 1.6G IE7 - WinXP-disk1.vmdk 1.6G IE8 - WinXP-disk1.vmdk 11G IE9 - Win7-disk1.vmdk - 37G total + 10G MSEdge - Win10-disk1.vmdk + 47G total Bandwidth requirements ---------------------- -A full installation will download roughly 7.5G of data. +A full installation will download roughly 12.5G of data. **NOTE:** Reusing the XP VM for IE7 and IE8 (the default) saves an incredible amount of space and bandwidth. If it is disabled (`REUSE_XP=no`) the disk space -required climbs to 74G (39G if cleaned post-install) and around 17G will be +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 `REUSE_WIN7=no`. diff --git a/ievms.sh b/ievms.sh index af31980..bed3d75 100755 --- a/ievms.sh +++ b/ievms.sh @@ -343,6 +343,8 @@ install_ie_win7() { # vm url md5 build_ievm() { unset archive unset unit + local prefix="IE" + local version="${1}" case $1 in 6|7|8) os="WinXP" @@ -367,15 +369,28 @@ build_ievm() { archive="IE9_Win7.zip" fi ;; + EDGE) + prefix="MS" + version="Edge" + os="Win10" + unit="8" + ;; *) fail "Invalid IE version: ${1}" ;; esac - local vm="IE${1} - ${os}" + local vm="${prefix}${version} - ${os}" local def_archive="${vm/ - /_}.zip" archive=${archive:-$def_archive} unit=${unit:-"11"} local ova=`basename "${archive/_/ - }" .zip`.ova - local url="http://virtualization.modern.ie/vhd/IEKitV1_Final/VirtualBox/OSX/${archive}" + + local url + if [ "${os}" == "Win10" ] + then + url="https://az792536.vo.msecnd.net/vms/VMBuild_20150801/VirtualBox/MSEdge/Mac/Microsoft%20Edge.Win10.For.Mac.VirtualBox.zip" + else + url="http://virtualization.modern.ie/vhd/IEKitV1_Final/VirtualBox/OSX/${archive}" + fi local md5 case $archive in @@ -384,6 +399,7 @@ build_ievm() { IE8_Win7.zip) md5="21b0aad3d66dac7f88635aa2318a3a55" ;; IE9_Win7.zip) md5="58d201fe7dc7e890ad645412264f2a2c" ;; IE10_Win8.zip) md5="cc4e2f4b195e1b1e24e2ce6c7a6f149c" ;; + MSEdge_Win10.zip) md5="c1011b491d49539975fb4c3eeff16dae" ;; esac log "Checking for existing OVA at ${ievms_home}/${ova}" @@ -477,10 +493,10 @@ check_ext_pack check_unar # Install each requested virtual machine sequentially. -all_versions="6 7 8 9 10 11" +all_versions="6 7 8 9 10 11 EDGE" for ver in ${IEVMS_VERSIONS:-$all_versions} do - log "Building IE${ver} VM" + log "Building IE ${ver} VM" build_ievm $ver done From a61715d42587be90ae2a5769039d08194cd51487 Mon Sep 17 00:00:00 2001 From: Greg Thornton Date: Fri, 21 Aug 2015 15:42:58 -0500 Subject: [PATCH 31/34] Fix log escape handling --- ievms.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ievms.sh b/ievms.sh index bed3d75..e7f3d9a 100755 --- a/ievms.sh +++ b/ievms.sh @@ -35,7 +35,7 @@ guest_pass="Passw0rd!" # ## Utilities # Print a message to the console. -log() { printf "$*\n" ; return $? ; } +log() { printf '%s\n' "$*" ; return $? ; } # Print an error message to the console and bail out of the script. fail() { log "\nERROR: $*\n" ; exit 1 ; } From 1de54914fd4a6dc46d34d1830ad1f9535fec5e20 Mon Sep 17 00:00:00 2001 From: Greg Thornton Date: Fri, 21 Aug 2015 15:59:55 -0500 Subject: [PATCH 32/34] Bump --- ievms.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ievms.sh b/ievms.sh index e7f3d9a..e440dff 100755 --- a/ievms.sh +++ b/ievms.sh @@ -9,7 +9,7 @@ set -o pipefail # ## Global Variables # The ievms version. -ievms_version="0.3.0" +ievms_version="0.3.1" # Options passed to each `curl` command. curl_opts=${CURL_OPTS:-""} From 72e4b6d9d7913818ea193ffbf364692decc29618 Mon Sep 17 00:00:00 2001 From: Greg Thornton Date: Tue, 3 Jan 2017 07:08:50 -0600 Subject: [PATCH 33/34] Fix urls and guest additions --- control/build.sh | 23 +++++++++++++---------- control/stage2 | 7 +++++-- control/vboxga.bat | 5 +++-- control/vsint.cer | Bin 0 -> 1236 bytes control/xp.reg | Bin 276 -> 0 bytes control/xpsw.reg | Bin 0 -> 510 bytes control/xpusr.reg | Bin 0 -> 322 bytes control/xpvboxga.bat | 4 ++++ ievms.sh | 29 +++++++++++++++++------------ 9 files changed, 42 insertions(+), 26 deletions(-) create mode 100644 control/vsint.cer delete mode 100644 control/xp.reg create mode 100644 control/xpsw.reg create mode 100644 control/xpusr.reg create mode 100644 control/xpvboxga.bat diff --git a/control/build.sh b/control/build.sh index 0e54bbc..c7be53b 100755 --- a/control/build.sh +++ b/control/build.sh @@ -21,7 +21,7 @@ install_packages() { } download_cross_compiler() { - url="http://landley.net/aboriginal/downloads/binaries/cross-compiler-i686.tar.bz2" + url="http://landley.net/aboriginal/downloads/binaries/cross-compiler-i686.tar.gz" archive=`basename "${url}"` log "Downloading cross compiler archive from ${url} to ${ievms_home}/${archive}" if [[ ! -e "${archive}" ]] && ! curl -L "${url}" -o "${archive}" @@ -31,9 +31,9 @@ download_cross_compiler() { } extract_cross_compiler() { - cross_compiler=`basename "${archive}" .tar.bz2` + cross_compiler=`basename "${archive}" .tar.gz` log "Extracting cross compiler archive from ${archive} to ${ievms_home}/${cross_compiler}" - if [[ ! -e "${cross_compiler}" ]] && ! tar -jxf "${archive}" + if [[ ! -e "${cross_compiler}" ]] && ! tar -zxf "${archive}" then fail "Failed to extract ${archive} to ${ievms_home}/${cross_compiler} using 'tar', error code ($?)" fi @@ -46,7 +46,7 @@ download_kernel() { if [[ ! -e "${archive}" ]] && ! curl -L "${url}" -o "${archive}" then fail "Failed to download ${url} to ${ievms_home}/${archive} using 'curl', error code ($?)" - fi + fi } extract_kernel() { @@ -55,7 +55,7 @@ extract_kernel() { if [[ ! -e "${kernel_src}" ]] && ! tar -jxf "${archive}" then fail "Failed to extract ${archive} to ${ievms_home}/${kernel_src} using 'tar', error code ($?)" - fi + fi } configure_kernel() { @@ -82,7 +82,7 @@ download_iso() { if [[ ! -e "${archive}" ]] && ! curl -L "${url}" -o "${archive}" then fail "Failed to download ${url} to ${ievms_home}/${archive} using 'curl', error code ($?)" - fi + fi } extract_iso() { @@ -91,7 +91,7 @@ extract_iso() { if [[ ! -e "${iso}" ]] && ! unzip "${archive}" then fail "Failed to extract ${archive} to ${ievms_home}/${iso} using 'unzip', error code ($?)" - fi + fi } unpack_iso() { @@ -118,10 +118,13 @@ extract_initrd() { copy_scripts() { log "Copying scripts" cp "/vagrant/control/stage2" "${initrd}/scripts/" - cp "/vagrant/control/xp.reg" "${initrd}/scripts/" + cp "/vagrant/control/xpsw.reg" "${initrd}/scripts/" + cp "/vagrant/control/xpusr.reg" "${initrd}/scripts/" + cp "/vagrant/control/xpvboxga.bat" "${initrd}/scripts/" cp "/vagrant/control/deuac.reg" "${initrd}/scripts/" cp "/vagrant/control/reuac.reg" "${initrd}/scripts/" cp "/vagrant/control/vboxga.bat" "${initrd}/scripts/" + cp "/vagrant/control/vsint.cer" "${initrd}/scripts/" cp "/vagrant/control/ievms.xml" "${initrd}/scripts/" cp "/vagrant/control/ievms.bat" "${initrd}/scripts/" cp "/vagrant/control/isolinux.cfg" "${remaster_iso}/isolinux.cfg" @@ -143,7 +146,7 @@ compress_initrd() { pack_iso() { iso_out="/vagrant/ievms-control.iso" log "Packing ievms ISO from ${remaster_iso} to ${iso_out}" - if ! genisoimage -o "${iso_out}" -b isolinux.bin -c boot.cat -p "ievms" -no-emul-boot -boot-load-size 4 -boot-info-table -V "IEVMS" -cache-inodes -r -J -l -joliet-long "${remaster_iso}" + if ! genisoimage -o "${iso_out}" -b isolinux.bin -c boot.cat -p "ievms" -no-emul-boot -boot-load-size 4 -boot-info-table -V "IEVMS" -cache-inodes -r -J -l -joliet-long "${remaster_iso}" then fail "Failed to pack ${remaster_iso} to ${iso_out} using 'genisoimage', error code ($?)" fi @@ -164,4 +167,4 @@ unpack_iso extract_initrd copy_scripts compress_initrd -pack_iso \ No newline at end of file +pack_iso diff --git a/control/stage2 b/control/stage2 index df7fba7..3b00413 100755 --- a/control/stage2 +++ b/control/stage2 @@ -14,7 +14,9 @@ fi if [ -d /disk/WINDOWS ] then - reged -IC /disk/WINDOWS/system32/config/system HKEY_LOCAL_MACHINE\\SYSTEM /scripts/xp.reg + reged -IC /disk/WINDOWS/system32/config/software HKEY_LOCAL_MACHINE\\SOFTWARE /scripts/xpsw.reg + reged -IC /disk/Documents\ and\ Settings/IEUser/NTUSER.DAT HKEY_USERS\\S-1-5-21-776561741-308236825-1417001333-1003 /scripts/xpusr.reg + cp /scripts/xpvboxga.bat /disk/Documents\ and\ Settings/All\ Users/Start\ Menu/Programs/Startup/ else reged -IC /disk/Windows/System32/config/SOFTWARE HKEY_LOCAL_MACHINE\\SOFTWARE /scripts/deuac.reg @@ -25,9 +27,10 @@ else cp /scripts/vboxga.bat /disk/ProgramData/Microsoft/Windows/Start\ Menu/Programs/StartUp/ fi + cp /scripts/vsint.cer /disk/vsint.cer cp /scripts/reuac.reg /disk/reuac.reg cp /scripts/ievms.xml /disk/ievms.xml cp /scripts/ievms.bat /disk/ievms.bat fi umount /disk 2>/dev/null -poweroff \ No newline at end of file +poweroff diff --git a/control/vboxga.bat b/control/vboxga.bat index c28e837..9a5b831 100644 --- a/control/vboxga.bat +++ b/control/vboxga.bat @@ -1,6 +1,7 @@ cd /d D:\ cd \cert -VBoxCertUtil.exe add-trusted-publisher oracle-vbox.cer --root oracle-vbox.cer +VBoxCertUtil.exe add-trusted-publisher vbox-sha1.cer --root C:\vsint.cer +del C:\vsint.cer cd \ VBoxWindowsAdditions.exe /S regedit.exe /S C:\reuac.reg @@ -12,4 +13,4 @@ schtasks.exe /run /tn ievms timeout /t 30 del C:\Users\IEUser\ievms.bat shutdown.exe /s /t 00 -del %0 \ No newline at end of file +del %0 diff --git a/control/vsint.cer b/control/vsint.cer new file mode 100644 index 0000000000000000000000000000000000000000..dc95f4e75c1ed7179d3fd1c466358a791072696e GIT binary patch literal 1236 zcmXqLV!2?@#A3OCnTe5!NkEn7#RG#xz4_Xm-&uWYe*87yW#iOp^Jx3d%gD&e%3u(0 z$Zf#M#vIDRCd?EXY$$FZ3gU1H^M$1rWd>)a=jkYT<|XSHnj4scB)En3oO2S3ixrF& z0!ou|GLsboiZXK(iz*eIQ;SM6(=wA2OEUBG6dX%SGV+TuODYZI#CZ+O3=It|48R~t zoY%+@$Tc@IHnlXhj526EMWhSl4P+rM5Q8~QA*86ZxJ1D(wWK`1DBIA=zyhMcP$OAW z!N|bCOaZ16;t2&^1-JYng+z$ks!~%FN{dq!^7C>k4P6bKL3){mZD3jyNb@JqYbbYI-<_I0Hm)+ewIBS`WcnG- zu{fnwRQ>D6wI>WaW0hWLty<=^x&Oz`(Cr(ydvE^NU&kK)=DqXnv?S5Q^9j65ZruCv z;BXR$ZHVw|&r^{ht!huT`=#f<{t!aTOFaF;#`1o`&L<2{?pke?{Li%Oi_N(QiKIu(%@36^iKK;*quXdgP(W&eB z=3cqzd?3B}u?R=qQ~UYFJB+!`$J(2;PwRRY{6bZfiJ6gsad8vlY+#5?H{b^bxvVfF z<9`-b17;v)U|u7XJggoV`h?K5$S(=S*mSKZ(sJ|^9@;7JS23gCG`wc z#gw5w%gImAM|DP7F<1;_k_p^8MiyX@7^uMb28?YIPy_OliwjT;Ft7s!fhr3q$3nf$ z%m`;O!CA~~oC$3njBP)hSQy#3AWTcAv&KAH*E_?QmE||@dtt>9x#f+k>G!Va|7qs~)*s6a@0G0BzH`yV T@K^G)yw~qK*(X$YZ0~;n-&vrF literal 0 HcmV?d00001 diff --git a/control/xp.reg b/control/xp.reg deleted file mode 100644 index b02d8c0febc20ff6af71df9c4b4baba8918145fe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 276 zcmZXP!3x4a3`E~q@E=M)K=j~6@E}D{vuFtV`P7$mus8ZL}Bs0M?u?f&c&j diff --git a/control/xpsw.reg b/control/xpsw.reg new file mode 100644 index 0000000000000000000000000000000000000000..4dd43bbc408eaf0d1e7568701882adddd222e18f GIT binary patch literal 510 zcmcJM-Acni5QV>M!FLF~4r2YSf)`R1MXOT9B1TF`V+}|msrBdOwO^JB@c|^{?9Mr} zXJ>YPzDE?4OsM!^M#PYusoab=YQAKSRSToaIO0ydRxON6<89Vh_giHp{12RR?wNbW zTyRC7L)S3_*S^{rm#PUjYA4(>k{>JlC1X4KYDs{gH}@yuoC zyz&@o>2Pgs!8@sZ?(M1G&vZBtb3WOpCl`C$R=^E0vzwS5_QVOB;;voBW;XlOs9~CY sPmd1F2)J(-wQO#v=l|RkYE7@H0?J~4Frj#lQ=x6Wf)o_LJozJGjLFnIs~ literal 0 HcmV?d00001 diff --git a/control/xpvboxga.bat b/control/xpvboxga.bat new file mode 100644 index 0000000..1b9411b --- /dev/null +++ b/control/xpvboxga.bat @@ -0,0 +1,4 @@ +cd /d D:\ +VBoxWindowsAdditions.exe /S +shutdown.exe /s /t 00 +del %0 diff --git a/ievms.sh b/ievms.sh index e440dff..97d68d0 100755 --- a/ievms.sh +++ b/ievms.sh @@ -9,7 +9,7 @@ set -o pipefail # ## Global Variables # The ievms version. -ievms_version="0.3.1" +ievms_version="0.3.2" # Options passed to each `curl` command. curl_opts=${CURL_OPTS:-""} @@ -163,10 +163,10 @@ check_ext_pack() { # Download and install `unar` from Google Code. install_unar() { - local url="http://theunarchiver.googlecode.com/files/unar1.5.zip" + local url="http://unarchiver.c3.cx/downloads/unar1.10.1.zip" local archive=`basename "${url}"` - download "unar" "${url}" "${archive}" "fbf544d1332c481d7d0f4e3433fbe53b" + download "unar" "${url}" "${archive}" "d548661e4b6c33512074df81e39ed874" unzip "${archive}" || fail "Failed to extract ${ievms_home}/${archive} to ${ievms_home}/, unzip command returned error code $?" @@ -188,7 +188,7 @@ wait_for_shutdown() { while true ; do log "Waiting for ${1} to shutdown..." sleep "${sleep_wait}" - VBoxManage showvminfo "${1}" | grep "State:" | grep -q "powered off" && return 0 || true + VBoxManage showvminfo "${1}" | grep "State:" | grep -q "powered off" && sleep "${sleep_wait}" && return 0 || true done } @@ -210,7 +210,7 @@ find_iso() { iso=$dev_iso else iso="${ievms_home}/ievms-control-${ievms_version}.iso" - download "ievms control ISO" "${url}" "${iso}" "6699cb421fc2f56e854fd3f5e143e84c" + download "ievms control ISO" "${url}" "${iso}" "1fe3f95e0731bbcba949564cf9bbe28a" fi } @@ -344,6 +344,7 @@ build_ievm() { unset archive unset unit local prefix="IE" + local suffix="" local version="${1}" case $1 in 6|7|8) @@ -371,6 +372,7 @@ build_ievm() { ;; EDGE) prefix="MS" + suffix="_preview" version="Edge" os="Win10" unit="8" @@ -382,14 +384,14 @@ build_ievm() { local def_archive="${vm/ - /_}.zip" archive=${archive:-$def_archive} unit=${unit:-"11"} - local ova=`basename "${archive/_/ - }" .zip`.ova + local ova="`basename "${archive/_/ - }" .zip`${suffix}.ova" local url if [ "${os}" == "Win10" ] then - url="https://az792536.vo.msecnd.net/vms/VMBuild_20150801/VirtualBox/MSEdge/Mac/Microsoft%20Edge.Win10.For.Mac.VirtualBox.zip" + url="https://az792536.vo.msecnd.net/vms/VMBuild_20160802/VirtualBox/MSEdge/MSEdge.Win10_RS1.VirtualBox.zip" else - url="http://virtualization.modern.ie/vhd/IEKitV1_Final/VirtualBox/OSX/${archive}" + url="https://az412801.vo.msecnd.net/vhd/IEKitV1_Final/VirtualBox/OSX/${archive}" fi local md5 @@ -399,9 +401,9 @@ build_ievm() { IE8_Win7.zip) md5="21b0aad3d66dac7f88635aa2318a3a55" ;; IE9_Win7.zip) md5="58d201fe7dc7e890ad645412264f2a2c" ;; IE10_Win8.zip) md5="cc4e2f4b195e1b1e24e2ce6c7a6f149c" ;; - MSEdge_Win10.zip) md5="c1011b491d49539975fb4c3eeff16dae" ;; + MSEdge_Win10.zip) md5="467d8286cb8cbed90f0761c3566abdda" ;; esac - + log "Checking for existing OVA at ${ievms_home}/${ova}" if [[ ! -f "${ova}" ]] then @@ -427,7 +429,7 @@ build_ievm() { log "Tagging VM with ievms version" VBoxManage setextradata "${vm}" "ievms" "{\"version\":\"${ievms_version}\"}" - + log "Creating clean snapshot" VBoxManage snapshot "${vm}" take clean --description "The initial VM state" fi @@ -435,6 +437,7 @@ build_ievm() { # Build the IE6 virtual machine. build_ievm_ie6() { + boot_auto_ga "IE6 - WinXP" set_xp_password "IE6 - WinXP" shutdown_xp "IE6 - WinXP" } @@ -445,6 +448,7 @@ build_ievm_ie7() { 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 @@ -456,6 +460,7 @@ build_ievm_ie8() { 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 @@ -473,7 +478,7 @@ build_ievm_ie10() { boot_auto_ga "IE10 - Win8" else boot_auto_ga "IE10 - Win7" - install_ie_win7 "IE10 - Win7" "http://download.microsoft.com/download/8/A/C/8AC7C482-BC74-492E-B978-7ED04900CEDE/IE10-Windows6.1-x86-en-us.exe" "0f14b2de0b3cef611b9c1424049e996b" + install_ie_win7 "IE10 - Win7" "https://raw.githubusercontent.com/kbandla/installers/master/MSIE/IE10-Windows6.1-x86-en-us.exe" "0f14b2de0b3cef611b9c1424049e996b" fi } From ad487055333658a5b3555c6d1425e229a18b9409 Mon Sep 17 00:00:00 2001 From: Greg Thornton Date: Thu, 16 Mar 2017 10:59:52 -0500 Subject: [PATCH 34/34] Move iso to GH --- ievms.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ievms.sh b/ievms.sh index 97d68d0..f493b02 100755 --- a/ievms.sh +++ b/ievms.sh @@ -9,7 +9,7 @@ set -o pipefail # ## Global Variables # The ievms version. -ievms_version="0.3.2" +ievms_version="0.3.3" # Options passed to each `curl` command. curl_opts=${CURL_OPTS:-""} @@ -203,7 +203,7 @@ wait_for_guestcontrol() { # Find or download the ievms control ISO. find_iso() { - local url="https://dl.dropboxusercontent.com/u/463624/ievms-control-${ievms_version}.iso" + local url="https://github.com/xdissent/ievms/releases/download/v${ievms_version}/ievms-control.iso" local dev_iso="${orig_cwd}/ievms-control.iso" # Use local iso if in ievms dev root if [[ -f "${dev_iso}" ]] then