Skip to content

Instantly share code, notes, and snippets.

@jhenkens
Last active April 30, 2016 05:30
Show Gist options
  • Save jhenkens/9543707 to your computer and use it in GitHub Desktop.
Save jhenkens/9543707 to your computer and use it in GitHub Desktop.
Mac OS X 10.9.2, Vagrant 1.5.1, VMWare Fusion 6.0.2
I had some intense difficulties getting this all to work. The VMs would boot
fine with gui=true, but then would fail as soon as I turned that off. Yet when
they failed, they were actually running just fine! I could ssh in, but neither
vagrant nor vmrun could find the running VMs! You would think that it would
give better errors, but no.
First off, most boxes you find online will be using the VMWare configuration 9,
which will only boot if you have gui=true the first boot, so you can upgrade it
to the configuration 10. Secondly, there were a bunch of problems with the
/var/*/vmware folders which were causing issues. These all boil down to
persmissions issues.
First, Vagrant complains about permissions on the DHCP VMware files in
/var/db/vmware. At least vagrant tells us about these errors, but they seem to
pop back up every time we fix it. Oh well. do a cd /var/db/vmware, then do sudo
chown root:staff ., then do sudo chmod g+rs ., finally, for good measure, sudo
chmod g+r ./*.
Next, the VMware 'vmrun' error "Error: The operation was canceled" in my case
was becasue of permissions on a symlink in /var/run/vmware. Similar thing, just
cd into that directory, and make it owned by root:staff, and do the g+rs to
sticky the read group setting on the folder.
These are probably ugly fixes, but oh well. It fucking works and I'm happy.
Time for sleep.
3/14/2014 Detailed notes:
samwell:pre32 johanhenkens$ vagrant up
Bringing machine 'default' up with 'vmware_fusion' provider...
==> default: VMware requires root privileges to make many of the changes
==> default: necessary for Vagrant to control it. In a moment, Vagrant will ask for
==> default: your administrator password in order to install a helper that will have
==> default: permissions to make these changes. Note that Vagrant itself continues
==> default: to run without administrative privileges.
Password:
==> default: Cloning VMware VM: 'precise32'. This can take some time...
==> default: Verifying vmnet devices are healthy...
==> default: Preparing network adapters...
==> default: Starting the VMware VM...
An error occurred while executing `vmrun`, a utility for controlling
VMware machines. The command and output are below:
Command: ["start", "/Users/johanhenkens/VMWare Vagrant VMs/5229e1f5-393c-4fb4-9268-b270ba604855/vagrant-precise32.vmx", "nogui", {:notify=>[:stdout, :stderr]}]
Stdout: 2014-03-14T11:45:28.903| ServiceImpl_Opener: PID 33978
Error: The operation was canceled
Stderr:
samwell:pre32 johanhenkens$ vmrun list
Total running VMs: 0
samwell:pre32 johanhenkens$
Fixed by:
cd /var/run/vmware
sudo chown root:staff .
sudo chmod g+rs .
sudo chmod g+rx ./*
sudo chown root:staff ./*
Next error:
samwell:pre32 johanhenkens$ vagrant up
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: Configuring network adapters within the VM...
Vagrant couldn't read the VMware DHCP leases file due to permissions
issues! Please make sure that the file below has sufficient read
permissions so that the user running Vagrant can read it.
/var/db/vmware/vmnet-dhcpd-vmnet8.leases
That file is overwritten every time you bring up a VM. So, do the same thing.
cd /var/db/vmware
sudo chown root:staff .
sudo chmod g+rs .
sudo chmod g+r ./*
sudo chown root:staff ./*
@ethier
Copy link

ethier commented Aug 31, 2015

@rphillips, thanks for the update. Just tried the latest nightly and everything is looking good for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment