Resize the VirtualBox image hard drive

When your VirtualBox virtual machine’s hard drive fills up Virtual Box does not provide a user interface to extend it. If you run VirtualBox on a Macintosh workstation

  1. Stop the virtual machine
  2. On a Macintosh workstation, the virtual machine image files are located at ~/VirtualBox VMs
  3. The name of the subdirectory and the image file matches the name of the machine
  4. Open a terminal window
  5. Navigate to the VirtualBox application directory
    $ cd /Applications/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents/MacOS
  6. Check the current size of the hard drive. Place a backslash in front of every space character in the path.
    VBoxManage showhdinfo ~/VirtualBox\ VMs/Win\ 10/Win\ 10.vdi
  7. Resize the drive. Place a backslash in front of every space character in the path, and specify the size in megabytes, so 100 GB is approximately 100000 MB
    VBoxManage modifyhd --resize 100000 ~/VirtualBox\ VMs/Win\ 10/Win\ 10.vdi

    UMG/Win\ 10\ UMG.vdi
    0%…10%…20%…30%…40%…50%…60%…70%…80%…90%…100%

  8. Check the size again to make sure the resizing succeeded.

Extend the volume on the enlarged partition

Windows 10 virtual machine

  1. Start the virtual machine
  2. Click the Start button and the Gear icon to start the control panel
  3. Type admin into the search box and select Administrative Tools
  4. Double-click Computer Management
  5. Select Disk Management
  6. Right-click the partition and select Extend Volume
  7. Click Next on every page of the wizard to extend the volume to the maximum available size.

Leave a Reply