在cmd下使用 vagrant up 命令报错: Failed to locate the powershell executable on the available PATH.
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了在cmd下使用 vagrant up 命令报错: Failed to locate the powershell executable on the available PATH.相关的知识,希望对你有一定的参考价值。
Failed to locate the powershell executable on the available PATH. Please ensure powershell is installed and available on the local PATH, then run the command again
参考技术A 在环境变量path中添加powershell的路径,例如:C:\Windows\System32\WindowsPowerShell\v1.0如何在`vagrant up`命令中指定提供程序?
我有两台机器(Linux,Mac),需要使用vagrant来管理vm。在Liux中使用VirtualBox,而在Mac中使用parallels。所以我在vagrant配置文件中配置了这两个提供程序,如下所示:
Vagrant.configure('2') do |config|
agrant.configure('2') do |config|
config.ssh.forward_agent = true
config.ssh.password = 'crunch'
config.vm.box = 'ubuntu/xenial64'
config.vm.provider 'virtualbox' do |vb|
vb.gui = true
vb.memory = '8192'
vb.name = 'ubuntu'
end
config.vm.provider 'parallels' do |vb|
vb.gui = true
vb.memory = '8192'
vb.name = 'ubuntu'
config.vm.box = 'parallels/ubuntu-14.04'
end
在我的mac系统上,当我在命令下运行时却收到错误:
$ vagrant up --provider parallels
An active machine was found with a different provider. Vagrant
currently allows each machine to be brought up with only a single
provider at a time. A future version will remove this limitation.
Until then, please destroy the existing machine to up with a new
provider.
Machine name: default
Active provider: virtualbox
Requested provider: parallels
我已经安装了所需的提供者:
$ vagrant plugin list
docker (0.4.0)
vagrant-parallels (1.7.8)
vagrant-share (1.1.9, system)
vagrant-vbguest (0.15.0)
那么为什么vagrant
没有拿起--provider
参数?
以上是关于在cmd下使用 vagrant up 命令报错: Failed to locate the powershell executable on the available PATH.的主要内容,如果未能解决你的问题,请参考以下文章
Homestead 修改 Homestead.yaml 文件后 vagrant up 报错的问题