IT Share NVP -ViettechgroupVN-Phuong Nguyen blog Viettechgroup.vn | Share make us stronger Knowledge is Sharing Viettechgroup- Sharing Make Us Stronger-Kiến thức CNTT là sự chia sẻ- NVP-Chia sẻ làm chúng ta mạnh hơn-Viettechgroup.vn Viettechgroup.com.vn| ITShareNVP Channel | Phương Nguyễn | Phuong Nguyen Blog| Lưu trữ kiến thức chia sẽ kinh nghiệm CNTT | Phương Nguyễn

How to Hyper-V unable to connect WMI namespace root\cimv2 to localhost

0 2,973

This is a practical experience the admin will share with you to be the network administrator. A case of saving Hyper-V god attorney

Symptoms

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.

Problem affects

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

This image has an empty alt attribute; its file name is image.png

Cause

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.

Check eventlog


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

This image has an empty alt attribute; its file name is image-2-1024x815.png

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.

SOLUTION

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” 

Check repair

winmgmt /salvagerepository

reset

winmgmt /resetrepository


Case 2: Not at all

  1. Disable and stop the winmgmt service
  2. Remove or rename C:\Windows\System32\wbem\repository
  3. Enable and start the winmgmt service
  4. Open Command Prompt as Administrator
  5. 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
  1. Reboot and re-cretae WMI repository


Result

I’m so glad that the Hyper-V bug has been resolved, and it’s gone 🙂

Good luck to you

Phương nguyễn

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. AcceptRead More