I am finally getting around to some hands-on with Azure Image Builder. More to come on that shortly. For now, I want to document my first issue for anyone who may experience the same problem. When creating the image builder template with the New-AzImageBuilderTemplate command, I got the following error message:
Az.ImageBuilder.internal\New-AzImageBuilderTemplate @PSBo …
The subscription is not registered to use namespace ‘Microsoft.VirtualMachineImages’. See https://aka.ms/rps-not-found for how to register subscriptions.
The error indicates that a required resource provider, Microsfot.VirtualMachineImages in this instance, is not registered. The provider can be registered with PowerShell or through the portal. Below are the steps for each.
From the portal, go to your Subscription, then find Resource Providers under Settings.
Search for the resource provider Microsoft.VirtualMachineImages. Notice the status is Not Registered. Click the Register button in the portal to register the resource provider.
To register a provider from PowerShell, log into Azure with rights to register a resource provider, such as subscription admin. Next, use the Register-AzResourceProvider command below to register the provider.
Register-AzResourceProvider -ProviderNamespace Microsoft.VirtualMachineImages
The provider will go to a state of registering. It could take a few minutes for the service to register.
From PowerShell, use the command Get-AzResourceProvider to verify the status.
Get-AzResourceProvider -ProviderNamespace Microsoft.VirtualMachineImages
Once finished, the resource provider changes to the Registered status.
The New-AzImageBuilderTemplate should run now without an error.