question

daveMCT avatar image
0 Votes"
daveMCT asked prmanhas-MSFT commented

Cannot use Cloud Shell to make VM in PowerShell

I tried to make an new VM using the cloud shell. I used the actual example # 1 from Microsoft Docs as follows:

New-AzVM -Name MyVm -Credential (Get-Credential)

After entering in a user name and a password I get the following error message:

 New-AzVM: The property 'securityProfile.encryptionAtHost' is not valid because the 'Microsoft.Compute/EncryptionAtHost' feature is not enabled for this subscription.

And then it aborts out.

I can make the exact same VM in the Portal.

This error is new and I've searched for it everywhere, but I get no hits in Bing or Google.

The original docs page is: https://docs.microsoft.com/en-us/powershell/module/az.compute/new-azvm?view=azps-4.6.0

I have used the above command in the past in various demos and classes I've taught without any error. This has only just now appeared.

What can I do to fix, and why am I having it now but not before?

Regards,

Dave Franklyn

azure-virtual-machinesazure-cloud-services
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

anonymous userMCT If the suggested response helped you resolve your issue, do click on "Mark as Answer" and "Up-Vote" for the answer that helped you for benefit of the community.

Thanks





0 Votes 0 ·

1 Answer

prmanhas-MSFT avatar image
2 Votes"
prmanhas-MSFT answered

anonymous userMCT Thank you for your query and apologies for all the inconvenience caused because of the issue.

I did some research on the issue I found that even though according to this resource the feature is supported only in a limited set of regions others are affected as well. The same behavior can be seen when trying to create a VM in other regions as well (West Europe and North Europe).

Few potential workaround like this procedure to enable the EncryptionAtHost feature is not applicable to the above-mentioned regions:

az feature register --namespace "Microsoft.Compute" --name "EncryptionAtHost"
Once the feature 'EncryptionAtHost' is registered, invoking 'az provider register -n Microsoft.Compute' is required to get the change propagated The feature 'EncryptionAtHost' does not support registration.

By following a step-by-step approach of VM creation like this one , the creation procedure completes successfully. Tested with both Windows and Ubuntu images.

I found that some customers are facing the same issue as yours and discussion on same is going on this GitHub thread.You can follow this thread to get the latest information on fix and updates.

Hope it helps!!!

Please 'Accept as answer' if it helped, so that it can help others in the community looking for help on similar topics



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.