Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to prevent "trust relationship between this machine and domain failed" error from happening when restoring VM from a snapshot?

When you restore VM (that belongs to a windows domain) from (an old enough) snapshot you'll get this error:

trust relationship between this machine and domain failed

This happens because domain controller periodically renews computer account password (and maybe few other things).

Is there any way to configure domain controller (or anything else) in such way that this doesn't happen? I don't care about security risks/etc -- all this is in controlled environment.

like image 359
C.M. Avatar asked Oct 24 '25 17:10

C.M.


1 Answers

Two solutions:

  1. You can try the policy like @Harry mentioned to disable machine password:
    Reference: Domain member: Disable machine account password changes

Per the article: The Domain member: Disable machine account password changes policy setting determines whether a domain member periodically changes its computer account password. Setting its value to Enabled prevents the domain member from changing the computer account password. While not recommended for production environments, setting the value to Enabled his is what you would set the value at in your controlled environment which would eliminate the identified problem.

  1. Another way to handle it is using PowerShell. This won't prevent it from happening but will solve it, you can put it in a script and use:
    Test-ComputerSecureChannel –Server dc -Repair
    Reference: Test-ComputerSecureChannel
like image 89
ClumsyPuffin Avatar answered Oct 26 '25 11:10

ClumsyPuffin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!