Created
June 4, 2013 09:52
-
-
Save machixian/5704863 to your computer and use it in GitHub Desktop.
Add additional disk to Vagrant host
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant.configure("2") do |config| | |
config.vm.box = "base" | |
# strat with Vagrant configuration v2 need specify VM provider | |
config.vm.provider :virtualbox do |vb| | |
file_to_disk = '/tmp/large_disk.vdi' | |
# disk size 50GB | |
vb.customize ['createhd', '--filename', file_to_disk, '--size', 50 * 1024] | |
vb.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--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
Thank you for this useful gist, but i have changed the controller name from 'SATA Controller' to 'SATA' to get it working with my new version of VirtualBox (version 4.3.4).
To check the correct controller name type in the command line :
VBoxManage showvminfo the_vm_name | grep 'Storage Controller Name'
Enjoy.