VirtualBox: Migrating VM Default Folder

  • This process is actually fairly straightforward and the pain involved is proportionate to the number of VMs one has in VirtualBox

Remove ALL VMs

  • This will remove vbox file associations and links so things are closed & insulated from the move

Clean out Virtual Media associations (hdd & cdrom isos)

  • This might cause some headache, but just record the values & any snapshots

Move VM Folder

  • With the associations within vbox removed, it is safe to move the VM Folder
  • MOVING is orders of magnitude FASTER than COPYING or EXPORTING/IMPORTING appliances & clones

Update Preferences > Default VM Folder

  • Now update the vbox Preferences to reflect the new Default Virtual Machine folder
  • VMs make relative references to dependencies, so long as the artifacts INSIDE the VM folder remain the same, no issues should arise



VirtualBox: Resize vdmk drive

  • Clone the vdmk image to vdi image
  • Resize
  • Clone back to vdmk

VBoxManage Commands

VBoxManage clonehd "source.vmdk" "cloned.vdi" --format vdi
VBoxManage modifyhd "cloned.vdi" --resize 51200
VBoxManage clonehd "cloned.vdi" "resized.vmdk" --format vmdk

The above will resize the hard disk up to 50GB (50 * 1024MB).


C:\Program Files\Oracle\VirtualBox>VBoxManage.exe clonehd "C:\a\v\vm\nodes.win7\
w7.devbox2018\W7.Admin.Free.1-disk1.vmdk" "w:\W7.Admin.Free.1-disk1.vdi" --forma
t vdi
Subscribe to VBox