Vagrant up - VBoxManage.exe error: VT-x is not available (VERR_VMX_NO_VMX) code E_FAIL (0x80004005) gui headless

喜你入骨 提交于 2019-12-02 17:59:04

Stop hyper-v service running by default in Windows 8/10, since it blocks all other calls to VT hardware.

Additional explanation here: https://social.technet.microsoft.com/Forums/windows/en-US/118561b9-7155-46e3-a874-6a38b35c67fd/hyperv-disables-vtx-for-other-hypervisors?forum=w8itprogeneral

Also as you have mentioned, if not already enabled, turn on Intel VT virtualization in BIOS settings and restart the machine.

I just solved this problem by disabling(uncheck) Hyper-V. Seems Hyper-V was enabled when I installed Docker

Control Panel -> Program And Features -> Turn Windows Features on or off.

You may need to reboot afterwords.

Warning: Vagrant with VirtualBox cannot work with Docker at the same time.

Docker can be the culprit. I had same issue after installing docker. Docker uses Windows hyper-v driver to create containers. Hence Docker and Virtual Box may not work together!

If you are getting the above error on Windows 10 Pro then you can disable the Hyper-V. Hyper-V is default enable in the Windows 10. You can either use Hyper-V or Virtual Box. So, to use the Virtual box you have to disable hyper-v in windows, you can follow following steps to do -

  1. Search Control Panel
  2. Click on Uninstall a program
  3. Turn Windows features on or off
  4. Unselect the Hyper-V option.
  5. Click on OK
  6. Restart the system to apply the changes.

Although this is an old question, but I've still encounter it recently.

This is what worked for me on my i7-3770 3.40GHz, Z77 extreme motherboard running Windows 10.

In Windows, disable Hyper-V:

  1. Open up a PowerShell or CMD session as Administrator.
  2. Type the following command: dism.exe /Online /Disable-Feature:Microsoft-Hyper-V-All
  3. Windows will ask you to restart.

In the bios:

  1. Disable >>> Intel Virtualization Technology, vt-d
  2. Save the bios settings and allow it to restart and boot into Windows.
  3. Shutdown the computer (I've tried just restarting and it didn't work)
  4. Power up the computer, go into the bios and re-enable the above disabled settings.
  5. Save, restart.

Download the Intel Utility to check.

You should now see it been supported:

If it still doesn't work, try re-enabling Hyper-V first then following the steps above.

Search for Windows Features. Turn off Hyper V.Most likely, Virtual Box is clashing with Hyper V on Windows. Also check for Hyper V running in your Services. Stop and disable that as well.

Besides turning on virtualization features of the processor and turning off Hyper-V, here's another thing, related to Windows' Virtualization-Based Security features:

https://docs.microsoft.com/en-us/windows-hardware/design/device-experiences/oem-vbs

VBS (and the associated security features) must be disabled to avoid conflicting hypervisors. Here is a solution from VMware, which also seems valid for the VirtualBox issue":

https://kb.vmware.com/s/article/2146361

If the Docker is installed and up and running at the same time, if you are trying to run Virtual Box it will not work. The underlying kernel on host machine which is present on your laptop will not allow to work both things at the same time.

Hence Docker and Virtual box can't run at the same time. for that,

  1. To use Docker you have to enable the hyper-v which is present on this location

    Control Panel -> Program And Features -> Turn Windows Features on or off.

  2. To run Virtual box you have to disable the hyper-v from above location.

Turn Off the Hyper-V option from the windows feature list. You can find this on control panel.

This is what helped me:

  1. Remove Hyper-V and install Hypervisor platform.

    • In the elevated Powershell prompt do:

      Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All
      Enable-WindowsOptionalFeature -Online -FeatureName HypervisorPlatform
      
    • Restart

  2. Disable Windows Defender Credential Guard

    • "Local Group Policy Editor" → "Computer Configuration" → "Administrative Templates" → "System" → "Device Guard" → "Turn on Virtualization Based Security" → Set to "Disabled"

    • Delete the following registry settings:

      • HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\LSA\LsaCfgFlags
      • HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\DeviceGuard\LsaCfgFlags
    • Restart

  3. Delete the Windows Defender Credential Guard EFI variables

    • In the elevated command prompt do:

      mountvol X: /s
      copy %WINDIR%\System32\SecConfig.efi X:\EFI\Microsoft\Boot\SecConfig.efi /Y
      bcdedit /create {0cb3b571-2f2e-4343-a879-d86a476d7215} /d "DebugTool" /application osloader
      bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} path "\EFI\Microsoft\Boot\SecConfig.efi"
      bcdedit /set {bootmgr} bootsequence {0cb3b571-2f2e-4343-a879-d86a476d7215}
      bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} loadoptions DISABLE-LSA-ISO
      bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} device partition=X:
      mountvol X: /d
      
    • Restart

  4. Disable virtualization-based security

    • Delete all registry keys under HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\DeviceGuard\* (but keep DeviceGuard itself).

    • Restart

See also: Disable Windows Defender Credential Guard

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!