Wednesday, December 28, 2016

Cloning a VirtualBox VM to an external drive under Windows 7

If you want to create a clone of a VirtualBox VM where the clone will be on an external drive, this can be done without performing any additional copying.

  1. Ensure the external drive you wish to use is mounted, you have enough disk space for the clone, and that you have an easy to find directory to store your clones(s) in. For example, I have W:\VirtualBoxVMs\
  2. Shutdown the VM to be cloned.
  3. In the VM VirtualBox Manager application, click File -> Preferences, and select the General tab.
  4. Make a note of the current Default Machine Folder that your VMs are in, e.g. C:\Users\YourUserName\VirtualBox VMs\
  5. Change the Default Machine Folder from the current one to the external directory you want the clone to be placed in. (In this example, W:\VirtualBoxVMs\).
  6. Right click the VM you wish to clone and select "Clone"
  7. When prompted for Clone Type select "Full clone" and click the Clone button
  8.  Cloning will take a while, so do something else...
  9. When the cloning is finished, verify that the clone boots and runs correctly by starting it from the VirtaulBox VM Manager.
  10. Shut down the clone.
  11. Perform steps 3 and 5 again, setting the Default Machine Folder back to the original value you made a note of in step 4.
  12. You can now safely remove the external drive if you want. (The clone will be marked as inaccessible if you dismount the drive, but will be automatically re-detected when the drive is mounted again in the future.)