AZ-802 virtual machines explained

Updated September 29, 2026

Manage virtual machines is worth 10–15% of AZ-802. Most of it is Hyper-V: guest access, memory, device assignment, checkpoints, virtual disks and switches, NIC teaming, high availability and Hyper-V Replica. The rest covers Windows Server VMs in Azure: disks, sizing, availability and secure access. Questions tend to ask which setting enables a feature and what has to be true before you can turn it on.

Working with guests

FeatureWhat it gives youRequirement
Enhanced Session ModeClipboard, drives, audio and USB redirection in VMConnectEnabled on the host; guest supports it
PowerShell DirectPowerShell into a guest without networkingRun on the host; guest credentials; -VMName
SSH DirectSSH into a Linux guest over the VM bus, without networkingSupported Hyper-V host and Linux guest
Nested virtualizationHyper-V inside a VMVM off; Set-VMProcessor -ExposeVirtualizationExtensions $true

For nested VMs to reach the network, enable MAC address spoofing on the outer VM’s adapter or use NAT.

Memory and devices

Dynamic memory uses startup, minimum and maximum values plus a buffer. Startup memory must cover the boot; minimum can be lower once the guest runs. Where dynamic memory does not fit a workload, use static memory and runtime memory resize for supported guests.

Integration services provide heartbeat, time synchronisation, shutdown, data exchange, backup (VSS) and guest services. A frequent trap: a domain-joined guest should take its time from the domain hierarchy, so the Hyper-V time synchronisation service is often turned off for DCs.

Discrete Device Assignment passes a whole PCIe device, such as a GPU or NVMe drive, to one VM. GPU partitioning shares one physical GPU between several VMs, each getting a slice. DDA gives full performance to one VM; partitioning gives a share to many.

Checkpoints and disks

Checkpoint typeHow it worksUse
ProductionVSS or file system freeze inside the guestDefault; application-consistent
StandardSaves memory and device stateTest and development

Checkpoints are not backups: they live on the same storage and depend on the parent disk. Deleting a checkpoint merges its .avhdx into the parent.

Virtual disks come as VHDX (up to 64 TB, resilient to power failure) or legacy VHD, and as fixed, dynamically expanding or differencing disks. A VHD Set (.vhds) is the shared disk format for guest clusters.

Networking

Virtual switchConnects VMs to
ExternalThe physical network, through a host adapter
InternalEach other and the host
PrivateEach other only

On the host, Switch Embedded Teaming (SET) is the teaming method for Hyper-V switches; you create it with New-VMSwitch -EnableEmbeddedTeaming. Inside a guest, NIC teaming needs two virtual adapters on different external switches and AllowTeaming enabled on them. Adapter settings you may meet: bandwidth management, DHCP guard and router guard, port mirroring, VLAN IDs and SR-IOV.

High availability and Replica

Failover clustering with Cluster Shared Volumes makes VMs highly available: if a host fails, the cluster restarts its VMs on another node. Live migration moves running VMs between hosts, clustered or not.

Hyper-V Replica asynchronously replicates a VM to another host or cluster, with a frequency of 30 seconds, 5 minutes or 15 minutes. On a cluster, the Hyper-V Replica Broker role is required. Failover types:

FailoverWhenEffect on primary
TestAny timeNone; creates a separate test VM
PlannedScheduled switchPrimary shut down first; no data loss
UnplannedPrimary lostRun on the replica, with possible data loss

Windows Server VMs in Azure

  • Disks: Premium SSD, Premium SSD v2, Standard SSD, Standard HDD and Ultra Disk. Data disks for data; host caching None for write-heavy databases and DC databases.
  • Capacity: resizing may require deallocation if the new size is not available on the current hardware cluster. Scale sets add identical instances with autoscale rules.
  • Availability: availability sets protect against rack and update failures within a datacenter; availability zones protect against losing a datacenter.
  • Access: Azure Bastion gives RDP and SSH through the portal without public IPs; just-in-time VM access (Defender for Servers Plan 2) opens management ports only for an approved time window.
  • Networking: NICs, private and public IPs, accelerated networking and DNS servers set on the virtual network.

Sample questions

Question 1. You want to run Hyper-V inside VM1 for a training lab. VM1 is running on a Windows Server Hyper-V host. What must you do first?

  • A. Enable Enhanced Session Mode on the host
  • B. Turn VM1 off and expose virtualization extensions to its processor
  • C. Enable dynamic memory on VM1
  • D. Enable SR-IOV on VM1’s network adapter
Show answer

Answer: B

Nested virtualization requires the virtualization extensions to be exposed to the VM with Set-VMProcessor -ExposeVirtualizationExtensions $true, and the VM must be turned off for the change. Enhanced Session Mode and dynamic memory are unrelated. SR-IOV is a network offload feature.

Want more questions like this? Full AZ-802 practice tests →

Question 2. A graphics workstation VM needs the full performance of a dedicated GPU installed in the host. No other VM will use it. What should you configure?

  • A. GPU partitioning
  • B. RemoteFX vGPU
  • C. Enhanced Session Mode
  • D. Discrete Device Assignment
Show answer

Answer: D

Discrete Device Assignment passes the whole PCIe GPU to one VM for full performance. GPU partitioning shares one GPU across several VMs. RemoteFX vGPU has been removed from Hyper-V. Enhanced Session Mode redirects local devices, not host GPUs.

Want more questions like this? Full AZ-802 practice tests →

Question 3. A Hyper-V failover cluster hosts VMs that must be replicated to a standalone Hyper-V host in another building. Replication fails to configure on the cluster side. What is missing?

  • A. The Hyper-V Replica Broker role on the cluster
  • B. A VHD Set for each replicated VM
  • C. Switch Embedded Teaming on each node
  • D. Live migration enabled between the cluster and the standalone host
Show answer

Answer: A

When a failover cluster takes part in Hyper-V Replica, the Hyper-V Replica Broker role must be configured on the cluster so replication can follow VMs between nodes. A VHD Set is for shared disks in guest clusters. Switch Embedded Teaming and live migration settings do not enable replication.

Want more questions like this? Full AZ-802 practice tests →

What to practise

On one lab host: turn on nested virtualization for a VM, connect to a guest with PowerShell Direct, change a VM from standard to production checkpoints and take one, convert a VHD to a dynamically expanding VHDX, create a SET switch, and replicate a VM to a second host with a test failover. In Azure, resize a VM, add a data disk with caching set to None, and connect through Bastion.