Virtualbox

From Max's Wiki
Jump to navigation Jump to search


Enlarge Disk

Please note that disk has to either be a vhd or vdi file before resizing

  1. CD into VirtualBox installation folder
cd “C:\Program Files\Oracle\VirtualBox”
  1. Enlarge disk
VBoxManage modifyhd “C:\VirtualBox VMs\Server 2016\Server 2016.vdi” --resize 50000
  1. Start machine
  2. Log in and expand the disk through Disk Management

Convert VDI/VHD

  1. CD into VirtualBox installation folder
cd “C:\Program Files\Oracle\VirtualBox”
  1. Convert from VHD to VDI
VBoxManage clonehd source.vhd target.vdi --format vdi
  1. Convert from VDI to VHD
VBoxManage clonehd source.vdi target.vhd --format vhd

Failed to open the disk image (Cannot register the hard disk 'F:\Virtual Machines\Server 2016 WAP\Server 2016 WAP.vhd' {a771bc82-22ab-4df1-a4ef-d44b2c81924d} because a hard disk 'C:\Virtual Machines\Server 2016\Server 2016.vhd' with UUID {a771bc82-22ab-4df1-a4ef-d44b2c81924d} already exists.)

  1. CD into VirtualBox installation folder
cd “C:\Program Files\Oracle\VirtualBox”
  1. Change UUID on the file
VBoxManage internalcommands sethduuid <file.vdi>