Azure VM Deployment Models

Sardar Mudassar Ali Khan
15 min readJul 16, 2023

Azure VM Deployment Models: A Comprehensive Overview

Azure Virtual Machines (VMs) are a popular choice for running workloads in the cloud. They offer flexibility, scalability, and a wide range of deployment models to suit different needs. In this article, we will explore the various Azure VM deployment models and their key features to help you make informed decisions when deploying your applications.

1. Azure Resource Manager (ARM) Deployment Model:
The Azure Resource Manager (ARM) deployment model is the recommended approach for deploying and managing Azure resources, including VMs. It provides a unified management layer that allows you to deploy, manage, and monitor resources as a single entity called a resource group. ARM offers several advantages, such as role-based access control (RBAC), tagging, and template-based deployment for consistent and repeatable infrastructure provisioning.

2. Classic Deployment Model:
The classic deployment model was the original model for deploying resources in Azure and is now considered legacy. It uses a different management layer than ARM and has limited capabilities compared to the ARM model. While Azure encourages users to adopt the ARM model, there may still be scenarios where the classic model is necessary, such as when migrating existing applications that rely on specific features available only in the classic model.

3. Azure Dedicated Hosts:
Azure Dedicated Hosts provide physical servers dedicated to hosting your VMs. This model is ideal for scenarios that require compliance, security, or software licensing restrictions that necessitate running VMs on dedicated hardware. With Azure Dedicated Hosts, you have full control over the underlying host, including the ability to choose the hardware type, deploy multiple VM sizes on a host, and manage host-level maintenance.

4. Azure Spot VMs:
Azure Spot VMs offer significant cost savings for non-critical workloads by leveraging spare capacity in Azure data centers. Spot VMs are available at a reduced price compared to regular VMs, but there is a possibility that they can be evicted with short notice if the capacity is needed by other high-priority workloads. However, Azure provides eviction notifications and a customizable eviction policy to help you manage Spot VMs effectively.

5. Azure VM Scale Sets:
Azure VM Scale Sets allow you to automatically scale your VMs based on demand or a predefined schedule. It simplifies the management of a group of VMs by providing automatic load balancing, health monitoring, and automatic scaling based on customizable rules. VM Scale Sets are ideal for applications that require scaling in and out quickly to handle varying workloads efficiently.

6. Azure Reserved VM Instances (RIs):
Azure Reserved VM Instances enable you to reserve VM capacity in advance for a one- or three-year term, resulting in significant cost savings compared to on-demand VM pricing. RIs provide flexibility, allowing you to match the instance size, region, and term duration according to your requirements. They are an excellent option for workloads with predictable usage patterns and long-term commitments.

7. Azure Spot VM Scale Sets:
Azure Spot VM Scale Sets combine the cost savings of Spot VMs with the scalability and management capabilities of VM Scale Sets. By using Spot VMs within a scale set, you can take advantage of the low-cost pricing while ensuring high availability and automatic scaling of your application.

Azure Resource Manager (ARM) Deployment Model:

The Azure Resource Manager (ARM) deployment model is a powerful and recommended approach for deploying and managing Azure resources, including virtual machines (VMs). It provides a unified management layer that allows you to deploy, manage, and monitor resources as a single entity called a resource group.

Here are some key features and benefits of the Azure Resource Manager deployment model:

1. Resource Group: In the ARM model, resources are organized into logical containers called resource groups. A resource group is a fundamental unit for managing and securing resources in Azure. It allows you to deploy, update, and delete resources collectively, making it easier to manage related resources as a single entity.

2. Role-Based Access Control (RBAC): ARM offers robust RBAC capabilities, allowing you to grant fine-grained access control to resources within your subscription. You can assign roles to users, groups, or applications to control their permissions, ensuring that only authorized individuals can perform specific actions on resources.

3. Tagging: ARM allows you to assign tags to resources, providing a way to categorize and organize resources based on custom metadata. Tags enable better visibility and management of resources, making it easier to track costs, apply policies, and identify resources based on specific criteria.

4. Template-Based Deployment: One of the significant advantages of ARM is its support for template-based deployment. Azure Resource Manager Templates, written in JSON, allow you to define and deploy resources declaratively. Templates enable consistent and repeatable infrastructure provisioning, making it easier to create and manage complex deployments and automate resource deployments using infrastructure-as-code principles.

