Error installing AX 2012 AOS on a new server

When trying to install AX 2012 R3 CU9 on a new server, we are unable to install AOS component. It shows that the installation has succeeded, but when checking the log, we find error. Even the Service is missing. Error message shown is as below.

"2019-08-26 04:10:28Z Granting AOS account access to database on server
2019-08-26 04:10:28Z ******************************************************************************************************

2019-08-26 04:10:28Z Component installation task stopped due to an error.

2019-08-26 04:10:28Z ******************************************************************************************************
2019-08-26 04:10:28Z ******************************************************************************************************

2019-08-26 04:10:28Z Attempted to perform an unauthorized operation.

2019-08-26 04:10:28Z ******************************************************************************************************
2019-08-26 04:10:28Z ******************************************************************************************************

2019-08-26 04:10:28Z System.UnauthorizedAccessException: Attempted to perform an unauthorized operation.
2019-08-26 04:10:28Z at Microsoft.Win32.RegistryKey.Win32ErrorStatic(Int32 errorCode, String str)
2019-08-26 04:10:28Z at Microsoft.Win32.RegistryKey.OpenRemoteBaseKey(RegistryHive hKey, String machineName)
2019-08-26 04:10:28Z at System.Diagnostics.EventLog.GetEventLogRegKey(String machine, Boolean writable)
2019-08-26 04:10:28Z at System.Diagnostics.EventLog.FindSourceRegistration(String source, String machineName, Boolean readOnly)
2019-08-26 04:10:28Z at System.Diagnostics.EventLog.SourceExists(String source, String machineName)
2019-08-26 04:10:28Z at System.Diagnostics.EventLog.VerifyAndCreateSource(String sourceName, String currentMachineName)
2019-08-26 04:10:28Z at System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData)
2019-08-26 04:10:28Z at System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID)
2019-08-26 04:10:28Z at Microsoft.Dynamics.AX.Framework.Tools.ModelManagement.AxUtilEventLog.Log(EventLogEntryType eventLogType, AxUtilEventLogType logType, String message)
2019-08-26 04:10:28Z at Microsoft.Dynamics.AX.Framework.Tools.ModelManagement.AxUtilEventLog.LogSuccess(AxUtil util, AxUtilEventLogType eventLogType, AxUtilAction action, IAxUtilEventLogEntry logEntry)
2019-08-26 04:10:28Z at Microsoft.Dynamics.AX.Framework.Tools.ModelManagement.AxUtil.GrantPermission(String schemaName)
2019-08-26 04:10:28Z at Microsoft.Dynamics.Setup.Support.SetupQueue.AOSInstaller.GrantAOSAccounttoDatabase(String databaseServer, String databaseName)
2019-08-26 04:10:28Z at Microsoft.Dynamics.Setup.Support.SetupQueue.AOSInstaller.AosPreInstallActions()
2019-08-26 04:10:28Z at Microsoft.Dynamics.Setup.Support.SetupQueue.AOSInstaller.PerformWork()
2019-08-26 04:10:28Z at Microsoft.Dynamics.Setup.Support.SetupQueue.InstallationClass.DoWork(Object sender, DoWorkEventArgs e)
2019-08-26 04:10:28Z at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

2019-08-26 04:10:28Z ******************************************************************************************************"