我使用Vagrant 1.9.7 和 CentOS 7.3 的 bento,遇到了错误(已解决)

暂且先说

作为一个经常使用Vagrant和CentOS 6.7的人,我意识到应该开始接触一下7系列了,但是又遇到了一点麻烦。

Vagrant 1.9.7
bento/centos-7.3

平时的步骤 shí de bù

首先添加一个盒子。

C:\vagrant>vagrant box add https://app.vagrantup.com/bento/boxes/centos-7.3
==> box: Loading metadata for box 'https://app.vagrantup.com/bento/boxes/centos-7.3'
This box can work with multiple providers! The providers that it
can work with are listed below. Please review the list and choose
the provider you will be working with.

1) parallels
2) virtualbox
3) vmware_desktop

Enter your choice: 2
==> box: Adding box 'bento/centos-7.3' (v2.3.7) for provider: virtualbox
    box: Downloading: https://vagrantcloud.com/bento/boxes/centos-7.3/versions/2.3.7/providers/virtualbox.box
    box: Progress: 100% (Rate: 735k/s, Estimated time remaining: --:--:--)
==> box: Successfully added box 'bento/centos-7.3' (v2.3.7) for 'virtualbox'!

C:\vagrant>vagrant box list
bento/centos-7.2   (virtualbox, 2.3.1)
bento/centos-7.3   (virtualbox, 2.3.7)

Vagrantfile中有

写下平常的定义…

config.vm.define :cent73 do |cent73|
  cent73.vm.box = "bento/centos-7.3"
  cent73.vm.network :private_network, ip: "192.168.11.222"
  cent73.vm.provider "virtualbox" do |v|
    v.customize ["modifyvm", :id, "--memory", 512]
  end
end

当它启动时…

The executable 'powershell' Vagrant is trying to run was not
found in the %PATH% variable. This is an error. Please verify
this software is installed and on the path.

嗯?你是说什么?PowerShell无法执行了吗?

请提供一个带有中文选项的以下链接:

https://github.com/mitchellh/vagrant-aws/issues/363

根据要求,在环境变量(PATH)中添加PowerShell的路径。

c:\Windows\System32\WindowsPowerShell\v1.0

这样没问题啦!!

广告
将在 10 秒后关闭
bannerAds