5. Dependency Tracking and Rollback: ARM automatically manages resource dependencies within a resource group. When deploying resources, ARM ensures that dependencies are resolved correctly, reducing the risk of deployment failures. Additionally, ARM tracks resource changes, allowing you to roll back to a previous deployment state if necessary.

6. Azure Resource Manager APIs and SDKs: ARM provides a rich set of APIs and SDKs for the programmatic management of resources. These APIs and SDKs enable developers and administrators to automate resource provisioning, configuration, and management tasks, integrating Azure resources seamlessly into custom workflows and applications.

7. Cross-Platform and Cross-Subscription Management: With ARM, you can manage resources across different Azure regions, subscriptions, and deployment models from a single management plane. This enables centralized management and governance, providing a unified view of your resources regardless of their location or deployment model.

Classic Deployment Model:

The Classic Deployment Model, also known as the Azure Service Management (ASM) model, was the original method for deploying and managing resources in Azure. However, it is now considered a legacy model, and Azure strongly recommends adopting the Azure Resource Manager (ARM) deployment model for new deployments. That being said, it’s essential to understand the Classic Deployment Model and its key characteristics:

1. Service Management API: In the Classic model, Azure resources are managed using the Service Management API. This API provides a set of RESTful endpoints for provisioning, configuring, and managing resources such as virtual machines, storage accounts, and virtual networks.

2. Cloud Services: One of the primary concepts in the Classic model is the Cloud Service, which serves as a container for deploying and managing a set of related resources. A Cloud Service can include one or more virtual machines, web or worker roles, and associated networking components.

3. Azure Virtual Machines: In the Classic model, virtual machines are created and managed within a Cloud Service. Virtual machines can be provisioned from pre-configured images or custom virtual hard disks (VHDs). However, virtual machine deployment and management in the Classic model lack some of the advanced features available in the ARM model, such as tagging, RBAC, and template-based deployments.

4. Affinity Groups: To optimize performance and reduce network latency, the Classic model introduced the concept of Affinity Groups. An Affinity Group is a logical grouping of Azure services located within the same data center region. By associating resources with the same Affinity Group, you could ensure that they were deployed in close proximity to each other.

5. Limited Management Capabilities: Compared to the ARM model, the Classic model has limited management capabilities. It lacks some of the advanced features and fine-grained control provided by ARM, such as role-based access control (RBAC), resource tagging, and template-based deployments. This makes it more challenging to manage and govern resources effectively, particularly in complex or large-scale deployments.

6. Transition to ARM: As the Azure platform has evolved, Microsoft has strongly encouraged users to migrate from the Classic model to the ARM model. While Microsoft continues to support existing deployments in the Classic model, new features and enhancements are typically introduced only for ARM. Migrating to ARM enables you to leverage the advanced capabilities, scalability, and enhanced management features provided by the ARM deployment model.

Azure Dedicated Hosts:

Azure Dedicated Hosts provide physical servers dedicated to hosting your virtual machines (VMs) in the Azure cloud. With Azure Dedicated Hosts, you have exclusive access to the underlying host hardware, which can be advantageous in scenarios that require compliance, security, or software licensing restrictions.

Here are the key features and benefits of Azure Dedicated Hosts:

1. Isolated Hardware: When you provision a Dedicated Host, you gain complete control over the physical server, including CPU, memory, storage, and network resources. This isolation ensures that your VMs run on dedicated hardware, providing enhanced security and compliance for sensitive workloads.

2. Compliance and Regulation: Azure Dedicated Hosts are suitable for workloads that require adherence to specific compliance and regulatory requirements, such as data sovereignty or industry-specific regulations. By having exclusive access to the physical server, you can meet stringent compliance requirements more easily.

3. License Mobility: Azure Dedicated Hosts allow you to bring your existing licenses to the Azure cloud. This license mobility feature helps you leverage your existing investments in software licenses while taking advantage of the scalability and flexibility of Azure. You can use eligible on-premises licenses, such as Windows Server and SQL Server, on Azure Dedicated Hosts.

