142

I'm trying to open VMware, it says that VMware player and Hyper-V are not compatible. I found it here, but it's not working using the command it offers.

I tried to see the help, found that there's /hypervisorsettings option there. But still not work with it, it says The parameter is incorrect.

Can anyone help with this?

ItamarG3
  • 3,974
  • 6
  • 29
  • 42
Sky
  • 6,581
  • 8
  • 28
  • 40
  • 5
    I found a working way here: `dism.exe /Online /Disable-Feature:Microsoft-Hyper-V` and `dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All`, but still don't know how `bcdedit` works. – Sky May 28 '15 at 03:46
  • this link (https://pswalia2u.medium.com/fully-disable-hyper-v-to-turn-back-to-vmware-virtualbox-159812bee71a) worked for me. For enterprise users, this solution will trigger BitLocker during restart, be aware! – Felix Xu Feb 24 '21 at 06:24

11 Answers11

329

In an elevated Command Prompt write this :

To disable:

bcdedit /set hypervisorlaunchtype off

To enable:

bcdedit /set hypervisorlaunchtype auto 

(From comments - restart to take effect)

Dan Nissenbaum
  • 12,916
  • 20
  • 105
  • 175
LukeSkCzEnDeRuPl
  • 3,306
  • 1
  • 11
  • 3
  • I even forgot this question. I used this actually back then, but it didn't work. Anyway, it works now. Thanks. – Sky Mar 07 '16 at 01:10
  • 5
    In case you don't specifically need a command line solution but rather just something really simple and quick, you might use my tool [Hyper-V Switch](https://github.com/dg9ngf/HyperVSwitch) that uses the bcdedit method internally and puts a one-click GUI over it. Works on my Windows 10 computer. – ygoe Apr 25 '16 at 18:20
  • 2
    Make sure you restart the computer after changing this setting – justderb Apr 08 '17 at 03:09
  • 4
    @LukeSkCzEnDeRuPl You should probably edit your answer and mention that you have to reboot after the command. – ChrisB May 01 '17 at 08:39
  • 1
    I just went ahead and edited the answer by adding a sentence at the end mentioning that a restart is necessary. – Dan Nissenbaum Aug 22 '17 at 05:43
  • Worked fine on Windows 10 1607 – Quanlong Dec 06 '17 at 05:58
  • Worked on Win 10 (1803), though i had to reboot twice somehow. – Alexander Kim Sep 29 '18 at 06:52
  • For me that did not work even after also uninstalling Hyper-V in windows features. I also had to uninstall Internet Explorer 11 in windows features. – Dennis Aug 15 '19 at 09:57
  • auto does not make much. You must activate sandbox to make android work for example, WSA. – Валерий Заподовников Mar 26 '22 at 20:06
44

You can have a Windows 10 configuration with and without Hyper-V as follows in an Admin prompt:

bcdedit /copy {current} /d "Windows 10 no Hyper-V"

find the new id of the just created "Windows 10 no Hyper-V" bootentry, eg. {094a0b01-3350-11e7-99e1-bc5ec82bc470}

bcdedit /set {094a0b01-3350-11e7-99e1-bc5ec82bc470} hypervisorlaunchtype Off

After rebooting you can choose between Windows 10 with and without Hyper-V at startup

hfmanson
  • 1,346
  • 13
  • 19
31

This command works

Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All

Run it then agree to restart the computer when prompted.

I ran it in elevated permissions PowerShell on Windows 10, but it should also work on Win 8 or 7.

DivineOps
  • 1,596
  • 14
  • 16
  • 3
    Is there any way to achieve this without a reboot? – rustyx Mar 07 '17 at 13:52
  • And what about re-enabling Hyper-V again via cmd? Thank you! – statosdotcom Mar 07 '17 at 16:36
  • 6
    This command fully removes HyperV feature with it's files and programs. The bcdedit command is best to disable it and run VirtualBox or VMware instead of it. –  Aug 11 '17 at 08:01
  • My Hyper-V installation decided to give up on me for no reason (i’m running Windows 10 Pro v1703 build 15063.786). I’ve tried to (un/re)install it via Windows Features menu, Powershell and DISM. They all gave no error but as soon as i try to create/add a new VM, and want to finish the last step, Hyper-V throws an error that it couldn’t open/access something because an object doesn’t appear to exist (dutch screenshot): https://i.imgur.com/07hem57.png Same story when running it with elevated/admin privileges. Apparently its not possible to fully restore/repair the Hyper-V product/modules... – script'n'code Dec 25 '17 at 21:32
19

Command line:

dism /online /disable-feature /featurename:microsoft-hyper-v-all

If anyone is getting:

We couldn’t complete the updates, Undoing changes

after trying to disable the Hyper-V, try uninstalling Hyper-V virtual network adapters from your Device Manager->Network Adapters

Ignas Vyšnia
  • 1,999
  • 1
  • 15
  • 16
5

Open a command prompt as admin and run this command:

bcdedit /set {current} hypervisorlaunchtype off

After a reboot, Hyper-V is still installed but the Hypervisor is no longer running. Now you can use VMware without any issues.

If you need Hyper-V again, open a command prompt as admin and run this command:

bcdedit /set {current} hypervisorlaunchtype auto
Iasmini Gomes
  • 605
  • 1
  • 8
  • 12
3

The OP had the best answer for me and it appears that others have figured out the -All addition as well. I set up two batch files, then shortcuts to those so you can set the Run As Admin permissions on them, easy-peasy.

Batch Off

Call dism.exe /Online /Disable-Feature:Microsoft-Hyper-V-All

Batch On

Call dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All

Right-click -> create desktop shortcut. Right-click the shortcut -> properties -> under the shortcut tab -> Advanced -> Run as admin

2

Open command prompt as admin and write :

bcdedit /set hypervisorlaunchtype off
Mickael B.
  • 4,186
  • 3
  • 20
  • 39
1

This is not a direct answer to the OP's question, but if you have tried all the commands and Hyper-V shows as disabled, BUT still unable to start a virtualisation software like VirtualBox or VMWare and just so it happened that you had enabled WSL2 on your machine

Following solution might will work for you.

Go to Control Panel > Programs & Features > Turn Windows Feature On/OFF

Here is the catch, All the three below should be disabled/unchecked.

  • Virtual Machine Platform
  • Windows Hypervisor Platform
  • Windows Subsystem for Linux

Restart!

Mohd Abdul Mujib
  • 11,978
  • 8
  • 59
  • 84
0

you can use my script. paste code lines to notepad and save as vbs(for example switch_hypervisor.vbs)

Option Explicit

Dim backupfile
Dim record
Dim myshell
Dim appmyshell
Dim myresult
Dim myline
Dim makeactive
Dim makepassive
Dim reboot
record=""
Set myshell = WScript.CreateObject("WScript.Shell")

If WScript.Arguments.Length = 0 Then
    Set appmyshell  = CreateObject("Shell.Application")
    appmyshell.ShellExecute "wscript.exe", """" & WScript.ScriptFullName & """ RunAsAdministrator", , "runas", 1
    WScript.Quit
End if




Set backupfile = CreateObject("Scripting.FileSystemObject")
If Not (backupfile.FileExists("C:\bcdedit.bak")) Then
    Set myresult = myshell.Exec("cmd /c bcdedit /export c:\bcdedit.bak")
End If

Set myresult = myshell.Exec("cmd /c bcdedit")
Do While Not myresult.StdOut.AtEndOfStream
    myline = myresult.StdOut.ReadLine()

    If myline="The boot configuration data store could not be opened." Then
        record=""
        exit do
    End If
    If Instr(myline, "identifier") > 0 Then
        record=""
        If Instr(myline, "{current}") > 0 Then
            record="current"
        End If
    End If
    If Instr(myline, "hypervisorlaunchtype") > 0 And record = "current" Then
        If Instr(myline, "Auto") > 0 Then
            record="1"
            Exit Do
        End If
        If Instr(myline, "On") > 0 Then
            record="1"
            Exit Do
        End If
        If Instr(myline, "Off") > 0 Then
            record="0"
            Exit Do
        End If
    End If
Loop

If record="1" Then
    makepassive = MsgBox ("Hypervisor status is active, do you want set to passive? ", vbYesNo, "Hypervisor")
    Select Case makepassive
    Case vbYes
        myshell.run "cmd.exe /C  bcdedit /set hypervisorlaunchtype off"
        reboot = MsgBox ("Hypervisor chenged to passive; Computer must reboot. Reboot now? ", vbYesNo, "Hypervisor")
        Select Case reboot
            Case vbYes
                myshell.run "cmd.exe /C  shutdown /r /t 0"
        End Select
    Case vbNo
        MsgBox("Not Changed")
    End Select
End If

If record="0" Then
    makeactive = MsgBox ("Hypervisor status is passive, do you want set active? ", vbYesNo, "Hypervisor")
    Select Case makeactive
    Case vbYes
        myshell.run "cmd.exe /C  bcdedit /set hypervisorlaunchtype auto"
        reboot = MsgBox ("Hypervisor changed to active;  Computer must reboot. Reboot now?", vbYesNo, "Hypervisor")
        Select Case reboot
            Case vbYes
                myshell.run "cmd.exe /C  shutdown /r /t 0"
        End Select
    Case vbNo
        MsgBox("Not Changed")
    End Select
End If

If record="" Then
        MsgBox("Error: record can't find")
End If
mwfearnley
  • 2,813
  • 1
  • 28
  • 34
  • 2
    Normally, one should attempt to explain what a code snippet does/how it works when answering a question. – Sebastian Lenartowicz Jul 18 '17 at 09:34
  • 1
    @SebastianLenartowicz looks self-explanatory to me. The script will just set the hypervisorlaunchtype to auto or off and also export current settings through the bcdedit command. – user797717 Oct 18 '17 at 09:38
0

I tried all of stack overflow and all didn't works. But this works for me:

  1. Open System Configuration
  2. Click Service tab
  3. Uncheck all of Hyper-V related
Yehezkiel L
  • 325
  • 2
  • 10
0

I found the perfect solution on https://www.interfacett.com/blogs/enabling-hypervisor-auto-start-boot-configuration-database-bcd/

It wasn't working with given commands. But when you go to Power Shell and use command CMD then enter on or off with bcdedit /set {current} hypervisorlaunchtype [off or on chose any] then it worked without any issue.

  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/31860084) – KevinL May 30 '22 at 20:33