I have a virtual machine with Windows Server 2016 standard, configured
- Domain controller
- SQL Server 2016 with SP2
- Latest updates
When installing Dynamics CRM 365 on-premise, I got the following error
12:47:43| Error| Install exception.System.Exception: Action Microsoft.Crm.Setup.Server.InstallConfigDatabaseAction failed. ---> Microsoft.Crm.CrmException: Could not acquire Write lock in time 30000 milliseconds
at Microsoft.Crm.CrmLockSlim..ctor(ReaderWriterLockSlim readWriteLock, LockMode lockMode, Int32 timeoutInMilliseconds, Boolean allowRecursion)
at Microsoft.Crm.ConfigurationDatabase.ConfigurationMetadata.get_Cache()
at Microsoft.Crm.SharedDatabase.DatabaseService.Initialize(String tableName)
at Microsoft.Crm.SharedDatabase.DatabaseService.RetrieveInternal(String tableName, String[] columns, PropertyBag[] conditions, Nullable`1 top, Nullable`1 offset, IList`1 orderBy, QueryHints hints, IDictionary collectionToFill)
at Microsoft.Crm.SharedDatabase.DatabaseService.<>c__DisplayClass47_0.<Retrieve>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func`1 func)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func`1 func)
at Microsoft.Crm.Admin.AdminService.ConfigDBSecurity.SystemUserService.Create(String name, Guid defaultOrganizationId, String authInfo)
at Microsoft.Crm.Admin.AdminService.ConfigDBSecurity.SystemUserService.Create(String name, Guid defaultOrganizationId, SecurityIdentifier sid)
at Microsoft.Crm.SystemDatabaseInstaller.Core.StandardConfigSqlStrategy.AddInitialUser()
at Microsoft.Crm.SystemDatabaseInstaller.Core.DatabaseInstallerBase.Install()
at Microsoft.Crm.Setup.Server.InstallConfigDatabaseAction.Do(IDictionary parameters)
at Microsoft.Crm.Setup.Shared.CrmAction.ExecuteActionHelper(CrmAction action, IDictionary parameters, Boolean undo)
--- End of inner exception stack trace ---
at Microsoft.Crm.Setup.Shared.CrmAction.ExecuteActionHelper(CrmAction action, IDictionary parameters, Boolean undo)
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Setup.Shared.Installer.<>c__DisplayClass83_0.<DoAction>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Setup.Shared.Installer.<>c__DisplayClass67_0.<Install>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Setup.Server.ServerRoleInstaller.Install(IDictionary stateSaver)
at Microsoft.Crm.Setup.Shared.ComposedInstaller.InvokeInstall(Installer installer, IDictionary stateSaver)
at Microsoft.Crm.Setup.Shared.ComposedInstaller.InternalInstall(IDictionary stateSaver)
at Microsoft.Crm.Setup.Shared.ComposedInstaller.Install(IDictionary stateSaver)
at Microsoft.Crm.Setup.Server.ServerSetup.Install(IDictionary data)
at Microsoft.Crm.Setup.Shared.SetupBase.ExecuteOperation()
12:47:43|Verbose| Method exit: Microsoft.Crm.Setup.Server.ServerSetup.ExecuteOperation
12:47:43| Info| ActivatePage(ServerSetupFinishPage)
Please advise to resolve this issue.