4. Host-Level Maintenance Control: With Azure Dedicated Hosts, you have control over maintenance operations at the host level. This means you can schedule maintenance windows, ensuring that the updates and patches don’t disrupt your critical workloads. It provides more flexibility and control compared to shared infrastructure maintenance.

5. VM Placement and Affinity: Azure Dedicated Hosts enable you to control the placement of your VMs on specific physical servers. This allows you to ensure compliance with licensing terms or meet specific workload requirements that require VMs to be co-located on the same physical server for performance or latency reasons.

6. Cost Optimization: While Azure Dedicated Hosts provide dedicated hardware, they still offer the benefits of Azure’s flexible pricing models. You can choose between pay-as-you-go or reserved instance pricing options, optimizing costs based on your workload requirements and usage patterns.

7. Seamless Integration with Azure Services: Azure Dedicated Hosts seamlessly integrate with other Azure services, enabling you to take advantage of the full Azure ecosystem. You can connect Dedicated Hosts to Azure Virtual Networks, leverage Azure management and monitoring tools, and integrate with other Azure services to build comprehensive solutions.

Azure Spot VMs:

Azure Spot VMs are a cost-effective option for running non-critical workloads in the Azure cloud. Spot VMs leverage Azure’s excess capacity, allowing you to bid on unused virtual machine instances at significantly discounted prices compared to regular VM pricing. While Spot VMs offer cost savings, they come with the understanding that they can be evicted with short notice if Azure needs the capacity for higher-priority workloads.

Here are the key features and benefits of Azure Spot VMs:

1. Cost Savings: Azure Spot VMs provide substantial cost savings compared to regular VMs. The pricing for Spot VMs is dynamic and can fluctuate based on supply and demand. Spot VMs are typically available at significantly lower prices, allowing you to optimize costs for non-critical workloads or applications with flexible timing.

2. Eviction Notifications: When you deploy a Spot VM, Azure provides eviction notifications to give you a warning before the VM is evicted. These notifications enable you to gracefully handle the eviction by saving work or initiating shutdown procedures, ensuring minimal disruption to your workload.

3. Eviction Policies: Azure allows you to set eviction policies for Spot VMs. You can define how Azure should handle evictions based on your workload requirements. For example, you can choose to request deallocation, which allows the VM to gracefully shut down when evicted, or you can opt for the “delete” option, which removes the VM without a graceful shutdown.

4. Interruption-Based Workloads: Spot VMs are well-suited for interruptible or fault-tolerant workloads. These are workloads that can handle interruptions and can be easily resumed or restarted without significant impact. Examples include batch processing, dev/test environments, and workloads that can be checkpointed and resumed.

5. Scale and Flexibility: Azure Spot VMs offer the same scalability and flexibility as regular VMs. You can scale up or down the capacity of your Spot VMs based on your workload requirements. Spot VMs also support Azure VM scale sets, allowing you to automatically scale a group of Spot VMs based on predefined rules or demand.

6. Integration with Azure Services: Spot VMs seamlessly integrate with other Azure services, enabling you to build comprehensive solutions. You can combine Spot VMs with Azure Virtual Networks, storage services, and management tools to create highly scalable and cost-effective architectures.

Azure VM Scale Sets:

Azure Virtual Machine Scale Sets (VMSS) are a powerful Azure service that enables you to easily deploy and manage a group of identical virtual machines (VMs). VM Scale Sets provide automatic scaling, load balancing, and high availability, making them ideal for applications that require elasticity and can handle varying workloads efficiently.

Here are the key features and benefits of Azure VM Scale Sets:

1. Automatic Scaling: VM Scale Sets allow you to automatically scale the number of VM instances based on predefined scaling rules. You can define scaling based on metrics such as CPU utilization, network traffic, or custom application metrics. The scaling can be done manually or automatically, ensuring that your application can handle traffic spikes and scale down during periods of low demand.

2. Load Balancing: VM Scale Sets include built-in load balancing capabilities. Azure Load Balancer or Azure Application Gateway can distribute incoming network traffic across the VM instances in the scale set, ensuring optimal resource utilization and high availability.

3. High Availability: VM Scale Sets provide inherent high availability for your application. If a VM instance fails or becomes unavailable, Azure automatically redistributes the workload to healthy instances, minimizing downtime and ensuring that your application remains accessible.

