Loading...

Public Preview of Attach and Detach of Virtual Machines on Virtual Machine Scale Sets

Public Preview of Attach and Detach of Virtual Machines on Virtual Machine Scale Sets

Today, we’re making it possible to attach a running Virtual Machine (VM) to an existing Virtual Machine Scale Set (VMSS) with no downtime. VMSS customers can now also detach a VM with minimal to no downtime. Attach and detach actions are available for scale sets with Flexible Orchestration Mode with a Fault Domain Count of 1.

 

Benefits

  1. Let Azure do the work: Easily move from a single VM to VMSS Flex and make use of all the benefits that come from scale sets, like Autoscale, Automatic OS Upgrades, Spot Priority Mix, Instance Repairs, and Upgrade Policies.
  2. Easily scale: By attaching an existing VM to an existing VMSS Flex, you can grow your Compute architecture without having to rebuild it from scratch. 
  3. No downtime: You can attach running VMs to a scale set with no downtime, thereby creating a frictionless experience to make use of scale sets.
  4. Isolation: Should you need more detailed troubleshooting of a VM, you can now detach the VM to isolate it from the scale set.  

When the VM and the VMSS meet all the qualifications, you can quickly attach the VM to the scale set by updating the VM to use the VMSS ID. Use the REST API, Azure Portal, Azure CLI, or Azure PowerShell to update the VMSS ID parameter on the VM. For example, using PowerShell:

 

#Get VM information $vm = Get-AzVM -ResourceGroupName $resourceGroupName -Name $vmName #Get scale set information $vmss = Get-AzVmss -ResourceGroupName $resourceGroupName -Name $vmssName #Update VM to include the VMSS ID $vm.VirtualMachineScaleSetId = $vmss.Id #Update the VM Update-AzVM -ResourceGroupName $resourceGroupName -VM $vm

 

Likewise, to detach the VM, you simply need to update the VM to no longer have a VMSS ID associated with it:

 

#Get VM information $vm = Get-AzVM -ResourceGroupName $resourceGroupName -Name $vmName #Update the VM with the new scale set refence of $null Update-AzVM -ResourceGroupName $resourceGroupName -VM $vm -VirtualMachineScaleSetId $null

 

Attach and detach of VMs to/from VMSS Flex is in Public Preview in all regions in public Azure.

 

Learn More

To learn more about how to attach or detach VMs to or from a VMSS Flex, please visit the documentation.

Published on:

Learn more
Azure Compute Blog articles
Azure Compute Blog articles

Azure Compute Blog articles

Share post:

Related posts

Upcoming Changes to Instance Size Flexibility Ratios for Reserved VM Instances for M-series: What Yo

Overview In the ever-evolving landscape of cloud computing, it is crucial to stay informed about changes that may affect your usage and busine...

1 year ago

Exploring SUSE Enterprise Linux on Azure

Exploring SUSE Enterprise Linux on Azure In today's cloud-centric world, leveraging robust and reliable operating systems is crucial for busin...

1 year ago

Announcing Public Preview of new attach/detach disks API for VMs/VMSS

We are excited to announce the public preview of a new API that will make attaching and detaching disks to a VM faster and easier. The new API...

1 year ago

Fine-tuning a Hugging Face Diffusion Model on CycleCloud Workspace for Slurm

Introduction Azure CycleCloud Workspace for Slurm (CCWS) is a new Infrastructure as a Service (IaaS) solution which allows the users to purpos...

1 year ago

Public Preview Announcement-On Demand Capacity Reservation in Azure in China

Today, we're announcing the public preview of on demand capacity reservations for Azure Virtual Machines in Azure in China Cloud . Y...

1 year ago

Breaking change for Window Server 2022 Image Users with .NET 6

Azure Marketplace media images for Windows Server 2022 currently include .NET 6, but going forward will not include a .NET version with the im...

1 year ago

Announcing the public preview of the new Azure FXv2-series Virtual Machines

Today, Microsoft is announcing the public preview of the new Azure FXv2-series Virtual Machines (VMs), based on the 5th Generation Intel® Xeon...

1 year ago

Effortlessly Migrate Azure VMs between zones

For various reasons you might come across a situation when you need to migrate your Azure VMs from one zone to another. Migrating Azure VMs be...

1 year ago

Announcing Public Preview of Instance Mix on Virtual Machine Scale Sets

Today, we’re excited to announce that the ability to specify multiple different VM sizes in your Virtual Machine Scale Sets (VMSS) with Flexib...

1 year ago

Announcing General Availability of Attach & Detach of Virtual Machines on Virtual Machine Scale Sets

Today, we’re thrilled to announce that the ability to attach or detach Virtual Machines (VMs) to and from a Virtual Machine Scale Set (VMSS) w...

2 years ago

Newsletter

Get the latest Dynamics 365 and Power Platform content in your inbox

A curated digest of community blogs, product news, videos, and podcasts — delivered without the noise.

Weekly updates Unsubscribe anytime Fresh community picks
We use your email only for the newsletter and you can unsubscribe at any time.
By subscribing, you agree to the privacy policy.