AZ-104 Hands-on Lab Guide
IntermediateLab5 hours4 min read2 May 2026Azure
A practical AZ-104 lab roadmap covering identities, governance, compute, storage, networking, monitoring, and recovery.
What you'll learn
- Follow a safe sequence of AZ-104 hands-on labs
- Create and manage common Azure administrator resources
- Practice the portal, Cloud Shell, Azure CLI, and PowerShell workflows
- Clean up lab resources to avoid unexpected cost
Relevant for certifications
AZ-104
Lab Safety Setup
Use a dedicated sandbox subscription or lab resource group. Before creating resources, set a consistent naming pattern:
Resource group: az104-lab-rg
Region: eastus or your nearest low-cost region
Prefix: az104
Owner tag: your-name
Environment tag: lab
Create the resource group:
az group create \
--name az104-lab-rg \
--location eastus \
--tags Environment=lab Owner=utsav
Warning
Many AZ-104 demos create billable resources. Delete the lab resource group when finished unless you intentionally need the resources for later practice.
Recommended Lab Order
- Identity and governance: users, groups, RBAC, locks, tags, policy.
- Administration tools: portal, Cloud Shell, Azure CLI, PowerShell, ARM/Bicep.
- Compute: virtual machines, disks, availability, extensions, containers, App Service.
- Storage: storage accounts, blob containers, lifecycle, replication, Azure Files, AzCopy.
- Networking: VNets, subnets, NSGs, peering, Bastion, load balancers, DNS, private endpoints.
- Monitoring and maintenance: Log Analytics, alerts, action groups, VM insights, backup.
Lab 1: Governance Foundation
- Create a resource group named
az104-lab-rg. - Add tags:
Environment = lab,CostCenter = learning. - Create a Microsoft Entra security group named
AZ104-Lab-Operators. - Assign Reader on the subscription to the group.
- Assign Contributor on
az104-lab-rgto the group. - Create a
CanNotDeletelock on the resource group. - Try deleting the resource group and confirm the lock blocks deletion.
- Remove the lock before cleanup.
Lab 2: Deploy a Linux VM
- Create a VNet
az104-vnetwith address space10.40.0.0/16. - Create subnet
workload-subnetwith prefix10.40.1.0/24. - Create a Linux VM named
az104-linux-01. - Use SSH key authentication.
- Allow SSH only from your public IP.
- Connect with SSH or Cloud Shell.
- Install nginx and verify the local service.
- Stop the VM, then deallocate it to stop compute billing.
Lab 3: Attach and Resize a Managed Disk
- Create a 32 GiB Premium SSD managed disk in the same region and zone as the VM.
- Attach it to
az104-linux-01. - On the VM, identify the disk with
lsblk. - Partition, format, and mount it to
/data. - Add an
/etc/fstabentry using the disk UUID. - Resize the managed disk to 64 GiB.
- Extend the partition and filesystem.
- Reboot and confirm
/datastill mounts.
Lab 4: Storage Account and Blob Lifecycle
- Create a storage account with Standard performance and LRS redundancy.
- Create a private container named
logs. - Upload test files to
logs/. - Enable blob versioning and soft delete.
- Create a lifecycle rule that moves blobs under
logs/to Cool after 30 days. - Add a second rule to delete old versions after 90 days.
- Test access using the Azure portal and Azure CLI.
Lab 5: Azure Files Share
- Create an Azure Files share named
shared. - Upload a small test file.
- Copy the SMB mount command from the portal.
- Mount the share from a Windows VM or Linux VM.
- Create a file from the VM and confirm it appears in the portal.
- Review share quota and snapshot options.
Lab 6: Secure Networking
- Create two subnets:
web-subnetandapp-subnet. - Create an NSG for each subnet.
- Allow HTTP 80 to the web subnet from the internet.
- Allow app traffic from the web subnet to the app subnet.
- Deny direct inbound app access from the internet.
- Use effective security rules on a NIC to validate the final rule set.
Lab 7: Load Balancer
- Create two Linux VMs in the same availability set or VM scale set.
- Install nginx on both.
- Create a Standard public Load Balancer.
- Create a backend pool and add both VMs.
- Add a health probe on HTTP 80.
- Add a load balancing rule for frontend TCP 80 to backend TCP 80.
- Browse to the public IP.
- Stop nginx on one VM and confirm the health probe removes it from rotation.
Lab 8: Monitoring and Backup
- Create a Log Analytics workspace.
- Enable VM insights for a test VM.
- Create an action group with email notification.
- Create a CPU alert for the VM.
- Create a Recovery Services vault.
- Enable backup for the VM.
- Run an on-demand backup.
- Confirm the restore point appears in the vault.
Cleanup Checklist
- Remove resource locks.
- Stop and deallocate VMs.
- Delete public IPs, load balancers, NAT gateways, and Bastion hosts.
- Delete snapshots, disks, storage accounts, Recovery Services vault items, and backups you no longer need.
- Delete
az104-lab-rgafter confirming nothing important remains.
