无业游民:vm:找不到“ Shell”配置程序

时间:2018-07-13 16:18:11

标签: vagrant vagrant-windows

我写了这个脚本:

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure(2) do |config|

  config.vm.box = "jborean93/WindowsServer2012"
  config.vm.network "public_network", bridge: "p1p1", ip: "130.103.97.230", netmask: "255.255.252.0"

  config.vm.provider :virtualbox do |vb|
    vb.name = "GoCD-Test"
    vb.customize ["modifyvm", :id, "--memory", 3072]

  end

  config.vm.provision :file, source: "C:\\Vagrant\\gocd\\files\\go-server-16.1.0-2855-setup.exe", destination: "C:\\tmp"
  config.vm.provision :file, source: "C:\\Vagrant\\gocd\\files\\go-agent-16.1.0-2855-setup.exe", destination: "C:\\tmp"

  config.vm.provision :shell, path: "shell/network_ports.ps1"
  config.vm.provision :shell, path: "shell/chocolatey.ps1"
  config.vm.provision :shell, path: "shell/basic_software_installer.cmd"
  config.vm.provision :Shell, path: "shell/gocd_install.ps1"

end

我有一个类似于上述的脚本,不同之处在于它是为Linux CentOS 7服务器制作的,当我以“无用”运行linux脚本时,它运行正常,没有问题,但是我遇到了问题上面的脚本中,当我运行命令“ vagrant up”时,它会向我发送错误消息:

PS C:\Vagrant\gocd> vagrant up --provision
Bringing machine 'default' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix
the following errors and try again:

vm:
* The 'Shell' provisioner could not be found.

这两个脚本都在Windows版本的Vagrant上运行,我一直在寻找解决问题的方法,但无济于事,'我在做什么错了?

谢谢。

0 个答案:

没有答案