Skip to content

Instantly share code, notes, and snippets.

@balioune
Created August 10, 2017 12:34
Show Gist options
  • Save balioune/423de94c838b2b4e3fdb0045354fbcaa to your computer and use it in GitHub Desktop.
Save balioune/423de94c838b2b4e3fdb0045354fbcaa to your computer and use it in GitHub Desktop.
This document shows main packages to install in order to allow disk size configuration in Vagrantfile.
Virtualbox version = 5.1.X
vagrant version = 1.8.5
## Install packages
sudo apt-get update
sudo apt-get install ruby -y
sudo apt-get install ruby-dev -y
sudo apt-get install g++ -y
sudo gem install unf_ext -v '0.0.7.4'
sudo vagrant plugin install vagrant-disksize
## Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
config.vm.define "std1" do |std1|
std1.vm.box = "ubuntu/xenial64"
std1.vm.hostname = "std1"
#std1.vm.boot_timeout=500
std1.disksize.size = "40GB"
std1.vm.network "private_network", ip: "192.168.56.100"
std1.vm.provider :virtualbox do |vb|
# Use VBoxManage to customize the VM. For example to change memory:
vb.customize ["modifyvm", :id, "--memory", "248"]
vb.customize ["modifyvm", :id, "--cpus", "2"]
vb.customize ["modifyvm", :id, "--ioapic", "on"]
end
end
config.vm.define "std2" do |std2|
std2.vm.box = "ubuntu/xenial64"
std2.vm.hostname = "std2"
std2.disksize.size = "40GB"
std2.vm.network "private_network", ip: "192.168.56.200"
std2.vm.provider :virtualbox do |vb|
# Use VBoxManage to customize the VM. For example to change memory:
vb.customize ["modifyvm", :id, "--memory", "248"]
vb.customize ["modifyvm", :id, "--cpus", "2"]
vb.customize ["modifyvm", :id, "--ioapic", "on"]
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment