Deploy Spot VMs using the Azure portal
Using Spot VMs allows you to take advantage of our unused capacity at a significant cost savings. At any point in time when Azure needs the capacity back, the Azure infrastructure will evict Spot VMs. Therefore, Spot VMs are great for workloads that can handle interruptions like batch processing jobs, dev/test environments, large compute workloads, and more.
You have option to set a max price you are willing to pay, per hour, for the VM. The max price for a Spot VM can be set in US dollars (USD), using up to 5 decimal places. For example, the value
0.05701would be a max price of $0.05701 USD per hour. If you set the max price to be
-1, the VM won't be evicted based on price. The price for the VM will be the current price for spot or the price for a standard VM, which ever is less, as long as there is capacity and quota available.
When the VM is evicted, you have the option to either delete the VM and the underlying disk or deallocate the VM so that it can be restarted later.
Create the VM
The process to create a VM that uses Spot VMs is the same as detailed in the quickstart. When you are deploying a VM, you can choose to use an Azure spot instance.
On the Basics tab, in the Instance details section, No is the default for using an Azure spot instance.
It you select Yes, the section expands and you can choose your eviction type and eviction policy.
You can also create Spot VMs using PowerShell.