I no longer work at Microsoft, so please don't bother leaving a comment here or trying to contact me through my MSDN blog.
You can find my new blog at http://www.technologytoolbox.com/blog/jjameson. My new site also provides copies of all posts from my MSDN blog.
This morning I rolled back one of my development VMs to a snapshot I created about a month ago. When I subsequently tried to login with my domain credentials, I encountered the following error:
The trust relationship between this workstation and the primary domain failed.
I did a quick Internet search for this error and found the following KB article:
While you could follow the instructions in KB 162797 to resolve this error (removing the computer from the domain and then adding it back), there's a much easier way to resolve the error:
Don't be put off by the title of this KB article. You just need to read a little bit into it:
[...] This procedure is most frequently used on domain controllers, but also applies to any Windows machine account.
To resolve the error after applying an old Hyper-V snapshot on a VM joined to a domain:
XAVIER1 is one of the domain controllers in my home lab (TECHTOOLBOX).
Note that this issue doesn't always occur when rolling back a snapshot. It depends on how old the snapshot is (specifically whether or not the machine account password has changed in the domain since the snapshot was taken).
One of the other things I've learned about using snapshots with a domain-joined VM is that you should be sure to enable the Time synchronization service on the VM. I typically disable this service on domain-joined VMs (since the time is synchronized from the domain controller). However, when using snapshots, the latency in waiting for the time to synchronize after applying a snapshot can quickly become unbearable (especially if you are frequently applying a snapshot).