Skip to main content

Command Palette

Search for a command to run...

AZ-104 Lab 1 - Deploying My First Azure Virtual Machine

Updated
4 min read
AZ-104 Lab 1 - Deploying My First Azure Virtual Machine
J

I've been working professionally in IT since 2021, with hands-on experience in endpoint management, desktop support, SaaS administration, and hybrid cloud environments. I started jmcnairtech to document what I learn along my journey and share practical solutions with others. This blog is about breaking down real-world troubleshooting with clear, actionable steps. Whether you're just starting out or refining your skills, I share what works, what breaks, and how to fix it.

As part of my journey to earn the Microsoft Azure Administrator Associate (AZ-104) certification, I’ve started documenting my labs here on jmcnairtech.com. Each lab showcases the real-world skills I’m learning to manage and deploy cloud infrastructure in Microsoft Azure.

In this first lab, I built a simple yet essential Azure environment — a Virtual Network (VNet) and a Virtual Machine (VM) — the basic foundation for everything else in cloud administration.

Lab Objective

The goal of this lab was to deploy a Windows Server 2022 virtual machine inside a secure virtual network using best practices like:

  • Organizing resources with a Resource Group

  • Creating a Virtual Network and Subnet

  • Deploying a VM with secure access controls

  • Configuring Network Security Groups (NSGs)

  • Enabling monitoring and auto-shutdown

This type of setup is the backbone of most Azure workloads — from application servers to lab environments.

Step 1: Create a Resource Group

Resource Groups in Azure act as logical containers to organize and manage related resources.
I started by creating a new group called RG-Lab1-AZ104 in the East US region.

Azure Portal → Resource groups → + Create

  • Name: RG-Lab1-AZ104

  • Region: East US

Step 1.1: Add Tags for Organization and Cost Management

Before finishing the resource group setup, I added tags to help identify and manage my resources.

Tags in Azure are key-value pairs that make a big difference in real-world environments. They’re used for:

  • Cost tracking — seeing how much each project or department spends

  • Automation — applying policies or scripts based on tags

  • Organization — grouping resources logically across regions and subscriptions

For this lab, I added these tags:

Tag NameValuePurpose
ProjectAZ104-Lab1Identifies the lab or project
EnvironmentTestMarks this as a non-production environment
OwnerJoshua McNairNotes who created or manages the resource
Cost CenterEducationUsed to track the cost center for billing

Adding tags even in a small lab like this helps build good habits early — Azure administrators rely heavily on tagging for cost analysis and lifecycle management.

Step 2: Create a Virtual Network (VNet) and Subnet

Next, I set up a private network for my virtual machine to live in.

Azure Portal → Virtual Networks → + Create

  • Name: VNET-Lab1

  • Address space: 10.0.0.0/16

  • Subnet: Subnet-VMs (10.0.1.0/24)

This subnet acts like a private section of the network where the VM can securely communicate.

Step 3: Deploy a Windows Server 2022 VM

With the network in place, I created a virtual machine inside that subnet.

Azure Portal → Virtual Machines → + Create

  • Name: VM-Lab1-Server

  • Image: Windows Server 2022 Datacenter (Gen2)

  • Size: Standard_D2 (lowest allowed at the time for Windows Server 2022 testing)

  • Username: azureuser

  • Password: (*******************)

  • Inbound ports: RDP (3389)

After validation, I clicked Create, and Azure began provisioning the VM.

🔌 Step 4: Connect to the VM

Once the deployment finished, I connected to the VM using Remote Desktop.

  • From the VM overview page → Connect → RDP

  • Downloaded the .rdp file and logged in using my credentials

Seeing the Windows Server desktop for the first time confirmed that the environment was working perfectly.

Step 5: Monitoring and Auto-Shutdown

While Azure Monitor VM Insights offers deeper performance tracking, I chose not to enable it for this lab to keep costs low and focus on foundational deployment skills. The default metrics provided by Azure — like CPU and disk usage — were sufficient for validating the VM’s health and connectivity.

  • Auto-shutdown: Set for 7 PM daily

These features help simulate how administrators manage uptime and costs in real production environments.

Step 6: Cleanup

Once testing was complete, I cleaned up my environment to avoid extra charges:

az group delete --name RG-Lab1-AZ104 --no-wait --yes

Azure automatically removed every resource inside that resource group.

What I Learned

  • How Azure resources are logically grouped and connected

  • The purpose of VNets, subnets, and NSGs in secure networking

  • How to provision, connect to, and manage a Windows Server VM

  • Why cost management and monitoring are essential for administrators

This lab helped me connect the dots between core networking, resource management, and infrastructure deployment — all key areas of the AZ-104 exam.

Thanks for reading!
If you’re learning Azure too, follow along here on jmcnairtech.com — I’ll be posting new labs as I work toward the AZ-104 and my goal of becoming an Azure Administrator.

More from this blog

J

JMcNairTech | Practical IT & Cybersecurity Tips

23 posts

Practical IT & cybersecurity insights for learners and pros. Clear, trusted advice to help you understand tech and stay safe online.