If you are seeing issues with time differences, you can run:
Set-ADFSRelyingPartyTrust -TargetName <trustname> -NotBeforeSkew <time_in_minutes>
https://learn.microsoft.com/en-us/powershell/module/adfs/set-adfsrelyingpartytrust?view=win10-ps
Have you checked the troubleshooting guide for this error?
PROBLEM
When you run the Convert-MsolDomainToStandard
cmdlet to convert a domain from federated to managed, you receive the following error message:
Failed to connect to Active Directory Federation Services 2.0 on the local machine.
Please try running Set-MsolADFSContect
before running this command again.
CAUSE
This problem occurs if the server on which you're running the Convert-MsolDomainToStandard
cmdlet is not running Active Directory Federation Services (AD FS).
SOLUTION
Do one of the following, as appropriate for your situation:
If AD FS is still running, use the Set-MsolADFSContext
cmdlet to specify the server on which AD FS is running.
For example:
Set-MsolADFSContext –Computer <ServerName>
For more information about the Set-MsolADFSContext
cmdlet, see Set-MsolADFSContext
.
If AD FS is not running, use the Set-MsolDomainAuthentication
cmdlet to change the domain to a managed domain.
For example:
Set-MsolDomainAuthentication -DomainName <DomainName> -Authentication Managed
For more info about the Set-MsolDomainAuthentication cmdlet, see Set-MsolDomainAuthentication.
Also, make sure the file and print sharing is open and the VMs can ping each other.