Resize partition of Windows 7 running on VirtualBox with dynamically allocated storage

30,270

You can only resize disks if they are not part of a VM that uses snapshots.

If you are using snapshots, you can easily clone the state to a new VM and hard disk, and resize that one. VirtualBox 4 now supports cloning from the GUI, so it's super easy.

VBoxManage - modifyhd

Here's a helpful walk through of the whole process, Resize and Expand a Virtualbox Hard Drive and Media in 4 Steps

Share:
30,270

Related videos on Youtube

Nicolas Raoul
Author by

Nicolas Raoul

I am Nicolas Raoul, IT consultant in Tokyo. Feel free to copy/paste the source code from my StackExchange answers, I release it to the public domain.

Updated on September 18, 2022

Comments

  • Nicolas Raoul
    Nicolas Raoul over 1 year

    I run Windows 7 inside VirtualBox.

    I resized the disk of Windows 7 from 25 GB to 50 GB:

    VBoxManage modifyhd Windows\ 7\ Pro.vdi --resize 50000
    0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
    

    VirtualBox size

    PROBLEM: I can' grow the partition, neither with Windows 7 itself nor with GParted:

    Disk management

    GParted

    It looks like VirtualBox does not tell the client OS about the new size.
    What additional step is necessary?

  • dalf
    dalf about 7 years
    as Ryan said, my VM had snapshots and I couldn't extend the partition in Windows. I ended up cloning the VM (not just the disk). See command "vboxmanage clonevm". The clone contained only the current state (no snapshots), so I was able to extend the partition.
  • Nicolas Raoul
    Nicolas Raoul over 6 years
    That works! Note: After cloning and resizing the disk, open the VM's settings, remove the former disk and add the new one.
  • SuperSafie
    SuperSafie over 5 years
    Also it seems to not be available for VMDK disk images