Convert Availability Set from managed to unmanaged - addycluri/Azure GitHub Wiki

Relative to managed Vs unmanaged disks, VM Availabilty sets (av-set) are also classified into managed Vs unmanaged based on the type of disks attached to the VM's in those av-sets. Reference link

  • Managed Availability set = All VM's in that av-set MUST have managed disks only
  • unmanaged Avalability set = All VM's in that av-set MUST have unmanaged disks only (blob VHD)

The instructions in this wiki can be followed to help with the av-set conversion process using a powershell script called Convert-AVSetManagedToUnManaged. Upon successful completion, the disks attached the VM's will be converted to unmanaged disks aand the SKU for the av-set will be unmanaged as well Please note that this process requires VM downtime so plan for it accordingly

Conversion Workflow

The workflow of the script is summarized below.

  • Get the Availability set object and the list of VMs present
  • Stop's each managed VM in the AV set
  • converts the VM disks to unmanaged, attaches them to an av-set & turns the VM on

Execution Steps

Follow the steps below to access Convert-AVSetManagedToUnManaged and execute the av-set conversion process.

  • Download and import the Powershell Module locally using the instructions provided - here

  • Check the script details using Get-Help Convert-AVSetManagedToUnManaged -Full before proceeding.

  • Open powershell and Login to your azure account using Connect-AzureRmAccount -TenantId "GUID" -SubscriptionId "GUID" (where the VMs with managed disks currently live)

  • Before you proceed, please ensure that all application owners & stakeholders are updated since the VM in question will have doowntime till the script execution is completed

  • To start the av-set conversion, in powershell execute Convert-AvSetManagedToUnManaged -AvailabilitySetName "MY-AVSet" -ResourceGroupName "MY-RG" -verbose

References

migrating av-sets to another subscription

⚠️ **GitHub.com Fallback** ⚠️