Failed to migrate from unmanaged disk to managed disk in Azure due to the error 'The specified fault domain count 3 must fall in the range 1 to 2'
search cancel

Failed to migrate from unmanaged disk to managed disk in Azure due to the error 'The specified fault domain count 3 must fall in the range 1 to 2'

book

Article ID: 380198

calendar_today

Updated On:

Products

VMware Tanzu Application Service

Issue/Introduction

Regarding the change from unmanaged disk to managed disk in Azure, to do the following change to your deployment:

Before:
・Cloud Storage Type = Use Storage Account
・Deployments Storage Account Name =  *########*

After:
・Cloud Storage Type = Use Managed Disk
・Storage Account Type = Standard_LRS

 

And you will hit the following error message when trying to apply this change:

"error": {
"code": "InvalidParameter",
"message": "The specified fault domain count 3 must fall in the range 1 to 2.",
"target": "platformFaultDomainCount"

Cause

This is due to the following (https://bosh.io/docs/azure-cpi/#resource-pools) in Azure

platform_fault_domain_count [Integer, optional]: The count of fault domain in the availability set.

For Azure, the default value of an unmanaged availability set is 3. The default value of a managed availability set is 2, because some regions don't support 3 fault domains for now

 

Also the document of bosh-azure-cpi-release(https://github.com/cloudfoundry/bosh-azure-cpi-release/blob/2680a3522a88c134bd2db7c2f3519d58678f004a/docs/advanced/managed-disks/README.md) also mentioned the below notices:

Let's assume that the fault domain number is set to `3` in your existing deployment.

* For the regions which support 3 FDs, the migration will succeed.
* For the regions which only support 2 FDs
  * If the existing deployment doesn't use load balancer, the migration will secceed. You need to specify a new availability set name in `resource_pools`. Then CPI will create new VMs with managed disks in new availability sets (managed) one by one. After migration, you can delete the old unmanaged availability sets manually.
  * If the existing deployment is using load balancer, the migration will fail because the VMs behind a load balancer have to be in a same availability set. This prevents CPI creating VMs in the new availability set one by one. You should not use managed disks feature until the region supports 3 FDs.

Resolution

If the region doesn't support 3 fault domains you could possibly change from Sets to Availability Zones and scaling everything down to a single VM.

The only other option is rebuilding the foundation from scratch and migrating all your apps to it.