This class represents an ievms VM and its current state, as queried through Virtualbox and the modern.ie website.
A list of all available IE versions.
A list of all available OS names.
A list of all supported ievms version/OS combos.
A list of possible VM statuses.
A list of initial rearms available per OS. Hilarious.
The ievms home (INSTALL_PATH
in ievms parlance).
The command used to install virtual machines via ievms.
The host IP as seen by the VM.
Run ievms shell script with a given environment. A debug function may be
passed (like console.log
) which will be called for each line of ievms
output. Returns a promise which will resolve when ievms is finished.
Build an array with one instance of each possible IEVM type.
Build an array of all IEVM instances that match the given name, which may be
a specific VM (IE6 - WinXP
), an IE version number (9
or 7
) or an OS
name (WinXP
or Vista
).
Construct a VBoxManage
command with arguments. Adds single quotes to all
arguments for shell "safety".
Parse the output from VBoxManage list hdds
into an object.
Promise the parsed output from VBoxManage list hdds
.
Determine the status name for a given status value.
Create a new IEVM instance for a given ievms VM name. The name is validated against all supported ievms names. The IE version and OS are extracted from the name and validated as well.
Throw an exception if the virtual machine is missing (not installed).
Throw an exception if the virtual machine is not missing (is installed).
Throw an exception if the virtual machine is running.
Throw an exception if the virtual machine is not running (saved/off).
Throw an exception if the virtual machine has zero rearms left.
Throw an exception if the virtual machine's archive file is missing.
Throw an exception if the virtual machine's ova file is missing.
Start the virtual machine. Throws an exception if it is already running or
cannot be started. If the headless
argument is false
(the default) then
the VM will be started in GUI mode.
Stop the virtual machine. Throws an exception if it is not running. If the
save
argument is true (the default) then the VM state is saved. Otherwise,
the VM is powered off immediately which may result in data loss.
Gracefully restart the virtual machine by calling shutdown.exe
. Throws an
exception if it is not running.
TODO: Should return before GC comes back online but timing is hard. TODO: Bullshit Vista pops up the activation thing.
Open a URL in IE within the virtual machine. Throws an exception if it is not running.
Close running IE windows in the virtual machine, failing silently if IE is not currently running.
Rearm the virtual machine, extending the license for 90 days. Unfortunately, rearming is only supported by the Win7 virtual machines at this time.
Uninstall the virtual machine. Removes the virtual machine and hdd from VirtualBox, keeping the archive or ova on disk.
Install the virtual machine through ievms. Throws an exception if it is already installed.
Reinstall the virtual machine through ievms. Throws an exception if it is running or not installed.
Restore the virtual machine to the clean
snapshot created by ievms. Throws
an exception if it is missing or currently running.
Delete the archive file for the virtual machine. If the ova is not present, the archive must be redownloaded to reinstall the virtual machine. Throws an exception if the archive is not present.
Delete the ova file for the virtual machine. If the archive is not present, it must be redownloaded to reinstall the virtual machine. Throws an exception if the ova is not present.
Execute a command in the virtual machine. Throws an exception if it is not installed or not running, or if the command fails. Waits for guest control before proceeding.
Take a screenshot of the virtual machine and save it to disk. Throws an exception if it is not installed or not running, or if the screenshot command fails.
Determine the name of the zip file as used by modern.ie.
For the reused XP vms, override the default to point to the IE6 archive.
Simply replace dashes and spaces with an underscore and add .zip
.
Determine the full path to the archive file.
Determine the name of the ova file as used by modern.ie.
Determine the full path to the ova file.
Generate the full URL to the modern.ie archive.
Retrieve and parse the virtual machine info from VBoxManage showvminfo
.
If E_ACCESSDENIED
is caught, the command will be retried up to 3 times
before rejecting the promise.
Promise a value from IEVM.status
representing the vm's current status.
Promise a key from IEVM.status
representing the vm's current status.
Promise a Date
object representing when the archive was last uploaded to
the modern.ie website. Caches the date as a property on the instance.
Promise getter/setter for VM metadata.
Promise a boolean indicating whether the VM is missing.
Promise a boolean indicating whether the VM is running.
Promise a boolean indicating whether the VM is expired.
Promise a boolean indicating whether the archive exists on disk.
Promise a boolean indicating whether the archive exists on disk.
Promise a Date
object representing when the VM will expire.
XP virtual machines expire after 30 days from creation. Others get 90.
Try to fetch last rearm date from metadata.
Add ninety days to the most recent rearm date.
Fall back to the original date when the hdd was last modified.
Promise an array of rearm dates or empty array if none exist.
Promise the number of rearms left for the VM.
Promise the version of ievms which created this VM.
Output a debug message for the virtual machine.
Build an environment hash to pass to ievms for installation.
Run a VBoxManage
command and promise the stdout contents.
Parse the "machinereadable" VBoxManage
vm info output format.
Parse the ievms meta data stored in the VirtualBox extradata
.
Promise to set the VM metadata.
Promise to get the VM metadata. Returns empty object on failure.
Seed the ievms.bat
file in the virtual machine with a slmgr
command.
Execute the ievms
scheduled task in the virtual machine.
Promise the UUID of the VM's hdd.
Promise an object representing the base hdd.
Promise an fs.stat
object for the VM's base hdd file.
Promise a Date
object representing when the hdd file was created.
IEVM