【发布时间】:2016-08-06 09:45:55
【问题描述】:
我最近发现微软提供了一个“Vagrant”选项,用于从microsoft developer 下载他们的现代 IE Windows 机器,因为我一直在使用 Vagrant 来运行一些 Windows 环境,我认为这将是一个不错的快捷方式并且也许可以缓解我已经通过 Vagrant 获得的 Windows 盒子的过期许可问题。然而,事情并不顺利。
首先,下载的 box 文件名有一堆空格,需要删除以防止 Ruby 爆炸。我这样做了,并且能够将盒子添加到 Vagrant 但现在 Vagrant 卡住了等待机器启动。 VM 实际上在后台启动良好,但 Vagrant 超时,因为它无法再与 VM 通信。设置的超时时间超出机器启动所需的几分钟时间。
有谁知道如何在不锁定许可证到期日期的情况下解决此问题?是我做错了什么,还是微软创建了这些 Vagrant 盒子 VM 并没有实际检查它们是否与 Vagrant 一起运行?
Host OS: El Capitan
Vagrant version: 1.8.1
Box: MSEdge - Win10TH2.box
VirtualBox version: 5.0.16
VagrantFile sn-p:
config.vm.define "crap", autostart: false do |win|
win.vm.box = "~/win10.box" # Renamed from "MSEdge - Win10_TH2.box"
win.vm.communicator = "winrm"
win.vm.network "private_network", ip: "192.168.11.7"
win.vm.provider "virtualbox" do |v|
v.name = "crap"
v.gui = true
end
end
错误:
Bringing machine 'crap' up with 'virtualbox' provider...
==> crap: Importing base box '~/win10.box'...
==> crap: Matching MAC address for NAT networking...
==> crap: Setting the name of the VM: crap
==> crap: Clearing any previously set network interfaces...
==> crap: Preparing network interfaces based on configuration...
crap: Adapter 1: nat
==> crap: Forwarding ports...
crap: 5985 (guest) => 55985 (host) (adapter 1)
crap: 5986 (guest) => 55986 (host) (adapter 1)
==> crap: Booting VM...
==> crap: Waiting for machine to boot. This may take a few minutes...
crap: WinRM address: 127.0.0.1:55985
crap: WinRM username: vagrant
crap: WinRM execution_time_limit: PT2H
crap: WinRM transport: plaintext
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.
If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.
If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.
If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
【问题讨论】:
标签: vagrant virtualbox provisioning