azureazure-rm-templatewindows-virtual-desktop

WVD AdminUsername Change NotAllowed


getting a strange error when deploying from a managed image in Windows Virtual Desktop

error:

\"message\":\"Atleastoneresourcedeploymentoperationfailed.Pleaselistdeploymentoperationsfordetails.Pleaseseehttps://aka.ms/DeployOperationsforusagedetails.\"\"details\":[\r\n{\r\n\"code\":\"Conflict\"\"message\":\"{\"error\":{\"code\":\"PropertyChangeNotAllowed\",\"message\":\"Changingproperty'adminUsername'isnotallowed.\",\"target\":\"adminUsername\

Any idea where I've gone wrong? Thanks in advance :)


Solution

  • As mentioned in the comment, make sure you are using the correct username.

    You can refer this github issue for more details.

    This is likely because the local user name was 'admin', which is not allowed by Azure. The name that will be used by the command can be found in az vm create -h