Azure Lab

Deploy an Ubuntu ARM VM with PowerShell

We deploy the real environment, you take the scenario-based labs on us. Hands-on, from anywhere, at any time.

Time required: 1 Hours

Scope

In this lab, you will use Windows PowerShell cmdlets to create an Azure virtual network, a public IP address, a network security rule and security group, a network interface, and finally, an Ubuntu VM. Then, you'll use PuTTY to connect to that VM, validating its correct configuration.

Suggested Pre Requisites

This lab requires you to use Windows PowerShell. (Unfortunately, the Linux/Mac versions of the Azure RM module for PowerShell are incomplete at this time. We will revise this lab when those modules are complete.)

There are several prerequisites for this lab:

  • You must use Windows 7 or later with PowerShell 3.0 or later. This comes standard in versions of Windows 7 SP 2 and later.
  • You will need to download and install PuTTY: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
  • You will need to use a web browser to view/download the PowerShell script at https://azuredevlabscommon.blob.core.windows.net/70534/powershell/ps_lab.ps1

This lab uses the Windows PowerShell terminal. You may optionally use the Windows PowerShell ISE if you prefer.

You may have difficulty when using an earlier version of PowerShell, with implementing PowerShellGet, which is how PowerShell adds modules. If so, preferably you should update your copy of PowerShell to the latest version at https://msdn.microsoft.com/en-us/powershell/scripting/setup/installing-windows-powershell.

Alternatively, you can install PowerShellGet:

Install-PackageProvider Nuget –force –verbose
Exit
Install-Module –Name PowerShellGet –Force –Verbose
Exit

Overview

In this lab, you will use Windows PowerShell cmdlets to create an Azure virtual network, a public IP address, a network security rule and network security group, a network interface, and finally, an Ubuntu VM. Then, you'll use PuTTY to connect to that VM, validating its correct configuration.

Scenarios


  • Install the Azure RM PowerShell module.

  • Log in to Azure and set some PowerShell variables.

  • Create a virtual network, subnet, public IP address, and a network security group with an SSH rule.

  • Create a network interface that uses those assets.

  • Configure a virtual machine to use that network interface.

  • Create the virtual machine using the configuration.

Share our Labs
Start Your Free Trial

We have the longest and most in depth courses about cloud and engineering topics on the web. All of our training content is included with every membership.