Can't boot computer after enabling Client Hyper-V

19,471

Solution 1

Did you ever sort this out? I just ran into the issue while trying to run Docker in Windows 10 x64.

It's definitely being caused by Hyper-V, but I haven't discovered exactly why or how to fix it yet. What I have found though in the meantime to still be able to boot into Windows (not just Safe Mode, and obviously without Hyper-V being usable once booted) is to toggle off Hyper-V via your BCD file.

You have to be able to get to a command-line though. What I've been doing is wait for startup repair to fail, then boot into Safe Mode. From there I open up an elevated (Admin) Command-line and type this:

BCDedit /set hypervisorlaunchtype Off

Then reboot.

If you have more than 1 item in your BCD you might need to specify which item to turn hypervisor off on. You can view all BCD items just by typing:

BCDedit

And to specify the item to alter, just add in its ID:

BCDedit /set {<long string of numbers here>} hypervisorlaunchtype Off

NOTE: When installing Hyper-V, it apparently automatically sets that flag to "Auto" (on) in your BCD, which causes the BSOD/Boot Repair Loop. Once you get the problem sorted out, you'll need to set that flag back to "Auto" to use Hyper-V again. I always make 2 boot choices in my BCD; one with Hyper-V enabled, one with it disabled. Then I select the one I want as needed.

Solution 2

Try to restore Windows to its state before, with this procedure.

  1. Boot into recovery mode or try to boot three times to trigger automatic repair
  2. Click on Advanced Startup
  3. Click on Troubleshoot
  4. Click on Advanced options
  5. Click on System Restore
  6. Click Next
  7. Select the most recent known working restore point
  8. (Optional) Click the Scan for affected programs button to see the applications that will be removed if they're installed after the restore point was created
  9. Click Close
  10. Click Next
  11. Click Finish
  12. Reboot.

image

Solution 3

This worked for me once I was able to get back into Windows:

  1. Open "Window Security"

  2. Open "App & Browser control"

  3. Click "Exploit protection settings" at the bottom

  4. Switch to "Program settings" tab

  5. Locate "vmcompute.exe" in the list and expand it

  6. Click "Edit"

  7. Scroll down to "Code flow guard (CFG)" and uncheck "Override system settings"

  8. Reboot

Solution 4

The cause of this problem is that Windows 10 does not add the "hypervisorlaunchtype auto" entry to the BCD file when Hyper-V is switched on. That is why it will not boot. The moral of the story is: add this entry to BCDEdit BEFORE switching on Hyper-V. If you haven't (and I hadn't!) you have an unbootable Windows. The workaround is to boot up with a WinPE bootable CD (you have made one and tested it, I hope), then use Diskpart to navigate to the disk and relevant partition (the EFI partition), select this partition, assign it a letter (suppose it was J:), exit, then run BCDEdit and point it to the BCD file J:\EFI\Microsoft\boot\BCD in order to add the missing entry. The command would be

bcdedit /store J:\EFI\Microsoft\boot\BCD /set {default} hypervisorlaunchtype auto The response should be "successful". Then reboot your system. You can then use BCDEdit online in a command prompt (bcdedit /enum) to list the file; the {default} system entry should now carry the parameter hypervisorlaunchtype auto. That's it. Now Microsoft - fix this please in Windows 10!

Solution 5

It's actually worse than that. IN Win 10 1909, even if the BCD entry is AUTO and Hyper-V is ON, system will fail to boot. The only reliable way to run Win 10 1909 is to leave Hyper-V OFF and have no entry in BCD, or the entry "hypervisorlaunchtype Off" (it may be deleted anyway).

Share:
19,471

Related videos on Youtube

mas
Author by

mas

Updated on September 18, 2022

