149

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
  • 4,092
  • 6
  • 31
  • 44
Sky
  • 7,343
  • 8
  • 31
  • 42
  • 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! –  Feb 24 '21 at 06:24

12 Answers12

353

In an elevated Command Prompt write this :

To disable:

bcdedit /set hypervisorlaunchtype off

To enable:

bcdedit /set hypervisorlaunchtype auto 

Restart to take effect.

StayOnTarget
  • 11,743
  • 10
  • 52
  • 81
LukeSkCzEnDeRuPl
  • 3,546
  • 1
  • 12
  • 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
  • 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
45

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.

To find the new id, type "bcdedit" and then look for identifier {XXX} in the added boot loader configuration. 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

StayOnTarget
  • 11,743
  • 10
  • 52
  • 81
hfmanson
  • 1,446
  • 14
  • 21
  • 2
    If you run this command on PowerShell, make sure to put the `{current}` and `{GUID}` between `" "` like: `"{current}"` – Nicke Manarin Oct 21 '19 at 14:34
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,656
  • 16
  • 17
  • 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
20

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
  • 2,079
  • 1
  • 16
  • 16
8

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
  • 727
  • 1
  • 9
  • 14
4

Open command prompt as admin and write :

bcdedit /set hypervisorlaunchtype off
Mickael B.
  • 4,755
  • 4
  • 24
  • 48
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

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
  • 13,071
  • 8
  • 64
  • 88
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
  • 3,303
  • 2
  • 34
  • 35
  • 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
  • 389
  • 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.

  • 1
    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
0

I solved it in the following way:

1. bcdedit /set hypervisorlaunchtype off enter image description here

result [FAILED!]

2. bcdedit /set {872da645-4a9b-1727-bee2-5585105b9eed} hypervisorlaunchtype Off

enter image description here

result [FAILED!]

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

enter image description here

result [FAILED!]

The error is that I am not logged in as an administrator at the command prompt as a result all the steps above [FAIL!]

it should be like this:

1. open windows search enter image description here

2. search cmd enter image description here

3. Right click on Command Prompt enter image description here

4. Click run as administrator

5. type in cmd bcdedit /set hypervisorlaunchtype off enter image description here

and see already [SUCCESSFUL√]