Launching a Vagrant VM inside Travis-CI

Sadly this is not supported by Travis-CI and there's no plan to do it in the near future. Check the following ticket: https://github.com/travis-ci/travis-ci/issues/6060

Since Travis is running your build in a virtualized container (OpenVZ) you could try with a 32-bit VM. That could work, but I haven't tested.


From the end of 2019 it is possible to run Vagrant on TravisCI! All you have to do, is to switch to libvirt & KVM provider instead of virtualbox on Travis - see this so answer for a complete HowTo and this fully comprehensible example project on GitHub: https://github.com/jonashackt/vagrant-travisci-libvrt

See this TravisCI build for example:

successful vagrant installation and execution on Travis

If you don't want to use the libvirt provider locally, you can simply use one of the generic Vagrant Box images from Vagrant Cloud, since they support both virtualbox (locally) and libvirt (on TravisCI).