I was able to do vagrant up to create a new box successfully, then I installed all the software I need (postgres, redis, etc.). These are the instructions I followed, under Building your own Vagrant VM:
https://github.com/discourse/discourse/blob/ff3028de07be29f1d92d5807784b0777a4eaf678/docs/DEVELOPER-ADVANCED.md
Since I'm trying to use vmware_fusion as the provider instead of VirtualBox, my Vagrantfile looks like this:
Vagrant.configure("2") do |config|
config.vm.box = "precise64_vmware_fusion"
config.vm.box_url = "http://files.vagrantup.com/precise64_vmware_fusion.box"
config.vm.network :private_network, ip: "192.168.11.200"
config.ssh.forward_agent = true
config.vm.network :forwarded_port, guest: 3000, host: 5000
config.vm.network :forwarded_port, guest: 1080, host: 5080 # Mailcatcher
config.vm.synced_folder ".", "/vagrant"
config.vm.provider :vmware_fusion do |p|
p.vmx['memsize'] = '1024'
end
end
When I do vagrant halt, and then vagrant up, I get this output:
Bringing machine 'default' up with 'vmware_fusion' provider...
[default] Verifying vmnet devices are healthy...
[default] Preparing network adapters...
[default] Starting the VMware VM...
[default] Waiting for the VM to finish booting...
[default] The machine is booted and ready!
[default] Forwarding ports...
[default] -- 22 => 2222
[default] -- 3000 => 5000
[default] -- 1080 => 5080
[default] Configuring network adapters within the VM...
[default] Enabling and configuring shared folders...
[default] -- vagrant-root: /Users/neil/Code/discourse/vmware/discourse
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
sudo mkdir -p /vagrant
I vagrant ssh into the box, and see something odd:
vagrant@precise64:~$ sudo mkdir -p /vagrant
mkdir: cannot create directory `/vagrant': File exists
vagrant@precise64:~$ cd /vagrant
-bash: cd: /vagrant: No such file or directory
The instructions work with VirtualBox, so I'm not sure what is wrong. Any ideas?
Thanks,
Neil