Comments

  • mas
    mas over 1 year

    I have a CyberPowerPC with an Intel chip that supports virtualization. I noticed that VirtualBox is somewhat sluggish with GUI virtual machines so I decided to enable Client Hyper-V to see if that worked better. I followed the powershell instructions here. After reboot my computer wouldn't get past the three dot wheel before going to a black screen and rebooting.

    I subsequently found a recovery boot screen that allowed me to boot into safe mode. I used safe mode's power shell to disable Client Hyper-V. Upon restart the system went back to normal mode without my re-enabling it (I guess that's default behavior?) and still wouldn't boot.

    I checked to make sure virtualization was enabled in UEFI and it was. I tried disabling it. Still no good.

    After attempting to get back into Safe Mode the computer went straight to a Restart Screen and now I'm back in normal mode.

    Please Help. I don't even know how to consistently get into safe mode. I can't even reach a login screen unless it's in safe mode and I don't know how to consistently reach safe mode. My boss is in the other room and doesn't' know about the trouble I'm having. My stomach is in my throat. Panic

    Right now I'm in safe mode attempting a data backup.

    UPDATE: More data: Processor Intel Core i7-3820 @3.60 GHZ, 16 GB Ram, 64-bit Windows 10 Pro

    Problem: Enabled Client Hyper-V via PowerShell and rebooted when prompted. Boot process reaches dot circle loading screen before cutting to black and auto-rebooting in reboot loop.

    Troubleshooting Steps taken: 1) Booted into safe mode, disabled Client Hyper-V via PowerShell. Rebooted when prompted. Booted into normal mode. Result: Still see dot circle loading screen cut to black auto-reboot loop.

    2) Disabled virtualization in UEFI. Result: Same

    3) Re-enabled virtualization in UEFI. Result: Same

    4) Booted into safe mode to backup all data. Hyper-V appears unchecked in 'Turn Windows Features on/off' menu.

    UPDATE2: I noticed in msconfig.exe that there are several services labeled Hyper-V. I unchecked all of them and performed a normal boot. Result: same.

  • mas
    mas almost 6 years
    Just initiated system restore on a point from this morning that said Windows-Module-Install (or thereabouts) which implies to me a restore point created just before I installed Hyper-V. If that one doesn't work, can I still try it on the previous one, from yesterday morning, which says Critical System Update?
  • mas
    mas almost 6 years
    System restore point failed to correct the problem. Will try other restore point now. If it also fails to correct the problem, does that point to a hardware problem? Is it possible that the attempt to enable hyper-v fried something?
  • harrymc
    harrymc almost 6 years
    Everything is possible with computer "science". If nothing works, you will need to do Startup Repair.
  • mas
    mas almost 6 years
    Second system restore to the point created yesterday also failed to correct the problem. Startup repair says "Startup Repair couldn't repair your PC." it says there's a logfile. Going to boot into safe mode to check it. Wait. Crap. I forgot to write down it's location.
  • mas
    mas almost 6 years
    Would you have any advice about where to look in the logs to find the issue? I see a ton of errors for today under System log from DistributedCOM error: "DCOM got error "1084 attempting to start the service CarboniteService". Like literally thousands of them, probably 20 a second.
  • harrymc
    harrymc almost 6 years
    Do you have installed Carbonite Backup? If yes, try to uninstall it.
  • mas
    mas almost 6 years
    Yes I have Carbonite Backup installed. You think that might be the problem? Some kind of collision between hyper-v and carbonite that persists after hyper-v was redisabled? Will attempt uninstall
  • mas
    mas over 5 years
    No, I never solved it and simply reinstalled windows. I can therefore not check your answer, but it sounds good and it's the only one so I'll just accept yours. ;-)
  • Rado
    Rado over 5 years
    Thanks! I had the same issue and your solution works perfectly. I initially tried disabling hyper-v in safe mode, but that made it worse as the feature could not be uninstalled since windows couldn't boot doh!
  • G-Man Says 'Reinstate Monica'
    G-Man Says 'Reinstate Monica' about 4 years
    (1) What is not the whole answer?  (2) How does one set the BCD hypervisorlaunchtype entry to OFF? … … … … … … … … … … … … … Please do not respond in comments; edit your answer to make it clearer and more complete.
  • Dhaval Pankhaniya
    Dhaval Pankhaniya about 4 years
    Hello, i am trying your command BCDedit /set hypervisorlaunchtype Off and after that i check with bcdedit it is still remains auto, any ideas ?
  • J. Scott Elblein
    J. Scott Elblein about 4 years
    @dhaval not really sure, I've never encountered that problem before. The best i can suggest is to be sure that you're running the command as administrator, and also confirm that you're both running the command and checking later against the exact item.
  • Dhaval Pankhaniya
    Dhaval Pankhaniya about 4 years
    @J.ScottElblein thank you for your answer, yes i was running command prompt as a administrator but still can't figured it out and later i found one youtube video : youtu.be/Pt6H-mqF02g that helped !!
  • THEMike
    THEMike almost 4 years
    I had to do bcdedit /set {default} hypervisorlaunchtype Off to get it to stick, just off didn't change it. I've not managed to solve the fail to boot issue. Maybe it's faulty bios/mobo/cpu causing the issue :(
  • bkunzi01
    bkunzi01 almost 4 years
    It's not faulty hardware. Happens on my old desktop and brand new desktop. For some reason I get this issue when enabling "Hyper-V" or "Virtual Machine Platform"...
  • bkunzi01
    bkunzi01 almost 4 years
    Finally fixed this after a week of attempts. Enable the features (I need Virtual Machine Platform but this worked for Hyper-V and Hypervisor as well). Then restart your computer and go through the failed reboot cycle 3 times until it brings up Disk Repair. Go to the Troubleshoot option and choose "debugging mode" in "Advanced Startup". Then it will finish the update and proceed as normal...
  • Daniel C. Sobral
    Daniel C. Sobral over 2 years
    The bizarre thing is that I listed the properties and it said it was on auto. I set it to off to be able to boot again. Then I set it to auto to try to debug the issue and it worked. Mind boggling.