Troubleshooting Performance Counter Initialization Error in D365 F&O

Performance counters are essential for monitoring system health and performance in Dynamics 365 Finance & Operations (F&O). Occasionally, developers encounter the dreaded “Performance Counter Initialization Failed” error when starting their development virtual machine (VM). This guide walks you through understanding, diagnosing, and fixing the issue.

Understanding the Error

This error typically appears when the performance counters on your Windows system become corrupted or inaccessible. It prevents the AOSService from initializing correctly, leading to slow startup or failed service launches.

Common causes include:

  • Corrupted performance counter registry entries.

  • Missing permissions for the AOSService account.

  • Incomplete system updates or interrupted installations.

Step-by-Step Fix

Follow these steps to resolve the issue:

  1. Check Event Viewer Logs

    • Open Event ViewerWindows LogsApplication.

    • Look for entries related to PerformanceCounter or AOSService.

  2. Rebuild Performance Counters

    • Run Command Prompt as Administrator.

    • Execute:

      lodctr /r
    • This command rebuilds the performance counter registry from system backups.

  3. Restart Services

    • Restart the AOSService using PowerShell:

      Restart-Service AOSService
    • Verify that the service starts without errors.

  4. Optional: Reset All Counters
    If issues persist, you can reset all counters:

    lodctr /r:PerfStringBackup.ini
  5. Verify Fix

    • Open Performance Monitor and confirm counters are visible.

    • Launch F&O and check that the error no longer appears.

Preventive Tips

  • Keep your VM updated with the latest Windows patches.

  • Avoid abrupt shutdowns during builds or updates.

  • Regularly back up your environment configuration.

Key Takeaway

This error is common but easily fixable. Understanding how performance counters work helps developers maintain stable environments and troubleshoot confidently.

Try It Yourself

Next time your VM throws this error, follow these steps and document the fix in your team’s wiki. Sharing knowledge builds stronger technical teams.

Disclaimer
The content on this blog is provided for informational and educational purposes only. Dynamics 365 EZ makes no representations or warranties of any kind, express or implied, about the accuracy, completeness, reliability, suitability, or availability of the information contained herein.
Any reliance you place on such information is strictly at your own risk. Dynamics 365 EZ shall not be liable for any errors or omissions, or for any losses, injuries, or damages arising from the use of, or reliance on, any information displayed on this site.

Comments

Popular posts from this blog

How to use X++ macro in Dynamics 365 F&O (D365 FSCM)?

Overview of unified ERP provisioning in Power Platform (Dynamics 365 F&O/D365 FSCM)