Skip to main content

Creating Your First Azure Virtual Machine

Hands-On Lab

 

Photo of

Training Architect

Length

01:00:00

Difficulty

Beginner

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, a virtual network, and a network interface card for the 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.

What are Hands-On Labs?

Hands-On Labs are scenario-based learning environments where learners can practice without consequences. Don't compromise a system or waste money on expensive downloads. Practice real-world skills without the real-world risk, no assembly required.

Creating Your First Azure Virtual Machine

Introduction

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, a virtual network, and a network interface card for the 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.

Log In to the Azure Portal

  1. On the lab instructions page, click Open Azure Portal.
  2. On the Azure Portal sign-in page, enter the username you were provided on the lab instructions page.
  3. Click Next.
  4. Enter the password you were provided on the lab instructions page.
  5. Click Sign in.
  6. In the Welcome to Microsoft Azure message box, click Maybe later.

Create a Virtual Machine

  1. On the Azure Portal home page, click Virtual Machines.
  2. Click + Add.
  3. In the Basics tab, configure the following settings:
    • Resource group: (Select the pre-provisioned group from the dropdown.)
    • Virtual machine name: (Give the virtual machine a unique name.)
    • Image: Windows 10 Pro, Version 1809
    • Size: Standard D2 (Clear all filters to choose that VM)
    • Username: Admin123456!
    • Password: Admin123456!
    • Confirm password: Admin123456!
  4. Click Next : Disks >.
  5. In the Disks tab, configure the following settings:
    • OS disk type: Standard HDD
    • Click Create and attach a new disk.
      • Disk type: Standard HDD
      • Click OK.
  6. Click Next : Networking >.
  7. Click Next : Management >.
  8. Click Next : Advanced >.
  9. Click Next : Tags >.
  10. Click Next : Review + create >.
  11. Click Create.
  12. Click the notifications icon at the top of the screen to monitor the deployment.
  13. Wait a few minutes for the status to change to Your deployment is complete.

Connect to the Virtual Machine

  1. Click All resources in the left sidebar.
  2. Click the name of our virtual machine to open it.
  3. Click Connect at the top of the page.
  4. In the Connect to virtual machine menu, copy the port number to your clipboard.
  5. Click the i information box at the bottom of the menu.
  6. In the Networking menu, click Add inbound port rule.
  7. In the Add inbound security rule menu, configure the following settings:
    • Destination port ranges: 3389
    • Name: Port_3389
  8. Click Add.
  9. Click Home at the top left of the page.
  10. Click Virtual machines.
  11. Click the name of our virtual machine to open it.
  12. Click Connect.
  13. Click Download RDP File.
  14. Choose Save File, and click OK.
  15. Press Ctrl + J to view your browser's downloads.
  16. Click the folder icon to view the RDP file.
  17. Right-click the RDP file icon, and select Edit.
  18. Click the Display tab.
  19. Adjust the Display configuration to your preferred size (e.g., 1024 by 768 pixels).
  20. Click the Local Resources tab.
  21. Under Keyboard, select On the remote computer from the dropdown.
  22. Click Connect, then click Connect again.
  23. In the Enter your credentials menu, enter the following:
    • User name: Admin123456!
    • Password: Admin123456!
  24. Click OK.
  25. Click Yes.
  26. Wait a few minutes for the virtual machine connection to be established.
  27. In your remote desktop window, click the folder icon at the bottom of the screen.
  28. Click This PC in the left sidebar.
  29. Verify that both data disks were created.

Turn Off the Virtual Machine

  1. Go back to the Azure Portal in your browser.
  2. In the virtual machine menu, click Stop.
  3. Click OK.
  4. Wait a few moments, and refresh the menu until the status changes to Stopped (deallocated).

Conclusion

Congratulations, you've successfully completed this hands-on lab!