ISO-Certified Practices  |  Azure · AWS · GCP Partner  |  24/7 Security Monitoring  |  200+ SMEs Secured

Step-by-Step Guide: Azure Spot VMs Setup

Setting up Azure Spot VMs involves several steps. Here’s a step-by-step guide to help you set up Azure Spot VMs:

Before we begin want you to understand, there are certain Azure VM types that cannot be set up as Azure Spot VMs.

  1. B-series: B-series VMs are burstable VMs that offer cost savings by allowing the VM to use unused CPU cycles. However, B-series VMs do not support Azure Spot pricing.
  2. Promo/Preview VM sizes: Some promotional or preview VM sizes (like Dv2, NV, NC, H promo sizes) may not be eligible for Azure Spot VM pricing. These sizes are often introduced temporarily or for specific testing purposes.

Steps to Setup Spot VMs

Step 1: Sign into the Azure Portal Sign into the Azure portal using your Azure account credentials.

Step 2: Create a resource group Create a resource group to contain your Azure Spot VMs. A resource group is a logical container for organizing and managing your Azure resources.

  1. In the Azure portal, click on “Resource groups” in the left-hand menu.
  2. Click on the “Add” button to create a new resource group.
  3. Provide a name for the resource group, select the desired subscription, and choose a region for the resource group.
  4. Click on “Review + create” and then click on “Create” to create the resource group.

Step 3: Create an Azure Virtual Machine Create a virtual machine in Azure using the Azure Spot pricing option. You can choose an existing virtual machine image or create a custom image.

  1. In the Azure portal, click on “Virtual machines” in the left-hand menu.
  2. Click on the “Add” button to create a new virtual machine.
  3. Provide the necessary details such as the name, region, availability options, and resource group.
  4. In the “Size” section, click on “View all” and select a VM size that supports Azure Spot instances.
  5. In the “Spot instance” section, select “Yes” to use Azure Spot VMs.
  6. Specify the eviction policy for your Spot VMs, such as “Deallocate” or “Delete.” This determines what happens when the Spot instance is evicted.
  7. Configure other settings like networking, storage, and authentication as per your requirements.
  8. Review the settings, and click on “Next: Disks” to proceed.
  9. Configure the disk options and click on “Next: Networking.”
  10. Configure the networking options, including virtual network and subnet settings.
  11. Click on “Next: Management” to configure management options if needed.
  12. Review the summary and click on “Review + create.”
  13. Once the validation is successful, click on “Create” to create the Azure Spot VM.

Step 4: Configure Azure Spot fleet To optimize cost and availability, you can configure an Azure Spot fleet that consists of multiple Spot VMs.

  1. In the Azure portal, navigate to the resource group where you created the Spot VM.
  2. Click on the virtual machine you created earlier.
  3. In the VM’s blade, click on “Automation” in the left-hand menu.
  4. Under “Azure Spot,” click on “Configure Spot fleet.”
  5. Provide the required details for the Spot fleet, such as fleet size, eviction policy, and maximum price.
  6. Review the settings and click on “Save” to configure the Azure Spot fleet.

Step 5: Monitoring and Managing Azure Spot VMs Once your Azure Spot VMs are up and running, you can monitor and manage them using various Azure tools and features.

  1. In the Azure portal, navigate to the resource group containing your Spot VMs.
  2. Click on the virtual machine you want to monitor or manage.
  3. Use the available options in the VM’s blade to perform actions like starting, stopping, restarting, or resizing the VM.
  4. You can also use Azure Monitor, Azure Log Analytics, or Azure Resource Manager templates for more advanced monitoring and management capabilities.

That’s it! You have successfully set up Azure Spot VMs. Remember that Azure Spot VMs are available at significantly lower prices but can be evicted with short notice. Therefore, it’s essential to plan your workloads and applications accordingly and have appropriate mitigation strategies in place.


Leave a Reply

Discover more from Avicrown Tech Solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading