AZ-104 Practice Question 56: Spot VM Eviction Deallocate
Microsoft Azure Administrator Associate (AZ-104) · Test 6 · question 6 of 10
A team runs nightly rendering jobs on Azure Spot VMs to save money. Each VM keeps intermediate results on its OS disk. When Azure evicts a VM because it needs the capacity back, the team wants to stop paying for compute, keep the disks and their data, and be able to start the same VM again later when capacity is available.
Which eviction policy should the administrator configure?
Show answer and explanation
Answer:
A Spot VM has an eviction policy that decides what happens to it when it is evicted. With Stop / Deallocate, the VM moves to the stopped (deallocated) state: compute charges end, the VM and its disks remain, and the VM can be started again when Azure has capacity. The disks are still billed as storage, and a deallocated Spot VM still counts against the vCPU quota, which are trade-offs to remember.
Options A and B both use the Delete policy, which removes the VM and its disks when it is evicted, so the intermediate results on the OS disk are lost. The maximum price setting only controls evictions caused by price. A value of -1 means the VM is not evicted for price reasons, while a fixed cap such as the pay-as-you-go price can still trigger an eviction if the Spot price rises above it. Neither setting prevents capacity evictions, and neither keeps the disk.
Option C misunderstands Spot. Azure can evict a Spot VM whenever it needs the capacity, and an availability set or any other placement setting does not exempt it. There is also no "stop and keep" setting outside the eviction policy.
Reference: Azure Spot Virtual Machines