If you have ever restored an old snapshot of a domain joined virtual server and seen the above error when trying to log back in after it restarted, you will no the frustration. This seems to be a problem when the snapshot is older than 30 days.
Once you restore the old snapshot, you then try and log in with your domain credentials only to be prompted with the dreaded
“The trust relationship between this workstation and the primary domain failed.“
This often happens when using virtual infrastructure, VMWare ESX, Microsoft’s HyperV or Citrix XenServer.
The cause is because the Machine has an account on the Domain, while maintaining its own password and updates its own password every 30 days. So restoring an older snapshot, its possible that the Machine account’s password has updated and you will be presented with this error when you try and logon.
To work around this issue, once restored from snapshot, login with local administrator privileges and reestablish the domain connectivity by rejoining the machine to the domain.
Additionally you can increase the computer account password age, or even disable password changes altogether so that you dont get this error again.
To do so, you need to set the following registry key
KEY: HKEY_LOCAL_MACHINE – SYSTEM – CurrentControlSet – Services – Netlogon – Parameters