In this hands-on lab, we will use the Azure Portal to create and use a virtual machine.
We will log in to the Azure Portal and create a virtual machine. Then, we will connect to the virtual machine via RDP. Finally, we will use the Azure Portal to turn the virtual machine off.
After completing this lab, you will have gained the experience required to create and use your first virtual machine using the Azure Portal.
Successfully complete this lab by achieving the following learning objectives:
- Log Into the Azure Portal
Log in to the Azure Portal to begin the process of creating our Virtual Machine.
- Create a Virtual Machine
Use the Azure Portal to create a new virtual machine.
1. In the Azure Portal, click on "Create a Resource" and then select "Windows Server 2016 Datacenter"
2. On the Basics tab, configure the following settings:
Subscription: Leave the default subscription
Resource group: Select the pre-provisioned group from the dropdown.
Virtual machine name: Give your machine a unique name
Region: Select the same region as your Resource Group
Availability Options: Can be left default (No redundancy)
Image: Leave the default of Windows Server 2016 Datacenter – Gen1
Azure Spot Instance: Should be check as "No"
Size: Leave the Default (Standard DS1_v2)
Confirm password: Admin123456!
Inbound Port Rules: These should be left default, which should automatically enable Remote Desktop access to the system.
- If for some reason port 3389 is not automatically filled in, for "Public Inbound Ports" select "Allow selected ports" and then for "Selected Inbound Ports" use the drop to choose "RDP 3389"
Licensing: Leave as "No"
3. Select Review + Create at the bottom of the page
4. Review our settings and click "Create" at the bottom of the page
- Connect to the Virtual Machine
Connect to your VM using Remote Desktop
Go to your Virtual Machine in the portal
Select "Connect" from the menu bar towards the top of the resource page and select "RDP"
Here, you can either use the information provided with a Remote Desktop client of your choice, or simply download the RDP File. Note: You have to wait a few minutes before you will be able to connect even if the VM shows as ready.
Use the information on the page with your RDP client or execute the RDP file to initiate a connection to your machine. If you receive a warning that the publisher cannot be identified, this is normal and can be ignored by click "connect".
Once you’re connected, enter the credentials we set up in the previous objective. If you used the credentials suggested, you can use the below for reference:
RDP Login Credentials:
- Stop the Virtual Machine
Disconnect and Stop Your Virtual Machine
Either Close your RDP window or log out of Windows to exit your connection
Go back to the Azure Portal and Navigate to your Virtual Machine’s summary page
On the top resource menu, select "Stop" and leave the option to Reserve the Public IP unchecked. Click "OK" to commence stopping the VM.