Hyper-V virtual machines do not start after using Startup Repair
Over the weekend, I attempted to reconfigure some of the drives in my Hyper-V server at home. Note that I said “attempted”. I ran into hardware issues and ended up having to revert back to my old configuration - but somehow in all of this – I broke my system disk.
Specifically it would not boot any more.
This did not phase me because I knew that the excellent startup repair tool in Windows would soon have me up and running – which it did.
But I was surprised to find that when my system did finally boot – none of my virtual machines started up. When I tried to start the virtual machines manually, I was informed that the hypervisor was not running.
After scratching my head for a moment, I realized what had happened. Startup repair had rebuilt my boot configuration data store to get my system up and running. But it did not know that Hyper-V needs to have some specific settings enabled in the boot configuration data store in order to start the hypervisor.
I quickly opened an administrative command prompt and ran the following command:
bcdedit /set hypervisorlaunchtype auto
After that I rebooted the system and successfully started my virtual machines.
Cheers,
Ben
Comments
Anonymous
January 19, 2010
The comment has been removedAnonymous
January 22, 2010
If the system doen's boot anymore, how can you launch the Startup Repair Tool? ThanksAnonymous
January 23, 2010
About boot configuration data store, i use this scripts
creating a new VHD boot entry
-------------------------------------------------------
$description = 'Windows 7 from VHD' $vhd_path = 'vhdswin7entx64.vhd'
-------------------------------------------------------
bcdedit.exe /export ".bcd_backup.bcd" $res = bcdedit.exe /copy '{current}' /d $description $id = $res.Split('{}')[1] bcdedit.exe /set "{$id}" device vhd=[locate]$vhd_path bcdedit.exe /set "{$id}" osdevice vhd=[locate]$vhd_path bcdedit.exe /set "{$id}" detecthal on "{$id} entry created!" bcdedit | out-file .newentry_log.txt
creating a new Boot Entry
-------------------------------------------------------
$description = 'Windows Server 2008 R2'
-------------------------------------------------------
bcdedit.exe /export ".bcd_backup.bcd" $res = bcdedit.exe /copy '{current}' /d $description $id = $res.Split('{}')[1] bcdedit.exe /set "{$id}" device partition=E: bcdedit.exe /set "{$id}" osdevice partition=E: bcdedit.exe /set "{$id}" hypervisorlaunchtype auto "{$id} entry created!" bcdedit | out-file .newentry_log.txt Cheers, Luciano
Anonymous
January 24, 2010
jim Philips - You can run the startup repair tool off of an install DVD - which is what I did in this case. Cheers, BenAnonymous
January 25, 2010
Hi Ben, I see that hyper-V is supported with sysprep. You have to recreate the bcd entry when you apply the image but i want to know if the Mac address pool is regenerated ?Anonymous
January 28, 2010
Very informative info since I'm new with Hyper-V virtual machines..Anonymous
January 18, 2011
so simple solution yet so hidden.. u are the guy!!! cheers!! i now love you! Lol i was about to call DELL and bash them for selling me a bad laptop!Anonymous
February 11, 2011
You sir are a genius... been trying to find something "on the google" about this issue for the better part of 4 hours. I lost our BCD store after a raid controller failure. After finally getting up and running after using the r2/win7 boot up repair I found that none of my VM's would spin up (I was only running a test machine and that pesky BES 5.0 on a little app instance). Thanks again!Anonymous
May 21, 2011
Thanks a lot. You saved my life. I had exactly the same issue. Now its working again.Anonymous
August 16, 2011
I had that problem too and it fixed it... THANKSAnonymous
March 10, 2012
Hi Ben, I added disks array to one of my Hyper-V, and run in the same issue (as HDD boot order has changed in the BIOS). After a Startup Repair, same issue than yours: an EventID: 3112. Your tip saved me. Thanks. For everybody, a repaired boot entry in BCD has its description field ending with " (recovered)". So, if you have the issue and a "bcedit /enum" shows this addition in description, Ben's tip will make the job. Thanks.Anonymous
June 08, 2012
Thank you, bcdedit helped me to get my vm's starting again after i had to recover my hyper-v host.Anonymous
October 16, 2012
Thanks, this really saved me a compleate reinstall and configuration of Server 08 R2.Anonymous
January 15, 2013
Thanks, I got the same issue but with Windows 8 and it's integrated Hyper-V.Anonymous
February 10, 2013
The comment has been removedAnonymous
February 13, 2013
I absolutely positively love you. Thank you so much - I had an identical problem and this was my solution. You're fantastic!!Anonymous
September 05, 2013
Thanks. Same issue occurred to me :-)Anonymous
January 14, 2014
Thank You ! What a timesaver. Very useful information.Anonymous
March 12, 2014
Many thanks !!! we spend a lot of time to fix this error. MS support indicates problems inside of bios. That was a bad advice. With BCDEDIT it was a 1 minute solution ... IT works !!!Anonymous
August 18, 2014
For me it was: bcdedit /set {default} hypervisorlaunchtype autoAnonymous
March 13, 2015
Thank you for the information, saved me in a similar situation.Anonymous
June 16, 2015
Still works on Server 2012 r2 Migrated server OS to SSD and then had to use Startup Repair to get it going but couldn't get Hyper-V working until I used this. Thanks!Anonymous
June 19, 2015
Had the same problem after using the Samsung SSD migration tool. Thanks!Anonymous
November 04, 2015
Thank you.Anonymous
December 10, 2015
Hi, Is it possible to do a dual boot on a VM? if so does the process stay the same?Anonymous
March 02, 2016
Bump!Still relevant. Especially when recovery after a raid controller takes physical drives out and the OS is restored at block level.#Update raid controller#update Perc/iDrac#back up recovery of volumes/hyper-visor fails afterMarkAnonymous
June 20, 2017
The comment has been removed