Skip to content

Instantly share code, notes, and snippets.

@GuillaumeDievart
Created September 25, 2015 08:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GuillaumeDievart/80c21bb322463b469c34 to your computer and use it in GitHub Desktop.
Save GuillaumeDievart/80c21bb322463b469c34 to your computer and use it in GitHub Desktop.
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provider "virtualbox" do |vb|
file_to_disk = File.realpath( "." ).to_s + "/disk.vdi"
if ARGV[0] == "up"
puts "Creating 500GB disk #{file_to_disk}."
vb.customize [
'createhd',
'--filename', file_to_disk,
'--format', 'VDI',
'--size', 512000
]
vb.customize [
'storageattach', :id,
'--storagectl', 'IDE Controller',
'--port', 1, '--device', 1,
'--type', 'hdd', '--medium',
file_to_disk
]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment