Skip to content

Running Windows Virtual Machines using VirtualBox

In cases where users require to run software which is available only for Windows, it is possible to do this by running a Windows Virtual Machine (VM).

This is made possible using a software package called VirtualBox ( https://www.virtualbox.org/).

VirtualBox can be run on ARCHIE via a SLURM interactive seesion like any other application with a GUI. The Windows VM is then run from within VirtualBox. Note that multi-node jobs are not currently possible.

Request enough time for VirtualBox

If you exceed the amount of time requested in the SLURM allocation, then VirtualBox (and Windows) will terminate. Where Windows is concerned, it will be as though you switched off the power.

Overview of running Windows VMs

First of all, you will need to contact the ARCHIE-WeSt support team so that they can generate a Windows VM image for you containing the software you require. The outline of the process to run Windows VM's is as follows

  1. Submit your job request to SLURM (either as an interactive job or via a job-script)
  2. Once your SLURM request has been granted, run VirtualBox
  3. Once VirtualBox has started, start the WindowsVM
  4. Login to Windows
  5. Do your stuff
  6. Poweroff (or save the state of) Windows
  7. Exit VirtualBox
  8. Exit/Terminate the SLURM job

Running VirtualBox/Windows via a SLURM interactive job

This is the preferred method for first-time users.

  1. Once you have a WindowsVM prepared, you need to start a SLURM interactive job e.g.:

    srun --account=my-account-id --partition=standard --time=6:00:00 --x11 --ntasks=20 --pty bash
    

    Note:
    a. Substitute your own account ID
    b. Make sure you request enough time (6 hours in the above example)
    c. Here we are requesting 20 cores to be used by the VM (--ntasks=20) corresponding to half a node

    Make sure the VM CPU and RAM settings are correct

    Before lauchning the VM, make sure the CPU and RAM settings match the SLURM allocation (see below).

  2. Once your interactive session starts, then type VirtualBox

  3. After VirtualBox has started, select the Windows Virtual Machine and click on Start - Windows will then proceed to boot up



  4. When the Windows login window appears login with your DS_User_ID.
  5. After logging in you can use Windows to run your software in the usual way.
  6. Once you have finished, you can either shutdown Windows in the usual way, or close the window by clicking the "X" icon on the top RH corner,



    and select "Save the machine state" from the pop-up window. This will allow you to resume to the exact same state next time you start Windows.



  7. Once Windows has shut down/saved you can exit VirtualBox.



  8. Exit the SLURM interactive session.

Virtual Machine CPU and Memory settings

You need to ensure that the VM CPU and RAM settings are set appropriately and are consistent with the requested SLURM allocation (or vice-versa).

Note that VirtualBox only allows a maximum of 32 cores per VM, so it is not actually possible to utilise a full node (40 cores). However, you can still request a full 40 core node in SLURM (--ntasks=40 --exclusive) to ensure you have access to all the availabe RAM on the node.

Remember, that on ARCHIE, there is a memory allocation of 4.5 GB RAM per core. Therefore, for the SLURM example above (--ntasks=20) the VM can be set to use up to 20 cores, and 90GB RAM.

Setting the number cores (CPU) for the VM

Make sure the CPU setting for the VM is the same as your slurm allocation request (i.e. --ntasks). The example below requests 20 cores:

Setting the RAM for the VM

Make sure the requested memory for the VM is equal to or less than ntasks*4.5GB (1GB = 1024MB). The example below requests ~90GB RAM (20*4.5GB):

Accessing ARCHIE files from within Windows

It is recommended that files should be stored on the ARCHIE-WeSt filesystem, and not on the C: drive within Windows.

In order to be able to do this, the "host" filesystem (ARCHIE) needs to be shared with the "guest" OS (Windows).

  1. To check if this is enabled, start Windows and go to the "Devices" menu at the top of the VirtualBox (guest OS) window. Select "Shared Folders" -> "Shared Folder Settings":



  2. In the "File Share Settings" window that opens up, click on the "Adds new shared folder" icon:



  3. In the "Add Share" window, enter the path to your ARCHIE files (/users/DS_User_ID):



    Click on the "Make Permanent" check box.
  4. To access your filespace from within Windows, open windows Explorer and navigate to "Network" where your files will be accessible via "\\VBOXSVR\DS_User_ID":

... still to be completed (RM 07/10/2019)