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) with no downtime is Generally Available. This functionality is available for scale sets with Flexible Orchestration Mode with a Fault Domain Count of 1.
Benefits
When the VM and VMSS meet all the qualifications, you can quickly attach the VM to the scale set by updating the VM to use the VMSS ID. You can attach VMs through the REST API, Azure Portal, Azure CLI, or Azure PowerShell. 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 the VM with the scale set ID
Update-AzVM -ResourceGroupName $resourceGroupName -VM $vm -VirtualMachineScaleSetId $vmss.Id
Conversely, to detach the VM from the scale set, you simply need to update the VM to no longer use a VMSS ID:
#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 with a Fault Domain Count of 1 is Generally Available in Azure.
Learn More
To learn more about how to attach or detach VMs to or from a VMSS Flex, please visit the documentation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.