Skip to content

Instantly share code, notes, and snippets.

@leth
Created October 23, 2012 18:51
Show Gist options
  • Save leth/3940766 to your computer and use it in GitHub Desktop.
Save leth/3940766 to your computer and use it in GitHub Desktop.
Virtualbox differencing disks for Vagrant

Summary

  • Detach disk from VM
  • Clone VM (fast!)
  • Attach disk to new VM in 'multiattach' mode (On attaching, virtualbox creates a new differencing image tied to original disk)
  • ...
  • Profit!

Status/Notes

  • Can't import the .ova without cloning the disks. (The ignore option is understood, but causes it to crash.)
  • Cloning the disks is the slow part :/
  • If disk type is already 'multiattach' attach it normally

Pros

  • Superfast vm creation!
  • Saves disk space

Cons

  • Creates a dependency between VM disks and original Box disk
  • Potential for slower disk i/o speed
    • Vagrantfile option to clone disk (full copy) on VM creation instead?

Disclaimer

VM & disk manipulation tested on Linux. Performance not tested. Only tested using vbox 4.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment