Spot Virtual Machines (VMs) or spot instances can be used to buy unused Azure compute capacity at a great discount compared to the usual set of VMs. Spot VMs are usually used for workloads that can handle interruptions and do not have to be completed in a specific time period.
However, Spot VMs are evicted when:
- You have reached the maximum price you have set.
- Azure no longer has available compute capacity and needs to reallocate its resources.
Microsoft Azure has two eviction policies when one of the above criteria are met:
- Spot VM deletion: the VM is deleted permanently. Data that was stored on the VM storage is permanently deleted.
- Spot VM deallocation: the VM is set to deallocated and won't start up again unless the maximum price is changed or there is capacity available again. Data stored on the VM storage will be available again once you're able to start the VM again.
anDREa offers Spot VMs with the following configuration:
- The price is set to a pay-as-you-go rate similar to your regular VMs, however the price is significantly lower for Spot VMs. This means Spot VM eviction policy will be triggered based on capacity and not on the set maximum price.
- The eviction policy is Spot VM deallocation. The Spot VM will not be deleted if Azure needs the capacity, but deallocated instead.
Why use a spot VM?
Please be aware that Spot VMs do not have an SLA (either from Microsoft or anDREa) and can be deleted or deallocated by Microsoft Azure at any given time without recovery.
How to create a spot VM?
Existing VMs cannot be converted into Spot VMs, this can only be set upon VM creation. As with any VM creation, you need to have Accountable or Privileged Member rights in a Workspace.
A range of sizes are available for spot instances, however there are some (Microsoft Azure) exceptions:
- Promo-series of any size.
- Enter the Workspace by clicking anywhere on the Workspace tile.
- Click on + Add Virtual Machines. This will open the VM creation wizard.
- Select one of the templates such as your organisation-specific template or an empty template such as Windows-Base/1.0.5.
- Select your VM series.
- Under Hardware configuration you will be presented with the VM sizes. Some of them will display the SPOT tag. These are Spot VMs. Once you select a Spot VM, you will be presented with extra information on the right hand side. Please be sure to read the Spot VM documentation before proceeding.
- Click on Add configuration.
- In the checkout menu, click on Create virtual machines to start the deployment of the Spot VM.