One day, my MacBook Pro crashed during sleep, but after rebooting, my Vagrant VM did not come up, giving this error:
/Users/me/.vagrant.d/gems/2.4.6/gems/daemons-1.3.1/lib/daemons/application.rb:383:in `kill': Operation not permitted (Errno::EPERM)
TL;TR: remove PID file
The gist of the issue was that vagrant-dns
plugin had left a stale PID file which had to be removed:
rm $HOME/.vagrant.d/tmp/dns/daemon/vagrant-dns.pid
For longer description of the hunt, do read on.
Use the source, Luke!
After trying to reinstall all plugins, upgrade Vagrant and VirtualBox, finally I remembered the basics: run vagrant up --debug
to get better insight.
Seeing from the error message that VagrantDNS::Middlewares::Restart
seems to be problematic, I quickly turned to GitHub for VagrantDNS source
This pointed me to the right direction, to check, find and remove the stale PID file:
rm $HOME/.vagrant.d/tmp/dns/daemon/vagrant-dns.pid