Skip to content

Instantly share code, notes, and snippets.

@sheenobu
Created January 13, 2013 19:17
Show Gist options
  • Select an option

  • Save sheenobu/4525749 to your computer and use it in GitHub Desktop.

Select an option

Save sheenobu/4525749 to your computer and use it in GitHub Desktop.
Vagrant hard drive function.
Vagrant::Config::Top.class_eval do
def hd(name,size,port)
self.vm.customize [ "createhd", "--filename","#{name}.vmdk", "--size", size.to_s, "--format", "vmdk" ]
self.vm.customize ["storageattach", :id, "--storagectl", "SATA Controller", "--port", port.to_s, "--device", "0", "--type", "hdd", "--medium", "#{name}.vmdk"]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment