Hyper-V virtual machines do not start after using Startup Repair

Hyper-V virtual machines do not start after using Startup Repair

  • Comments 20

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

Leave a Comment
  • Please add 7 and 5 and type the answer here:
  • Post
  • good to know.  i'll file this in my head.  thanks

  • If the system doen's boot anymore, how can you launch the Startup Repair Tool?

    Thanks

  • About boot configuration data store, i use this scripts

    # creating a new VHD boot entry

    # -------------------------------------------------------

    $description = 'Windows 7 from VHD'

    $vhd_path = 'vhds\win7entx64.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

  • jim Philips -

    You can run the startup repair tool off of an install DVD - which is what I did in this case.

    Cheers,

    Ben

  • 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 ?

  • Very informative info since I'm new with Hyper-V virtual machines..

  • 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!

  • 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!

  • Thanks a lot. You saved my life. I had exactly the same issue. Now its working again.

  • I had that problem too and it fixed it... THANKS

  • 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.

  • Thank you, bcdedit helped me to get my vm's starting again after i had to recover my hyper-v host.

  • Thanks, this really saved me a compleate reinstall and configuration of Server 08 R2.

  • Thanks, I got the same issue but with Windows 8 and it's integrated Hyper-V.

  • Just had the exact same problem after flashing bios on a server which did something funny with the raid config and required a bootrec /fixmbr to get back into windows.

    I'd been assuming that the BIOS flash was having compatability issues with VT'd, until I realised that the BCD was wiped!

    Thanks

Page 1 of 2 (20 items) 12