If you are using an ARM template to deploy the VM, verify that the imageReference
property is not being modified in subsequent deployments because it must remain consistent with the initial deployment.
If the VM is not yet in production and you can afford to recreate it, consider deleting the existing VM and deploying a new one with the correct imageReference
from the start.
- Delete the existing VM.
- Make sure that the
imageReference
in your deployment template or configuration is set correctly. - Redeploy the VM.
If the issue is related to generating SSH keys, you can use Azure CLI or PowerShell to generate the keys separately and then associate them with your VM.
az sshkey create --name "mySSHKey" --resource-group "NewLearner"
New-AzSshKey -ResourceGroupName "NewLearner" -Name "mySSHKey"