How to Hyper-V unable to connect WMI namespace root\cimv2 to localhost
This is a practical experience the admin will share with you to be the network administrator. A case of saving Hyper-V god attorney
One fine day, Hyper-v system on 2012R2 platform was running deliciously, suddenly there was a power outage that was not enough to provide horizontal server shutdown, booting up but the Hyper-V error failed.
Consequently, after the power is restored, all other related services cannot run, including the most important Hyper-V service: (. Open, the error cannot run the VM
Experience sharing when the error is related should read the windows event log and find the correct error code for the new root case to handle quickly.
In the same way, the horizontal outage causes the server to corrupt the file with the entire error VMI repository. The WMI namespace ‘root \ virtualization \ v2’ is not registered in the CIM repository
So what is VMI, it’s important that the error is always hyper-v
Windows Management Instrumentation (WMI) ?
Windows Management Instrumentation (WMI) is a set of specifications from Microsoft for consolidating the management of devices and applications in a network from Windows computing systems. WMI provides users with information about the status of local or remote computer systems. It also supports such actions as the configuration of security settings, setting and changing system properties, setting and changing permissions for authorized users and user groups, assigning and changing drive labels, scheduling processes to run at specific times, backing up the object repository, and enabling or disabling error logging.
WMI was the Microsoft implementation of Web Based Enterprise Management (WBEM), which is built on the Common Information Model (CIM), a computer industry standard for defining device and application characteristics so that system administrators and management programs can control devices and applications from multiple manufacturers or sources in the same way.
So the error VMI means that all the events of the system setting information are also error, as you see the file corrupted.rec.
So, have identified the root case, trying to rebuild the VMI Repository is ok.
Case 1: check resync and repair
winmgmt /verifyrepository If the repository is not corrupted, a “WMI Repository is consistent”
Case 2: Not at all
- Disable and stop the winmgmt service
- Remove or rename C:\Windows\System32\wbem\repository
- Enable and start the winmgmt service
- Open Command Prompt as Administrator
- Run the following commands:
cd C:\Windows\System32\wbem\ for /f %s in ('dir /b *.mof') do mofcomp %s NOTE: This will take a minute or so to complete. for /f %s in ('dir /b en-us\*.mfl') do mofcomp en-us\%s
- Reboot and re-cretae WMI repository
I’m so glad that the Hyper-V bug has been resolved, and it’s gone 🙂
Good luck to you