Hyper-V (2016) has VM's running I cannot see - how to discover if more?
We did something silly, and "the client insisted" and "we got bad advice" is no excuse, but I could use help cleaning up. Background:
We added a new 2019 Hyper-V server to a group of four existing 2016 servers that replicate all around the network (no clusters or shared storage involved). The (bad) plan was that so long as we created the VM's on 2016, and did not upgrade from their configuration version 8, we could replicate back and forth without issue.
What actually happened is that it appears to have corrupted the 2016 servers' data.vmcx file (and maybe others in the convoluted structures Hyper-V keeps to track machines). On the 2016 servers VM's would disappear if the Hypervisor restarted. Trying to replicate to them again gave an "already exists" error though you could not see them. It seemed to be only Config 8 machines, we had some 5's that did not appear to do this. Or maybe it was Gen 2 vs Gen 1, not sure what triggered the issue.
We ended up upgrading 2 of the 2016 servers to 2019 in emergency mode and a new server is on order, and the other two 2016 (too old to run 2019) are going away shortly but hold some in-progress work.
HOWEVER... we discovered today (through a duplicate IP) that at least one VM on one 2016 server is up and running, but invisible. It does not show in the Hyper-V manager nor in Powershell's GET-VM. I am fairly sure it survived a reboot (but cannot test that theory right now).
It is going to be a day or so before I can power down the last 2016 server and make it go away.
My question is this: Is there any way (that is not GET-VM or Hyper-V manager) to see what VM's are running on a Hyper-V 2016 server? And kill them?
Or a 2019 server for that matter.... I think we cleared all the garbage out in the scramble to upgrade them (removed HyperV role, deleted the entire folder under program data for HyperV, re-installed Hyper-V role), but it would be nice to confirm that only the ones shown are out there running.
Is there a process I can look for, some file or registry entry for running servers?
How to I see running VM's, without either Hyper-V manager or Get-VM?
And yes, the real solution was "do not do that". I get that. But having "done that" any ideas how to see what is really running?
In Task Manager on your Hyper-V hosts there will be a vmwp.exe process (Virtual Machine Worker Process) running for each virtual machine. Killing those processes will shut down the corresponding virtual machines.