We help IT Professionals succeed at work.

Hyper-V host services stop after a few minutes

I am working at a small school district, and their domain controller (Server2012R2) also hosts 2 Hyper V machines. I dont know if this is relevant, but recently there was an unplanned shut down.

The issue is when attempting to start any of the virtual machines, an error pops up stating: Windows could not start the Hyper-VRemote Desktop Virtualization Service service on Local computer
Error 126: The specified module could not be found.

The interesting part is, you can remove the Hyper-V feature from the server, then reinstall it, and the virtual machines will boot, and run fine, until they are rebooted or shut down, as long as you start them quickly after reinstallation of Hyper-V.  If you wait as long as 5 minutes or so, it is already broken again.
The Hyper-V services are all off, when it is not working, and you cannot turn them back on.
Any suggestions will be appreciated.
Comment
Watch Question

Philip ElderTechnical Architect - HA/Compute/Storage
CERTIFIED EXPERT

Commented:
A domain controller should _not_ have the Hyper-V Role enabled. Period.
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
There may be some useful stuff in the event logs but as Phillip says the host should just be the host and not run any other roles. You're probably breaking the license agreement as standard covers two VMs or the real server but you have both.

Author

Commented:
Thanks guys.
David Johnson, CDSimple Geek from the '70s
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
Hyper-VRemote Desktop Virtualization Service

This leads me to want to investigate the remote desktop services role as Remote Destkop Virtualization Service is a RDS function. 
Philip ElderTechnical Architect - HA/Compute/Storage
CERTIFIED EXPERT

Commented:
Is there two partitions on the host?

If this was a standalone Hyper-V host without the other Roles you would be able to re-install, configure Hyper-V, and import the VMs and be up and running in about 30-45 minutes.

The DC Role with the Hyper-V Role breaks things. Plus, it kills the ability to recover simply from a problem at the host level.

Author

Commented:
Mr. Phillip,
I am able to remove & reinstall now, and fix only works for 5 minutes or so. I am not understanding the separate partition fix. Please elaborate.
CERTIFIED EXPERT
Distinguished Expert 2019
Commented:
Standard practice when installing just about anything is to have the OS (or hypervisor in this case) on a separate partition or logical disk to the data, then you would have to be able to do a fresh Windows/host install and reattach the VMs.

Best thing to do in your situation is probably install another DC temporarily if they only have one, stop the VMs and export them if you can else copy the VHDxs to somewhere else, demote this DC and remove it from AD and then reinstall Windows plus Hyper-V. import the VMs and create another one the temporary DC you made earlier. This may require a new license for the 3rd VM but you need another license anyway since the server just running Hyper-V doesn't need a license but one with the DC role as well does.
Philip ElderTechnical Architect - HA/Compute/Storage
CERTIFIED EXPERT

Commented:
@andyalder gives the best route to take. Set up a temporary Hyper-V in say a desktop, install Windows Server, set up and DCPromo, then DCPromo the current Hyper-V host DC out, workgroup it, and finally re-install the host OS, configure the Hyper-V Role, and import the existing VMs.

You can then set up another VM, DCPromo it, transfer the FSMO Roles, and DCPromo the temp DC out.

Author

Commented:
Thanks for the help