This was obtained from y-yoshinoya at https://gist.github.com/y-yoshinoya/413fcd3f6bfcfce54456
wget -q -O - http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc | sudo apt-key add -
sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian precise non-free contrib" >> /etc/apt/sources.list.d/virtualbox.org.list'
sudo apt-get update
sudo apt-get install linux-headers-$(uname -r) build-essential virtualbox-4.3 dkms
cd /tmp
wget http://download.virtualbox.org/virtualbox/4.3.20/Oracle_VM_VirtualBox_Extension_Pack-4.3.20-96996.vbox-extpack
sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.3.20-96996.vbox-extpack
wget https://dl.bintray.com/mitchellh/vagrant/vagrant_1.7.2_x86_64.deb
sudo dpkg -i vagrant_1.7.2_x86_64.deb
Other boxes can be fetched at http://www.vagrantbox.es/
mkdir vagrant; cd vagrant
vagrant box add centos7 https://github.com/holms/vagrant-centos7-box/releases/download/7.1.1503.001/CentOS-7.1.1503-x86_64-netboot.box
vagrant init centos7
vagrant up
vagrant ssh
Edit the Vagrant file with the following
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
# vb.gui = true
# Customize the amount of memory on the VM:
vb.memory = "2048"
# Change the number of CPUs
vb.cpus = 2
end
config.vm.network :forwarded_port, guest: 22, host: 22222, host_ip: "0.0.0.0", id: "ssh", auto_correct: true
Now you can connect using
ssh -p 22222 vagrant@<ip address of host>
(default password: vagrant)