Vagrant up - VBoxManage.exe 错误:VT-x 不可用 (VERR_VMX_NO_VMX) 代码 E_FAIL (0x80004005) gui headless [英] Vagrant up - VBoxManage.exe error: VT-x is not available (VERR_VMX_NO_VMX) code E_FAIL (0x80004005) gui headless

查看:36
本文介绍了Vagrant up - VBoxManage.exe 错误:VT-x 不可用 (VERR_VMX_NO_VMX) 代码 E_FAIL (0x80004005) gui headless的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

机器:Window10(64 位).

我下载了最新的 VirtualBox、Vagrant 并初始化了 CentOS 6.7 64bit image/url.

以下在 Git-Bash 会话中成功运行.
1. vagrant box 添加 "centos67x64" "

  • 然后,我通过取消选中(勾选标记或黑框)关闭了 Hyper-V.

  • Windows10 让我重启,我说不"(稍后).
  • 尝试再次运行vagrant up"(没有或没有任何更改或上面提到的 config.vm...对 Vagrantfile 的更改).它不起作用,并给了我相同的 --headless 错误消息.

  • 好的,该重启了.重新启动Windows10.重启后,我看到一堆Virtual Box的错误信息弹出(下面显示的很少).

    1. 在所有这些 Virtual Box 弹出窗口上单击确定"按钮后,我尝试在我的机器上运行 Virtual Box,它运行良好(成功).
    2. 现在,我打开 Git-BASH 并再次进入 Vagrantfile 所在的目录.尝试调整设置打开/关闭或评论/取消评论 Vagrantfile 相应的部分(如上所述).

    仍然在运行vagrant up"时收到相同的错误消息(即使在关闭 Hyper-V 之后也是如此).

    解决方案

    在 Windows 8/10 中停止默认运行的 hyper-v 服务,因为它会阻止所有其他对 VT 硬件的调用.

    此处补充说明:https://social.technet.microsoft.com/Forums/windows/en-US/118561b9-7155-46e3-a874-6a38b35c67fd/hyperv-disables-vtx-for-other-hypervisors?forum=w8itprogeneral

    同样如您所述,如果尚未启用,请在 BIOS 设置中打开 Intel VT 虚拟化并重新启动机器.

    <小时>

    要关闭 Hypervisor,请从命令提示符(管理员)(Windows+X)运行:

    bcdedit/set hypervisorlaunchtype off

    然后重新启动您的计算机.要重新打开它,请运行:

    bcdedit/set hypervisorlaunchtype on

    如果你收到整数数据不是指定的有效",尝试:

    bcdedit/set hypervisorlaunchtype auto

    -- 归功于 Tj Kellie

    Machine: Window10 (64bit).

    I downloaded the latest VirtualBox, Vagrant and initialized CentOS 6.7 64bit image/url.

    The following worked successfully in Git-Bash session.
    1. vagrant box add "centos67x64" "https://github.com/CommanderK5/packer-centos-template/releases/download/0.6.7/vagrant-centos-6.7.box"
    2. vagrant init
    3. Updated Vagrantfile (and turned vb.gui option i.e. uncommented that config section in the file).

      config.vm.provider "virtualbox" do |vb|
        # Display the VirtualBox GUI when booting the machine
        vb.gui = true
    
        # Customize the amount of memory on the VM:
        vb.memory = "2048"
      end
    

    After that, I tried the following command but I'm getting this error message.

    $ vagrant up
    Bringing machine 'default' up with 'virtualbox' provider...
    ==> default: Importing base box 'centos67x64'...
    ==> default: Matching MAC address for NAT networking...
    ==> default: Setting the name of the VM: vv_default_1466548735200_80300
    ==> default: Clearing any previously set network interfaces...
    ==> default: Preparing network interfaces based on configuration...
        default: Adapter 1: nat
    ==> default: Forwarding ports...
        default: 22 (guest) => 2222 (host) (adapter 1)
    ==> default: Running 'pre-boot' VM customizations...
    ==> default: Booting VM...
    There was an error while executing `VBoxManage`, a CLI used by Vagrant
    for controlling VirtualBox. The command and stderr is shown below.
    
    Command: ["startvm", "ae74ebaa-8f01-48cf-bdad-956c59ef1208", "--type", "gui"]
    
    Stderr: VBoxManage.exe: error: VT-x is not available (VERR_VMX_NO_VMX)
    VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole
    

    If I turn/comment off the whole Vagrantfile respective section, I'm still getting the following error.

    $ vagrant up
    Bringing machine 'default' up with 'virtualbox' provider...
    ==> default: Clearing any previously set forwarded ports...
    ==> default: Clearing any previously set network interfaces...
    ==> default: Preparing network interfaces based on configuration...
        default: Adapter 1: nat
    ==> default: Forwarding ports...
        default: 22 (guest) => 2222 (host) (adapter 1)
    ==> default: Running 'pre-boot' VM customizations...
    ==> default: Booting VM...
    There was an error while executing `VBoxManage`, a CLI used by Vagrant
    for controlling VirtualBox. The command and stderr is shown below.
    
    Command: ["startvm", "ae74ebaa-8f01-48cf-bdad-956c59ef1208", "--type", "headless"]
    
    Stderr: VBoxManage.exe: error: VT-x is not available (VERR_VMX_NO_VMX)
    VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole
    

    Any ideas! I looked into other posts but couldn't find how to resolve in my case.

    As I got some hints, I tried one of the solution.

    1. TURN off the Hyper-V which is turned of by default I guess in Windows10.
    2. To do this, I Went to Control panel in Windows10 and looked here and found this.

    3. Then, I turned Hyper-V off by unchecking (the tick mark, or black box).

    4. Windows10 told me to RESTART, I said "No" (later).
    5. Tried running "vagrant up" again (without or without any changes or the above mentioned config.vm... changes to the Vagrantfile). It didn't work and gave me the same --headless error message.

    6. OK, time to restart. Restarted Windows10. After the restart, I saw bunch of Virtual Box error messages popups (few of them are shown below).

    1. Once I clicked on OK button on all of those Virtual Box popup windows, I tried to run Virtual Box on my machine, it came up fine(successfully).
    2. Now, I opened Git-BASH and again went to the directory where Vagrantfile was present. Tried tweaking the settings on / off or commenting/uncommenting the Vagrantfile respective section (as I described above).

    STILL getting the the same error messages for running "vagrant up" (even after turning the Hyper-V off as well).

    解决方案

    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.


    To turn Hypervisor off, run this from Command Prompt (Admin) (Windows+X):

    bcdedit /set hypervisorlaunchtype off
    

    and reboot your computer. To turn it back on again, run:

    bcdedit /set hypervisorlaunchtype on
    

    If you receive "The integer data is not valid as specified", try:

    bcdedit /set hypervisorlaunchtype auto
    

    -- credit Tj Kellie

    这篇关于Vagrant up - VBoxManage.exe 错误:VT-x 不可用 (VERR_VMX_NO_VMX) 代码 E_FAIL (0x80004005) gui headless的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    相关文章
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