2

I created a virtual disk using WindowsXP inside VirtualBox, the host is OSX.
Initially I created the disk 20Gb, in 2 partitions, each of 10Gb. Because I did not need it, I dropped the 2nd partition, which is now reported as empty space.

How can I shrink the disk to only the 1st partition, saving 10Gb and shrinking the .vdi too?

1

1 Answer 1

1

First of all do a backup of your image disk: it's always wise and safe.
Then you can use VBoxManage modifyhd with this syntax

VBoxManage modifyhd <absolute path to file> --resize <size in MB>

In your case I think the commandline should be

VBoxManage modifyhd <absolute path with the name and extension> --resize 10240

Reference :

1
  • The command: "VBoxManage modifyhd /E/VirtualBox/Kaibab.vdi --resize 10400" failed with: Progress state: VBOX_E_NOT_SUPPORTED VBoxManage: error: Resize hard disk operation for this format is not implemented yet! I guess my disk was fixed at creation. I think I'm going to create it all over again to the right size. Thanks anyway. ;JOOP!
    – Sciuriware
    Apr 18, 2015 at 13:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .