Skip to content

Instantly share code, notes, and snippets.

@machixian
machixian / additional_disk_to_vagrant.rb
Created June 4, 2013 09:52
Add additional disk to Vagrant host
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
#!/bin/sh
# Shell script to install your public key on a remote machine
# Takes the remote machine name as an argument.
# Obviously, the remote machine must accept password authentication,
# or one of the other keys in your ssh-agent, for this to work.
#
# http://www.devthought.com/2009/09/19/get-ssh-copy-id-in-mac-os-x/
#