尝试 vagrant up 时阻止 windows_hyperv_admin 错误 [英] block in windows_hyperv_admin Error when trying vagrant up

查看:20
本文介绍了尝试 vagrant up 时阻止 windows_hyperv_admin 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的环境中使用 Vagrant,但我遇到了如下所示的小问题.

I'm using Vagrant for my environment and I've got a little issue shown below.

kk@Lenovo MINGW64 ~/sravz/vm1
$ vagrant up
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/util/platform.rb:85:in `block in windows_hyperv_admin?': undefined method `include?' for #<Vagrant::Util::Subprocess::Result:0x2634e88> (NoMethodError)
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/util/platform.rb:89:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/util/platform.rb:89:in `windows_hyperv_admin?'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.4/plugins/providers/hyperv/provider.rb:20:in `usable?'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/environment.rb:381:in `block in default_provider'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/environment.rb:379:in `each'

我已经使用 vagrant init 初始化了我的项目,但由于某种原因 vagrant up 拒绝工作.

I have initialised my project with vagrant init but for some reason vagrant up refuses to work.

推荐答案

我遇到了同样的问题,正如@Frédéric Henri 提到的,这与此问题有关:https://github.com/mitchellh/vagrant/issues/7465.

I had the same issue, and as @Frédéric Henri mentioned, this is related with this issue: https://github.com/mitchellh/vagrant/issues/7465.

我只是按照其中一条评论中提出的建议进行操作,现在工作正常:)

I just followed the suggestion made in one of the comments and now is working fine :)

我遇到了同样的问题(最初认为是因为 Hyper-V,我已经卸载了它并且错误仍然存​​在).但是如果你今天安装了 Virtualbox,这个问题可能是因为 5.1 刚刚发布了几个小时(创建一个环境变量 VAGRANT_DEFAULT_PROVIDER 设置为virtualbox"会显示一条消息,说它最多只支持 5.0).

*卸载 5.1,然后安装 Virtualbox 5.0.x,直到该问题解决为止,为我解决了问题.

您可以在此处找到旧版本.对于 5.0.x.具体来说,此处.

You can find the older releases here. For 5.0.x. specifically, here.

这篇关于尝试 vagrant up 时阻止 windows_hyperv_admin 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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