vagrant - 无法让 modernIE 的 vagrant specific box 与 vagrant 一起工作

标签 vagrant virtualbox provisioning

我最近发现 Microsoft 提供了一个“Vagrant”选项,用于从 microsoft developer 下载他们的现代 IE Windows 机器。由于我一直在使用 Vagrant 来运行一些 Windows 环境,我认为这是一个很好的捷径,也许可以缓解我在通过 Vagrant 获得的 Windows 机器上遇到的过期许可问题。然而,这并不顺利。

首先,下载的 box 文件名中有一堆空格需要删除,以防止 Ruby 爆炸。我这样做了,并且能够将盒子添加到 Vagrant,但现在 Vagrant 卡住了,等待机器启动。 VM 实际上在后台正常启动,但 Vagrant 超时,因为它无法再与 VM 通信。设置的超时时间超出了机器启动所需的时间。

有谁知道如何在不锁定许可证到期日期的情况下解决这个问题?我是不是做错了什么,或者 Microsoft 是否创建了这些 Vagrant box VM 而没有实际检查它们是否与 Vagrant 一起运行?

Host OS: El Capitan
Vagrant version: 1.8.1
Box: MSEdge - Win10TH2.box
VirtualBox version: 5.0.16

VagrantFile 片段:

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.

最佳答案

如果有人想使用 Windows Vagrant 盒子,那么他很可能想留在 WinRM Vagrant configuration 上。名词所以cdwilson的答案指向 SSH 并没有让我满意。

另外两个 mr-rogerscdwilson是错误的 - 来自 https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/windows/ 的 Vagrant 盒子预装和配置了 WinRM,看看herehere .

这里的最后一个答案是制作一个自定义的 Vagrant 盒子,我在更专业的场景中也无法遵循。

但是有帮助(遗憾的是它是手动工作,直到 Microsoft 正确地预先配置它):我们必须更改网络列表管理策略

为此,您需要手动启动 VM 并出现超时错误,进入本地安全策略/网络列表管理策略,双击网络,转到标签 Network Location 并将 Location type 设置为 private 并将 User permissions 设置为用户可以更改位置

就是这样,现在假设一个 correct Vagrantfile with WinRM configurationvagrant up 将正常工作。

但是mr-rogers对了,请点赞microsoft developer FEEDBACK !

关于vagrant - 无法让 modernIE 的 vagrant specific box 与 vagrant 一起工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36629872/

相关文章:

virtualbox - Packer's Puppet 供应摊位

Xcode 苹果开发者证书到期 : (0xE8008018)

ios - 我的证书中的推送通知配置证书问题

python-2.7 - NoSuchModuleError : Can't load plugin: sqlalchemy. 方言 :redshift. psycopg2

linux - 如何在 Windows 主机上的 Vagrant 中以区分大小写的方式处理文件

ruby - 如何使用 rvmsudo 运行 Chef 命令(使用 rvm 安装乘客)

macos - 无法在远程目录中找到或无法访问 Vagrant box - 不兼容的curl版本

ruby-on-rails - 通过 Windows 7 上的 Cygwin 让 Rsync 3.0.9 在 Vagrant VM box 上工作

docker - 麦克 |从 VirtualBox 机器上的另一个应用程序访问部署在 Docker 上的应用程序

iphone - 等待或撤销 iPhone 过期证书?