3.2 - VM sizing, scale sets and configuration

AZ-104 objective 3.2 covers sizing, scaling and configuring virtual machines. Resizing a VM to a larger SKU that is already available on its current host simply restarts the VM in place; if the target size is not available there, the VM must be stopped and moved to a host that supports it. Virtual machine scale sets run many identical instances behind autoscale, whose rules combine a metric, a threshold and a sampling window so sustained high CPU triggers scaling while a brief momentary spike does not, and zone balancing keeps instances spread evenly across availability zones even after scale-in. A rolling upgrade policy updates the OS image across the set in batches and pauses if instance health drops, and an application health probe supplies per-instance signals so unhealthy VMs are automatically repaired. To run configuration after a VM boots, such as installing and setting up software, you use the Custom Script Extension. A proximity placement group packs VMs physically close together to minimize inter-VM latency, and an Azure Dedicated Host provides isolated single-tenant hardware, sometimes required for licensing. Expect scenarios that describe a scaling, placement or post-deployment configuration need and ask which feature fits.

Memory hook
Larger size already on the same host = restart in place to resize. Ignore momentary spikes = autoscale sampling window. Update a scale set in batches = rolling upgrade. Run a script after boot = Custom Script Extension. Pack VMs close = proximity placement group.

Practice questions

1. An application must automatically add or remove identical VM instances as CPU load changes. Which resource should you deploy?

  • A virtual machine scale set (VMSS) (correct answer)
  • An availability set combined with a single virtual machine that you manually resize during peaks
  • A dedicated host
  • An App Service plan

A VM scale set runs a group of identical VMs and adds or removes instances automatically based on metrics such as CPU. An availability set does not autoscale, a dedicated host is single-tenant hardware, and an App Service plan hosts web apps, not IaaS VMs.

2. Within a single region, you must keep a set of VMs available even if one entire datacenter fails. What should you deploy them across?

  • Availability zones (correct answer)
  • An availability set, which only spreads VMs across fault and update domains inside one datacenter
  • A proximity placement group
  • A single larger VM

Availability zones are physically separate datacenters within a region, so spreading VMs across zones survives a full datacenter failure. Availability sets protect only within one datacenter, proximity placement groups reduce latency, and one big VM is a single point of failure.

3. After a VM boots, you must run a configuration script on it to install and set up software. Which mechanism is designed for this?

  • The Custom Script Extension (correct answer)
  • A completely new redeployment of the virtual machine from a freshly captured managed image
  • A ReadOnly resource lock
  • A network security group rule

The Custom Script Extension downloads and runs a script on a VM after deployment to handle post-provisioning configuration. Redeploying from an image is heavy-handed, a lock protects the resource, and an NSG rule filters traffic.

4. You need a balanced ratio of vCPU to memory for a typical web server. Which Azure VM series is the general-purpose choice?

  • The D-series (correct answer)
  • The M-series, which is built for very large in-memory databases such as SAP HANA that need enormous amounts of RAM per vCPU
  • The F-series
  • The L-series

D-series VMs offer a balanced vCPU-to-memory ratio for general-purpose workloads like web servers. M-series targets huge memory workloads, F-series is compute optimized, and L-series is storage optimized.

5. A small test server sits idle most of the time but occasionally needs a short burst of CPU, and cost must be minimal. Which VM series fits best?

  • The M-series, a specialized memory-optimized family intended for the largest enterprise in-memory database workloads only
  • The B-series (correct answer)
  • The N-series
  • The H-series

B-series burstable VMs accumulate CPU credits while idle and spend them during bursts, making them cheap for intermittent low-baseline workloads. M is memory optimized, N is GPU, and H is HPC.

6. A batch job is CPU-bound and needs a high ratio of vCPU to memory. Which VM series is compute optimized for this?

  • The F-series (correct answer)
  • The E-series, a memory-optimized family that instead provides a high amount of RAM per vCPU for large data sets held in memory
  • The B-series
  • The L-series

F-series VMs are compute optimized with a high vCPU-to-memory ratio, suited to CPU-bound batch work. E-series is memory optimized, B-series is burstable, and L-series is storage optimized.

Related objectives