An error occurred while attempting to connect to server “[computername]”. Check that the Virtual Machine Management service is running and that you are authorized to connect to the server. Hyper-V encountered an error trying to access an object on Computer ‘[computername]’ because the object was not found. The object might have been deleted. Verify that the Virtual Machine Management service on the computer is running.Recently I had occasion to work on my first Server 2016 machine, and after installing the required roles and features, I ran into a head-scratching issue – when trying to use the Hyper-V Manager, I received a fatal warning that the virtual machine management service was not running, as seen in the picture to the right. I thought perhaps the server required a reboot after some recent Windows Updates, at least one of which involved changes to Hyper-V, but found the problem continuing afterward.

After opening the services manager with services.msc, I found that the Hyper-V management service was indeed running, and set to Automatic, meaning it would start automatically on server boot. Double-checking Hyper-V just to make sure, the error popped up again. I did some searching and discovered someone who ran into the same problem and found how to resolve it without uninstalling and reinstalling the Hyper-V tools, which was my first thought.

By running the following in an Administrator Command Prompt, I was able to correct the issue – it corrected the Hyper-V WMI registration and allowed the management console to start without error. Thus, I could continue my work. A big thank you to Norman Bauer who provided the solution and gave me the following command.

MOFCOMP %SYSTEMROOT%\System32\WindowsVirtualization.V2.mof

Hyper-V, let alone Server 2016, is a very complicated piece of software, but after dealing with an Exchange migration all weekend, it was nice to get back to the “basics” (for modern usage of the term) of spinning up VMs to provide additional services to the network.

Obviously the above command won’t fix every issue with Hyper-V, but it did a great job of getting me back into the management console in order to take control of or change existing virtual machines.