Azure – Virtual machine scale set does not support disk encryption


New-AzureRmResourceGroupDeployment : 3:49:21 PM - Resource Microsoft.Compute/virtualMachineScaleSets 'vmssfp6s' failed with message '{
 "error": {
  "code": "NotSupported",
  "message": "Virtual machine scale set does not support disk encryption. Please remove Azure Disk Encryption extension from virtual machine scale set model."
  }
 }'
 #Yet I see examples in GitHub - so is it supposed to work?
$namespaces=(Get-AzureRMresourceprovider).ProviderNamespace
foreach ($Provider in $namespaces) {
 Get-AzureRmProviderFeature -ProviderNamespace $Provider -ListAvailable | FT
}

$State=Get-AzureRmProviderFeature -ProviderNamespace Microsoft.Compute -FeatureName 'UnifiedDiskEncryption'
if ($State.RegistrationState -eq 'NotRegistered') {
 Write-Verbose 'Register-AzureRmProviderFeature UnifiedDiskEncryption...'
 Register-AzureRmProviderFeature -ProviderNamespace Microsoft.Compute -FeatureName 'UnifiedDiskEncryption'
 Do {
  sleep -Seconds 30
  $state=Get-AzureRmProviderFeature -ProviderNamespace Microsoft.Compute -FeatureName 'UnifiedDiskEncryption'
 }
 until ($state.RegistrationState -eq 'Registered')
}
# NOW it works...
Comments (0)

Skip to main content