_vmconnect that either simply logs into a VirtualBox guest, or starts it headlessly first and then logs in. With _vmconnect set as the command for an iTerm2 profile, I can open the session without caring whether the machine is running or not.
The full script became a bit unwieldy for a blog post (and I didn't want to maintain it forever within Blogger), so I published it to github. You'll find it in my
bin repository: https://github.com/sapphirecat/bin
Update: _vmconnect version 1.0.3 fixes a possible data loss: if the VM was booted by _vmconnect, terminating the ssh connection it logged in with would also abort the VM. You SHOULD pull if you are using _vmconnect 1.0.2 or prior (check your
_vmconnect --version output!)