4. Easy Deployment and Management: VM Scale Sets can be deployed and managed using Azure Portal, Azure CLI, PowerShell, or ARM templates. You define the configuration of a single VM instance, and Azure takes care of replicating and managing the desired number of instances within the scale set. This simplifies the deployment and management of multiple VMs and ensures consistency across the instances.

5. Virtual Machine Customization: Each VM instance within a scale set is based on the same VM image, but you can customize individual instances using Azure Custom Script Extension or Azure Automation Desired State Configuration (DSC). This flexibility allows you to configure different settings or install specific software on each instance while maintaining the core consistency of the VMs.

6. Integrated with Azure Services: VM Scale Sets seamlessly integrate with other Azure services, enabling you to build comprehensive solutions. You can combine VM Scale Sets with Azure Virtual Networks, Azure Load Balancer, Azure Application Gateway, Azure Monitor, and other services to create highly scalable and reliable architectures.

7. DevOps Integration: VM Scale Sets support integration with popular DevOps tools and services. You can incorporate VM Scale Sets into your CI/CD pipelines, leverage Azure DevOps, or use third-party tools for automated provisioning, configuration management, and application deployment.

Azure Reserved VM Instances (RIs):

Azure Reserved VM Instances (RIs) offer a cost-effective option for running virtual machines (VMs) in the Azure cloud by providing significant discounts compared to on-demand VM pricing. RIs allow you to reserve VM capacity in advance for a one- or three-year term, resulting in substantial cost savings, especially for workloads with predictable usage patterns and long-term commitments.

Here are the key features and benefits of Azure Reserved VM Instances:

1. Cost Savings: Azure RIs provide significant cost savings compared to on-demand VM pricing. By committing to a one- or three-year term, you receive a discounted rate for the reserved VM capacity. The savings can range from 30% to 80% depending on the VM instance type, term length, and payment option (upfront or monthly).

2. Flexible Instance Matching: With Azure RIs, you have flexibility in instance matching. You can reserve VM instances that match or have more capacity than your running VMs. This instance flexibility allows you to apply the RI discount to any VM within the same region and VM family, even if the instance sizes are different.

3. Region and Instance Size Flexibility: Azure RIs provide flexibility in choosing the region and instance size. You can reserve VM capacity in a specific Azure region and apply the reservation to any VMs within that region, regardless of the specific availability zone or virtual machine size. This flexibility enables you to optimize cost savings based on your workload requirements.

4. Payment Options: Azure RIs offer two payment options: upfront and monthly. With the upfront payment option, you pay the full RI cost upfront, resulting in maximum cost savings over the term. The monthly payment option allows you to spread the RI cost over the duration of the term, providing more financial flexibility.

5. Instance Exchange and Modifications: Azure RIs provide the flexibility to exchange or modify your reservations during the term. You can exchange an existing reservation for a different VM family, region, or term length. You can also modify the reservation to resize it or change the payment option. This flexibility allows you to adapt to changing workload requirements over time.

6. Hybrid Use Benefit (HUB): Azure RIs offer the Hybrid Use Benefit, which allows you to apply your existing on-premises Windows Server licenses or SQL Server licenses with Software Assurance to RIs. By utilizing the HUB, you can further maximize cost savings by leveraging your existing investments in Microsoft software licenses.

7. Integration with Azure Cost Management: Azure RIs seamlessly integrate with Azure Cost Management and Billing, providing visibility and cost analysis for your reserved VM capacity. You can track and monitor the utilization of your RIs, analyze cost savings, and optimize your Azure spending.

Azure Spot VM Scale Sets:

Azure Spot VM Scale Sets combine the cost savings of Azure Spot VMs with the scalability and management capabilities of VM Scale Sets. This combination allows you to take advantage of the low-cost pricing of Spot VMs while ensuring high availability and automatic scaling of your application.

Here are the key features and benefits of Azure Spot VM Scale Sets:

1. Cost Savings: Azure Spot VM Scale Sets offer significant cost savings compared to regular VM Scale Sets. Spot VMs are available at a significantly discounted price compared to on-demand VMs, allowing you to optimize costs for non-critical workloads or applications with flexible timing. By using Spot VMs within a scale set, you can benefit from the low-cost pricing while maintaining scalability and high availability.

