Search code examples
repositoryvirtualboxvirtualization

Is there a fast painless way to setup a linux distro on VirtualBox?


I like the Docker Hub with dockerfiles idea very much.

Is there a similar way to get a small working linux VirtualBox instance in a few commands, that could also be controlled from a command line?


Solution

  • Vagrant is a great tool that does just what you want and much more! It's a ruby application written for fast and simple setup of minimal development environments.
    By default it creates VirtualBox images, but it supports VMWare and many others too. The whole setup of a box is managed by a single Vagrantfile! Your vm options, network settings and provisioning is done there.
    Setting up a virtualbox box is as easy as executing just two shell commands. Checkout the Getting Started Guide for an example using Ubuntu.

    You can use a vast range of prepared images from the Hashicorp Atlas or build your owns.

    Also, vagrant doesn't limit you to one virtual machine per development setup, it enables you to model cluster setups on a single machine using multiple vms. I myself use docker for that part though.
    Edit: fixed a typo :<