Any Hyper-V 2012/2012 R2 experts?

IndyColtsFan

Lifer
Sep 22, 2007
33,655
687
126
Question for any Hyper-V 2012 experts out there. Last night, I had a major power outage and my UPS killed my server during the backup. I had about 40 VMs listed in Hyper V manager but after powering the box back up, I only see 2 VMs. If I perform a Get-VM in powershell, I see all of the VMs -- some of the "invisible" VMs are running and providing their services to my network as intended.

I'm just not sure how to "add them back" to Hyper V manager. If I try to import one of the powered off VMs, it says that the "Object is in use" and won't let me. Any ideas on how I can re-add them to Hyper-V manager? FWIW, I restored one of the non-critical machines from Wednesday night's backup and it registered in Hyper V manager OK.
 

imagoon

Diamond Member
Feb 19, 2003
5,199
0
0
Are all of the hosts showing up in the manager?

Does:

Net stop “Hyper-V Virtual Machine Management”
Net start “Hyper-V Virtual Machine Management”

Do anything?
 
Last edited:

IndyColtsFan

Lifer
Sep 22, 2007
33,655
687
126
No, I tried stopping and restarting the service and rebooting. No change.

Here is what I am going to do:

1. Restore the critical VMs (my customer VMs) from backups if they are currently having issues. One customer VM will not let me connect to their VPN and since another copy of the same VM works fine on my workstation, I know there has to be corruption.
2. I'll copy off the files, remove the VMs from Hyper-V management via Powershell, and then copy the files back and re-add the VMs.

I was just hoping to avoid all that work and that there was an easier way. :) I don't have backups of ALL VMs but I do have backups of all critical ones. Hopefully the ones I don't have backups of aren't corrupted (since most were not running) and therefore I can just remove/re-add using Powershell.
 

IndyColtsFan

Lifer
Sep 22, 2007
33,655
687
126
Well, at this stage, I am not sure what to do. I added several of the servers back to the Hyper-V Manager and after a reboot, they disappeared. Only the top two VMs remain. The others are running and accessible according to Get-VM, but I can't see them in Hyper-V Manager. This is extremely frustrating.

EDIT: I downloaded the free version of 5nine Manager for Hyper-V and it shows all the VMs fine....
 
Last edited:

imagoon

Diamond Member
Feb 19, 2003
5,199
0
0
Well, at this stage, I am not sure what to do. I added several of the servers back to the Hyper-V Manager and after a reboot, they disappeared. Only the top two VMs remain. The others are running and accessible according to Get-VM, but I can't see them in Hyper-V Manager. This is extremely frustrating.

EDIT: I downloaded the free version of 5nine Manager for Hyper-V and it shows all the VMs fine....

What is in "C:\ProgramData\Microsoft\Windows\Hyper-V\Virtual Machines\"? If I remember correctly there should be symbolic links to the VM xml on the server. If one of the links is corrupted it causes the scan to fail.
 

IndyColtsFan

Lifer
Sep 22, 2007
33,655
687
126
What is in "C:\ProgramData\Microsoft\Windows\Hyper-V\Virtual Machines\"? If I remember correctly there should be symbolic links to the VM xml on the server. If one of the links is corrupted it causes the scan to fail.

I found the issue. :D

I have about 40 VMs in my Hyper-V environment. No matter what I did, only the top 2 were showing in Hyper-V manager after a reboot (or, I assume, after the Hyper-V management service restarted). I was tearing my hair out and then I remember that when I looked at the Get-VM output, the third VM in the list was in "OffCritical" status. I also believe I remember seeing something in one of the many logs I poured over which indicated it had corruption issues. So, I did a Remove-VM on that VM and sure enough, the rest of the VMs populated into Hyper V Manager. I did a reboot (was having a separate issue) and they're still there!

Hyper-V must enumerate the VMs in alphabetical order or something and the enumeration service must have crashed or choked whenever it hit that third VM. So I think my critical VMs are all OK, now I just need to check through some of my SharePoint environments to see if I need to rebuild them.
 

child of wonder

Diamond Member
Aug 31, 2006
8,307
176
106
Hyper-V is great but it is so picky. I remember back in the VMware 1.X and 2.X days it, too, was picky and particular and would have weird issues like this. Hyper-V is the same way but even worse.
 

heymrdj

Diamond Member
May 28, 2007
3,999
63
91
Hyper-V is great but it is so picky. I remember back in the VMware 1.X and 2.X days it, too, was picky and particular and would have weird issues like this. Hyper-V is the same way but even worse.

You apparently haven't done an upgrade on a esxi 4.1 to 5.0 on an old environment (one that's been upgraded through the ages). You want to talk about a fustercluck.
 

child of wonder

Diamond Member
Aug 31, 2006
8,307
176
106
You apparently haven't done an upgrade on a esxi 4.1 to 5.0 on an old environment (one that's been upgraded through the ages). You want to talk about a fustercluck.

Oh yes I have. I've been a consultant for the last 5 years working with many, many client environments. Seen some things man.......
 

IndyColtsFan

Lifer
Sep 22, 2007
33,655
687
126
So far, so good on my VMs. Restoring a couple from backup that appear corrupted and hopefully that will be the end of it. I still have no clue WHY the UPS killed power to the outlets -- all the UPS power off delays were set to a minimum of 10 minutes and from the logs on my Hyper-V host, the VM shutdown scripts had been triggered and they were in the process of shutting down when the power was killed at about 6 minutes. Grrrrrr.
 

drebo

Diamond Member
Feb 24, 2006
7,034
1
81
You apparently haven't done an upgrade on a esxi 4.1 to 5.0 on an old environment (one that's been upgraded through the ages). You want to talk about a fustercluck.

I just did a 24 host upgrade from 4.1 (had been upgraded from 3.0) to 5.5 and didn't have a single problem. We completed the project in under a day.

99% of the problems in VMWare are due to improper setup and configuration issues. Fix all that before you try to upgrade and you won't have any problems.
 

imagoon

Diamond Member
Feb 19, 2003
5,199
0
0
You apparently haven't done an upgrade on a esxi 4.1 to 5.0 on an old environment (one that's been upgraded through the ages). You want to talk about a fustercluck.

Have done several and it when off without a treat.
 

heymrdj

Diamond Member
May 28, 2007
3,999
63
91
I just did a 24 host upgrade from 4.1 (had been upgraded from 3.0) to 5.5 and didn't have a single problem. We completed the project in under a day.

99% of the problems in VMWare are due to improper setup and configuration issues. Fix all that before you try to upgrade and you won't have any problems.

And an old configuration from the past was their issue. Just as you all have had a swimmingly good time with VMware, I have not had a single "picky" issue with Hyper-V, and I've done a hell of a lot of Hyper-V deployments. As long as guidelines are followed, it's extremely easy to setup. Most failover clusters are done in 15 minutes or so, a majority of that being the wait time for the failover cluster validator to finish.