Help Center/ Server Migration Service/ User Guide(ME-Abu Dhabi Region)/ FAQs/ Agent Installation and Startup/ How Do I Resolve Error "Failed to load wmi" During the Agent Startup?
Updated on 2024-03-15 GMT+08:00

How Do I Resolve Error "Failed to load wmi" During the Agent Startup?

Symptom

When you started the Agent, the message "SMS.1205 Failed to load wmi" was reported.

Possible Causes

Files related to Windows Management Instrumentation (WMI) are missing or damaged. In Windows, the Agent uses the WMI module to collect source server details, such as the CPU, memory, and disks details. The missing or damaged WMI-related files need to be restored.

  • WMI will be stopped during the restoration. Confirm that stopping WMI will not affect services on the source server. The restoration will also change the files on the source server, which may involve certain risks. It is recommended that you perform the operations on a cloned source server first.
  • If the issue persists, you can create an ECS by referring to "Creating a Windows ECS from an Image".

Restoring WMI

  1. Right-click This Computer in the navigation pane on the left in your file explorer and choose Manage from the shortcut menu.
  2. On the Computer Management page, choose Services and Applications > Services. Stop Windows Management Instrumentation.
  3. Change C:\Windows\System32\wbem\repository to C:\Windows\System32\wbem\repository_old.
  4. Start Windows Management Instrumentation.
  5. Open the cmd window as administrator.
  6. Go to the C:\Windows\System32\wbem\ directory.

    cd C:\Windows\System32\wbem\

  7. Restore WMI.

    for /f %s in ('dir /b *.mof') do mofcomp %s

    for /f %s in ('dir /b en-us\*.mfl') do mofcomp en-us\%s

  8. Restart the Agent.