Deploy and Configure an Azure VM
Lab overview
Build your first Azure virtual machine from the portal, end to end. In this lab, you create a Windows Server 2019 VM named SRV01 in a resource group, place it in an availability zone, pick a size, set the admin credentials, connect it to an existing virtual network and subnet, swap the OS disk to Standard HDD, add a 32 GiB data disk, and tell Azure to clean up the public IP and NIC when the VM is deleted. You finish by reviewing the settings, creating the VM, and opening the finished resource.
Why you'd do this
A virtual machine is the most direct way to run something in Azure: you get a full Windows or Linux server you control, which is why it's the first thing most administrators deploy and the first thing most certification exams ask about. App Service, containers, and functions all trade that control for less management; a VM is what you reach for when the workload needs a real operating system, a specific agent, or a lift-and-shift of something that already runs on a server.
The Create VM wizard looks like a long form, but most of it is a handful of decisions you'll make on every VM. Availability zone pins the VM to one physical datacenter within the region, so you know which zone it's in when you later build a second one elsewhere for resilience. Security type stays on Standard here; the Trusted launch default adds Secure Boot and vTPM, which is right for new builds but not something every legacy image supports. The size, Standard_D4s_v3, is a general-purpose 4-vCPU machine, and the lowercase s is the part worth noticing: it means the size supports premium SSD, even though this lab deliberately chooses Standard HDD for the OS disk to show the cheaper option.
Two settings on this form save money later. Choosing an existing virtual network and subnet, rather than letting the wizard create one, keeps the VM on the network you planned instead of spawning a new one per server. And Delete public IP and NIC when VM is deleted prevents the most common Azure mess: orphaned IPs and network interfaces that keep billing after the server they belonged to is gone. The matching option on the data disk does the same for storage.
Pay attention to the Review + create page before you click Create. Azure validates the configuration there, and that's the moment to catch a wrong subnet or disk type, because changing them after deployment means stopping or recreating the VM. For certification prep, this is core AZ-104 material under deploying and managing compute, and the VM-versus-other-compute decision and basic disk and networking concepts appear throughout AZ-900.
Lab details
- VM Name:
SRV01in resource groupProdRG - Image: Windows Server 2019 Datacenter
- VM Size:
Standard_D4s_v3 - Virtual Network:
vNet-Prod· Subnet:default (10.0.0.0/24) - OS Disk: Standard HDD · Data Disk:
Data01· 32 GiB - Availability: Availability Zone · Security type: Standard
Learning objectives
- Deploy a Windows Server 2019 virtual machine from the Azure portal.
- Configure availability zones and the security type during VM creation.
- Choose disk types and sizes for the OS disk and a data disk.
- Connect the VM to an existing virtual network and subnet.
- Configure the public IP and NIC to be deleted with the VM.
- Validate the configuration on Review + create before deploying.
Exam relevance
- AZ-900 — Microsoft Azure Fundamentals — Azure compute options, virtual machines, availability zones, disks and virtual networks.
- AZ-104 — Microsoft Azure Administrator — deploy and manage VMs, configure VM networking, manage VM storage and disks.
Step-by-step instructions
- Create a virtual machine named SRV01 in resource group
ProdRG:- Choose Windows Server 2019 Datacenter as the image.
- Set Availability options to Availability Zone and select a zone.
- Set Security type to Standard.
- Select VM size
Standard_D4s_v3.
- Specify the administrator credentials:
- Username:
vmadmin - Password:
Password123!~
- Username:
- Configure Networking:
- Select virtual network
vNet-Prod. - Choose subnet
default (10.0.0.0/24). - Check Delete public IP and NIC when VM is deleted.
- Select virtual network
- Configure Disks:
- Select Standard HDD for the OS disk type.
- Add a new data disk named
Data01. - Set the disk size to 32 GiB and the storage type to Standard HDD.
- Ensure Delete disk with VM is selected.
- Click through Management, Monitoring, Advanced, and Tags without changes.
- On the Review + create page, verify the settings and click Create.
- Wait for the deployment to complete, then click Go to resource to view the new VM.
- Confirm the VM has been deployed and configured as specified.
Launch the lab simulation — free, no account or Azure subscription required.