Reclaim un-partitioned space

Discussions about using Windows guests in VirtualBox.
Post Reply
CGarces
Posts: 1
Joined: 14. Jun 2016, 12:30

Reclaim un-partitioned space

Post by CGarces »

Hi!

I'm using a Windows 7 hot with an old Windows 2000 guest.

The guest contains a 8 GB NTFS partition, and I have used the GParted Live CD to reduce the partition to 6.5 GB.

Now I have 1.5GB un-partitioned space on my guest, but I can't reduce the size of the .vdi file

I have tried

Code: Select all

"c:\Program Files\Oracle\VirtualBox\VBoxManage.exe" clonehd Current.vdi new.vdi
and also

Code: Select all

"c:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyvdi Current.vdi --compact
But booth give me a 8GB .vdi file.

How can I reclaim that unused space?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Reclaim un-partitioned space

Post by mpack »

Clone it with CloneVDI. Be sure to enable the compaction and "Keep UUID" options. The clone VDI is a direct replacement for your original.

Note that this will recover the unpartitioned space inside the VDI, reclaiming it for the host, but the logical size of the virtual drive will remain 8GB.
Post Reply