BRIC resources¶
Azure virtual machines¶
This document contains instructions for setting up and accessing your Azure VM on different platforms:
VM-UserGuide-v3.docx
Table of Contents
Overview¶
All computing resources for BRIC are hosted in Microsoft’s Azure Cloud, charged on a “pay as you go” basis, it is therefore essential your research VM is running when required and shutdown/deallocated at all other times. There are four key steps in accessing and using your VM. 1. Your VM needs to be activated 2. You need to be on the UoP network directly or via VPN 3. Connect/login to your active VM 4. When your work is complete your VM needs to be shutdown and deallocated
The options of how to do this from Windows, Linux or Mac systems are outlined in the sections below.
At the end of this document is a summary of Azure commands for quick reference.
Managing a VM from Windows¶
Start VM from Windows command line¶
Pre-requisites¶
Connect to your Azure Account¶
Start your VM¶
Stop and deallocate your VM¶
Connect to your VM - Command line¶
From a windows command line (not PowerShell)¶
From a windows Terminal Emulator (PuTTy)¶
Powershell script to Start, connect to and stop your VM (Command line)¶
The script sshAzureVM.ps1
, provided in the BRIC GitLab repository, allows you to start a BRIC Azure virtual machine and connect to it in a Powershell command window through SSH (and X window forwarding), all with a single click.
Before using the script, edit it by replacing the Resource Group, VM name, IP address and username on the following lines with your own information:
$ResourceGroupName = "RG-BRIC-RESEARCHER-XXXX"
$VMname = "vm-bric-researcher-Xxxxx"
$IPaddress = "XX.XXX.XX.XX"
$UserName = "xxxxxxx"
You can run the script from a PowerShell terminal by simply typing:
./sshAzureVM
(assuming your current location is the folder containing the script)
Alternatively, you can create an executable shortcut that can be pinned to the Windows task bar:
In Windows explorer, navigate to the folder that where the shortcut will live
Right-click and select: New/Shortcut
In the “Item location” box, enter the following:
powershell.exe -ExecutionPolicy Bypass -File "[path]\sshAzureVM.ps1"
where [path] is the path to the location of the script.
You can pin this shortcut to the task bar or Start menu
Note
The first connection to the VM using this script will start the VM and connect to it through SSH. Any additional connection using this script will open a new Powershell window and connect to the already running VM. Closing these additional Powershell windows will not shut down the VM, but closing the first Powershell window will close all other open windows and shut down the VM.
Note
To launch applications with a graphical interface (e.g. FSL) from the VM, you must have an X window server, such as VcXsrv, running on your Windows machine.
Managing a VM from Linux¶
For additional information, and specific instructions for accessing Azure VMs on Linux and running simulations, see the Computational modelling Lab’s Simulations page.