2. Automatic Scaling: Azure Spot VM Scale Sets provide automatic scaling capabilities, just like regular VM Scale Sets. You can define scaling rules based on metrics such as CPU utilization, network traffic, or custom application metrics. This allows your application to dynamically scale the number of VM instances in response to workload demands, ensuring optimal performance and resource utilization.

3. Load Balancing and High Availability: Spot VM Scale Sets include built-in load balancing and high availability features. Azure Load Balancer or Azure Application Gateway can distribute incoming network traffic across the VM instances in the scale set, ensuring load distribution and high availability even with Spot VMs. If a Spot VM instance is evicted, the load balancer automatically redirects traffic to healthy instances, minimizing disruptions to your application.

4. Eviction Handling: Spot VM Scale Sets include eviction handling mechanisms to ensure graceful handling of Spot VM evictions. Azure provides eviction notifications, allowing you to take appropriate actions, such as saving work or initiating shutdown procedures before the eviction occurs. This helps minimize any potential impact on your workload.

5. Cost Optimization and Workload Flexibility: Azure Spot VM Scale Sets allow you to optimize costs while providing workload flexibility. You can combine Spot VMs with regular VMs within the same scale set, enabling you to allocate Spot VMs for non-critical workloads and regular VMs for critical workloads. This allows you to strike a balance between cost savings and workload requirements.

6. Integration with Azure Services: Azure Spot VM Scale Sets seamlessly integrate with other Azure services, similar to regular VM Scale Sets. You can combine Spot VM Scale Sets with Azure Virtual Networks, Azure Load Balancer, Azure Application Gateway, Azure Monitor, and other services to build comprehensive solutions that meet your application’s needs.

Over All Conclusion

In conclusion, Azure provides a range of VM deployment models to suit different needs and requirements. Let’s summarize the key points of each deployment model:

1. Azure Resource Manager (ARM) Deployment Model: The ARM model is the recommended approach for deploying and managing Azure resources. It offers benefits such as resource grouping, role-based access control (RBAC), template-based deployment, and tag-based organization. ARM provides a unified management layer for consistent and efficient resource management.

2. Classic Deployment Model: The Classic model is the legacy approach for deploying Azure resources. While it is still supported for existing deployments, Azure encourages users to transition to the ARM model. The Classic model has limited management capabilities compared to ARM and is primarily suitable for migrating existing applications or working with specific legacy features.

3. Azure Dedicated Hosts: Azure Dedicated Hosts offer dedicated physical servers for hosting VMs. This model is beneficial for compliance, security, and licensing requirements. Dedicated Hosts provide full control over the underlying hardware, customization options, and host-level maintenance control.

4. Azure Spot VMs: Azure Spot VMs provide cost savings by utilizing Azure’s spare capacity. Spot VMs are available at significantly reduced prices but can be evicted with short notice. They are suitable for non-critical workloads or applications that can handle interruptions and gracefully recover.

5. Azure VM Scale Sets: Azure VM Scale Sets allow for automatic scaling and management of a group of identical VMs. They provide load balancing, high availability, and automatic scaling based on demand or predefined rules. VM Scale Sets are ideal for applications that require elasticity and can handle varying workloads efficiently.

6. Azure Reserved VM Instances (RIs): Azure RIs offer cost savings by reserving VM capacity in advance for one or three years. RIs provide substantial discounts compared to on-demand pricing, making them suitable for workloads with predictable usage patterns and long-term commitments.

Each deployment model has its own strengths and uses cases. It’s essential to consider factors such as workload requirements, cost optimization, scalability, and compliance when choosing the appropriate Azure VM deployment model.

By understanding the features and benefits of each deployment model, you can make informed decisions and effectively utilize Azure’s capabilities to deploy and manage your VM infrastructure in the cloud.

--

--

Sardar Mudassar Ali Khan
Sardar Mudassar Ali Khan

Written by Sardar Mudassar Ali Khan

8x-Microsoft Certified Senior Software Engineer | MCT|MCT |Microsoft Certified Cloud Solution Architect | Microsoft Certified Cloud Developer | Technical Author

No responses yet