Created on
Azure Local – Custom location in failed provision state
This one was not something I was working on myself, but I got this from a customer of mine. The problem was and the customer could not choose several of their Azure Local custom locations for deployment of new virtual machines.
Running this command can tell us status on the custom location:
az customlocation list --query "[?name=='NAMEOFCUSTOMLOCATION']"
If it shows as provisionState: “Failed” we can fix it using this command:
az customlocation update --name NAMEOFCUSTOMLOCATION --resource-group RGNAME --cluster-extension-ids "/subscriptions//resourceGroups//providers/Microsoft.ResourceConnector/appliances//providers/Microsoft.KubernetesConfiguration/extensions/vmss-hci" "/subscriptions//resourceGroups//providers/Microsoft.ResourceConnector/appliances//providers/Microsoft.KubernetesConfiguration/extensions/hybridaksextension" --namespace default --host-resource-id "/subscriptions//resourceGroups//providers/Microsoft.ResourceConnector/appliances/"