Dev Notes

Various Cheat Sheets and Resources by David Egan/Carawebs.

Testing Internet Explorer in Ubuntu Using Virtual Machines


VM
David Egan

Cross-browser testing of Internet Explorer in a Ubuntu 14.04 development environment - using VirtualBox and Microsoft VM.

VirtualBox

VirtualBox is a system emulator that can run a guest operating system in a window of the host operating system.

This allows us to test websites on a range of platforms without dual-booting or running a dedicated test-machine.

There are two versions of Virtualbox available for Ubuntu. Both open-source, one is packaged by Ubuntu, the other provided by VirtualBox. Either download Virtualbox for Linux and build it yourself, or access Virtualbox in the Ubuntu software manager:

Build a Windows VM

Go to modern.ie and create the build you need. You can select an OS and a version of Internet Explorer.

Select “VirtualBox for Linux” as the Platform, and select “Download your Virtual Machine”.

Click “Batch File Download” - this opens a txt file with a list of URLS. The URLS are the files required to build the Windows VM.

Create a new directory for the VM, and move into the directory:

cd
mkdir win7IE11
cd win7IE11

Run wget -i against the URL of the batch txt file to download all the necessary files:

wget -i https://az412801.vo.msecnd.net/vhd/VMBuild_20131127/VirtualBox/IE11_Win7/Linux/IE11.Win7.ForLinuxVirtualBox.txt

Go and have a cup of tea, cos it’s gonna take a while…

Make the file executable… sudo chmod +x IE11.Win7.ForLinuxVirtualBox.part1.sfx

To extract the files, you may need to install the following: apt-get install lib32stdc++6 See: http://stackoverflow.com/questions/11471722/libstdc-so-6-cannot-open-shared-object-file-no-such-file-or-directory.

Run the .sfx file to build the VM:

~/win7IE11/IE11.Win7.ForLinuxVirtualBox.part1.sfx

The VM files should be extracted to a .ova file.

Import & Use the VM

Open VirtualBox. Click “Import Appliance” in the menu bar, and navigate to the .ova file.

VirtualBox will build the VM. To use it, open VirtualBox and launch the relevant VM.

Localhost

The local server can be accessed on the VM at http://10.0.2.2/. However, my out-of-the box settings give me access to localhost files, but built in references to stylesheets etc are broken - since “localhost” is referenced.

This is fixed by amending C:\windows\system32\drivers\etc\hosts - just add the line 10.0.2.2 localhost. To open this as a Windows admin, open notepad as administrator (by right clicking) and then navigate to the hosts file.

Useful Resources


comments powered by Disqus