Aru*_*gal 33 virtualbox headless vagrant vagrantfile windows-10
机器:Window10(64位).
我下载了最新的VirtualBox,Vagrant和初始化的CentOS 6.7 64位图像/网址.
以下在Git-Bash会话中成功运行.
1. vagrant box添加"centos67x64"" https://github.com/CommanderK5/packer-centos-template/releases/download/0.6.7/vagrant-centos-6.7.box "
2. vagrant init
3.更新了Vagrantfile(并转为vb.gui选项,即取消注释文件中的配置部分).
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
Run Code Online (Sandbox Code Playgroud)
之后,我尝试了以下命令,但我收到此错误消息.
$ 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
Run Code Online (Sandbox Code Playgroud)
如果我关闭/注释掉整个Vagrantfile的相应部分,我仍然会收到以下错误.
$ 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
Run Code Online (Sandbox Code Playgroud)
有任何想法吗!我查看了其他帖子,但在我的案例中找不到如何解决.
当我得到一些提示时,我尝试了其中一个解决方案.
然后,我通过取消选中(刻度线或黑框)关闭Hyper-V.
尝试再次运行"vagrant up"(无论是否有任何更改或上面提到的config.vm ...更改为Vagrantfile).它没有用,并给了我相同的 - 无误的错误信息.
好的,是时候重启了.重启Windows10.重新启动后,我看到一堆Virtual Box错误消息弹出窗口(其中很少显示如下).
仍然获得运行"vagrant up"的相同错误消息(即使在关闭Hyper-V之后也是如此).
fip*_*ips 40
默认情况下,在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虚拟化并重新启动计算机.
f-s*_*ety 35
我刚刚通过禁用(取消选中)Hyper-V解决了这个问题.我安装Docker时似乎启用了Hyper-V
Control Panel -> Program And Features -> Turn Windows Features on or off.
Run Code Online (Sandbox Code Playgroud)
您可能需要重新启动后续文字.
警告:使用VirtualBox的Vagrant无法同时使用Docker.
use*_*314 10
虽然这是一个老问题,但我最近仍然遇到它。
这就是在运行 Windows 10 的 i7-3770 3.40GHz、Z77 极限主板上对我有用的方法。
在 Windows 中,禁用 Hyper-V:
在bios中:
下载英特尔实用程序进行检查。
您现在应该看到它已被支持:

如果它仍然不起作用,请先尝试重新启用 Hyper-V,然后按照上述步骤操作。
Docker可能是罪魁祸首。安装docker后我遇到了同样的问题。Docker使用Windows hyper-v驱动程序创建容器。因此,Docker和Virtual Box可能无法一起使用!
| 归档时间: |
|
| 查看次数: |
55490 次 |
| 最近记录: |