【问题标题】:'vagrant up' not working on Windows'vagrant up' 在 Windows 上不起作用
【发布时间】:2016-11-17 02:30:12
【问题描述】:

我正在尝试通过 Git Bash 使用 Vagrant 下载 Linux 操作系统并在 Windows 7 上启动虚拟机。我已经运行了命令 vagrant init hashicorp/precise32,它将“vagrantfile”放在目标文件夹中。

当我运行命令vagrant up 时,问题就开始了。我在 Git Bash 上得到以下信息:

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:0x28c68f0> (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'
    from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/environment.rb:379:in `default_provider'
    from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/plugin/v2/command.rb:174:in `block in with_target_vms'
    from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/plugin/v2/command.rb:201:in `call'
    from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/plugin/v2/command.rb:201:in `block in with_target_vms'
    from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/plugin/v2/command.rb:183:in `each'
    from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/plugin/v2/command.rb:183:in `with_target_vms'
    from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.4/plugins/commands/up/command.rb:131:in `install_providers'
    from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.4/plugins/commands/up/command.rb:85:in `execute'
    from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/cli.rb:42:in `execute'
    from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/environment.rb:302:in `cli'
    from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.4/bin/vagrant:174:in `<main>'

请帮我解决这个问题。提前致谢。

【问题讨论】:

标签: linux virtual-machine virtualbox git-bash vagrant-windows


【解决方案1】:

我在Windows10 和Vagrant 1.8.4 和Virtualbox 5.1.0 上遇到了同样的问题。卸载 VirtualBox 并重新安装版本5.0.24 后,它可以工作了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多