I am creating a .box stroller file using a package. I have something like this in my .json config package:
"post-processors": [
"include": [
"./choco.ps1",
"./vagrantUp.ps1",
]
]
It creates a .box, and if I manually unzip the file, I see that they are included in it. When I finish launching the "stray box", add Mybox http: // whatever "I even see them in my ~ / .vagrant.d / boxes / MyBox / 0 / virtualbox.
~ $ ls ~/.vagrant.d/boxes/MyBox/0/virtualbox/
Vagrantfile metadata.json
box.ovf packer-virtualbox-iso-1424829938-disk1.vmdk
choco.ps1 vagrantUp.ps1
Also, in my firewall template, I have a line:
config.vm.provision "shell", path: "vagrantUp.ps1"
Next, I want to initialize this machine. I have done the following:
~ $ cd ~/Vagrant
Vagrant $ Vagrant mkdir MyBox; cd MyBox
MyBox $ vagrant init MyBox
MyBox $ ls
VagrantFile
This file looks like the main stray by default, but at the top it mentions config.vm.box = "MyBox".
But if I vagrant up, I get the following error:
* `path` for shell provisioner does not exist on the host system: /Users/me/Vagrant/MyBox/vagrantUp.ps1
, VagrantFile in/Vagrant/MyBox VagrantFile ~/.vagrant.d/, , . /Vagrant/MyBox, ~/.vagrant.d/
, , ? ?