TROUBLESHOOTING: Cannot log on to infrequently used virtual machine

by Mitch Tulloch [Published on 20 Feb. 2013 / Last Updated on 20 Feb. 2013]

How to troubleshoot an issue where you can't log on to a virtual machine that hasn't been used for several months.

PROBLEM: You have a virtual machine environment running on a Hyper-V host. All your virtual machines are domain-joined, and one of the virtual machines has been turned off for several months. You start this virtual machine and connect to it, and when the logon screen appears you try to log on using your domain credentials. But the logon attempt doesn't work and you get the following error message:

The security database on the server does not have a computer account for this workstation trust relationship.

This error occurs because the computer account for this virtual machine's guest OS has expired in Active Directory, and as a result the trust relationship between the guest OS and Active Directory has failed. What can you do?

RESOLUTION METHOD 1: If you still know the password for the local Administrator account of the guest OS for the virtual machine, you can log on using these credentials, remove the guest from the domain, and then rejoin the guest to the domain. But what if you can't remember the password for the local Administrator account? If that's the case, try the next approach below.

RESOLUTION METHOD 2: Begin by opening the Virtual Machine Settings for the virtual machine in Hyper-V Manager and disconnect the virtual machine from the virtual network on the host. Now start the virtual machine again, and this time you should be able to log on using your domain credentials which should have been cached by the guest OS. Once you've logged on, reset the password for the local Administrator account on the virtual machine and then disjoin the virtual machine from the domain and shut it down. Now reconnect the virtual machine to the virtual network, start the virtual machine, log on using the local Administrator account, re-join the domain, reboot the virtual machine again, and everything should be OK.

Mitch Tulloch is a eight-time recipient of the Microsoft Most Valuable Professional (MVP) award and widely recognized expert on Windows administration, deployment and virtualization.  This tip was excerpted from his new book Installing and Configuring Windows Server 2012 Training Guide published by Microsoft Press which is available from Amazon.  For more tips by Mitch you can follow him on Twitter or friend him on Facebook.

See Also

Featured Links