azure-quickstart-templates
azure-quickstart-templates copied to clipboard
201-VM-Domain-Join complains about UserExists, but manual joining worked
[201-vm-domain-join] https://github.com/Azure/azure-quickstart-templates/blob/master/201-vm-domain-join/azuredeploy.json
Issue Details
I am using JsonADDomainJoin extension to domain join. Since my script/template is still under development, I tend to create VM, delete it, and recreate. But starting from couple of days ago, when I did the same rinse-repeat, the extension won't succeed, complaining about UserExists.
But when I logged onto the partially provisioned VM, and do a manual domain join, it works.
Any recent update to the extension?
[
{
"code": "ComponentStatus/JoinDomainException for Option 3 meaning 'User Specified'/failed/1",
"displayStatus": "Provisioning failed",
"level": "Error",
"message": "ERROR - Failed to join domain='redmond.corp.microsoft.com', ou='OU=ITManaged,OU=ITServices,DC=redmond,DC=corp,DC=microsoft,DC=com', user='redmond\\sfcsvc', option='NetSetupJoinDomain, NetSetupAcctCreate' (#3 meaning 'User Specified'). Error code UserExists",
"time": null
},
{
"code": "ComponentStatus/JoinDomainException for Option 1 meaning 'User Specified without NetSetupAcctCreate'/failed/1",
"displayStatus": "Provisioning failed",
"level": "Error",
"message": "ERROR - Failed to join domain='redmond.corp.microsoft.com', ou='OU=ITManaged,OU=ITServices,DC=redmond,DC=corp,DC=microsoft,DC=com', user='redmond\\sfcsvc', option='NetSetupJoinDomain' (#1 meaning 'User Specified without NetSetupAcctCreate'). Error code 5",
"time": null
}
]
Did you ever get a fix for this?
+1
@cyruszhang I actually figured out my issue. My issue was with the username I was using for the domain join. I am using one specific username to provision all of my VMs and then using a different one for the domain join (in addition to installing the primary domain controller).. The problem was that I accidentally used the same username I was using to provision the VMs in the DSC script I was using to install the domain controller. As a result, the username I was using to join VMs to the domain was not the same as the one that was used to setup the domain.
Still, without looking at your template, it is hard to make a conclusion on why you are experiencing this error.
+1
I'm having a difficult time believing this is still an issue, but it is. If there were a way to force a scale set to always generate unique (always increasing) instance IDs, then this would never be an issue - it would become a cleanup task on the back end to remove computers that have aged out.