Azure Resource Manager: moving a virtual machine to an availability group

There is no way to figure out how to change the availability set of an existing Azure VM in the Resource Manager stack. There is no interface. Set-AzureAvailabilitySet does not exist in Azure Powershell tools in ResourceManager mode. It exists in the service stack mode. But it doesnโ€™t help me.

+5
source share
2 answers

AFAIK, this feature can be solved by the end of this year. This is a big task for the MS team to allow such an operation. Changing the availability set requires a review of the VM mobility architecture on Azure. For example, adding a virtual machine to an availability set that already contains a virtual machine means that it is placed in a different default domain. Becasue VM mobilty is an Azure issue (without live migration), it is not an easy operation.

I wrote a Powershell script that allows you to change the AS of a virtual virtual machine by updating it.
Try and enjoy:

How to use it?

1- Download the script and save it in a local location

2- Run it and specify the requested parameters

or

2-./Set-ArmVmAvailabilitySet.ps1 -VmName 'VM Name -ResourceGroup' Resource Group -AvailabilitySetName 'As Name -SubscriptionName' Subscription Name

To remove a virtual machine from AccessSet:

./Set-ArmVmAvailabilitySet.ps1 -VmName 'Virtual Machine Name -ResourceGroup' Resource Group -AvailabilitySetName 0 -SubscriptionName 'Subscription Name

Download link

Version 1.01: https://gallery.technet.microsoft.com/Set-Azure-Resource-Manager-f7509ec4

A source

+4
source

This feature is not yet implemented on the ARM stack, so you do not see the cmdlet ...

+2
source

All Articles