Tech Notes, Virtual Machines

Just my notes regarding VMs in VirtualBox

Increase Size of VirtualBox VDI (hard disk) File

VBoxManage modifyhd Compiler.vdi –resize 10240 <size in MB, 10240 being 10GB>

Then, boot VM with GParted Live CD (or ISO).

  1. Take screen shot of existing partition scheme with local (not VM) screen shot tool.
  2. Record current Linux-Swap and extended sizes (409.00MiB)
  3. Delete Linux-Swap partition
  4. Delete Extended partition
  5. Select the primary logical partition and click “resize/move”
  6. Increase this partition size so the “Free space following” is 1MB more than the initial Linux-Swap partition size.
  7. Click “Resize/Move” to apply.
  8. Select the unallocated space and click New.
  9. Create as “Extended Partition” and be sure the New Size is the entire remaining free space.
  10. Click “Add”.
  11. Select the unallocated space within the Extended partition and click “New”.
  12. Create as “Logical Paritition” and file system “linux-swap”.
  13. Click “Add”.
  14. Click “Apply”.
  15. Click Exit and reboot the VM – don’t boot into GPartLive again

Clone / Create a Duplicate of a VDI Hard Disk File

  1. Create a new VM system with no hard drive
  2. Copy the current VDI file from the existing VM and put this in the new VM’s directory
  3. Recreate the duplicate VM’s VDI file’s uuid:
    1. cd to-  C:\Program Files\Oracle\VirtualBox\
    2. Run the tool w/ commands “vboxmanage internalcommands sethduuid filename
      ie: vboxmanage internalcommands sethduuid “C:\Documents and Settings\User\VirtualBox VMs\vm directory\vm hdd file.vdi”
  4. Attach the ‘fixed’ VDI file to the new VM.

Tech Notes, Virtual Machines
Scroll to top