Skip to content

Instantly share code, notes, and snippets.

@nicosingh
Last active December 7, 2017 16:38
Show Gist options
  • Save nicosingh/3c21a1709d0b6c60bcd28fe16cf9da5f to your computer and use it in GitHub Desktop.
Save nicosingh/3c21a1709d0b6c60bcd28fe16cf9da5f to your computer and use it in GitHub Desktop.
Virtualbox inside a vagrant box

Virtualbox inside a vagrant box

Requirements:

  • Virtualbox
  • Vagrant

How to use:

  1. Download this Gist as a zipfile
  2. Run vagrant up to create and provision a new box
  3. Run vagrant ssh to use this box
#!/bin/bash
echo "deb http://download.virtualbox.org/virtualbox/debian stretch contrib" > /etc/apt/sources.list.d/virtualbox.list
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | apt-key add -
apt-get update
apt-get install virtualbox-5.2 -y
rm -rf /var/lib/apt/lists/*
Vagrant.configure("2") do |config|
config.vm.box = "debian/contrib-stretch64"
config.vm.provision "shell", path: "provision.sh", privileged: true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment