Improve support for Vagrant VM definitions

Rewrite of #1505 by @wweaver since the issue got closed.