Resize VDI from 200GB to less

Discussions about using Windows guests in VirtualBox.
Post Reply
RobRodrigues
Posts: 1
Joined: 24. Oct 2014, 08:50

Resize VDI from 200GB to less

Post by RobRodrigues »

Hi all.
My system is a Windows 8.1 host in wich i have severall guests working.
One of those guest is my old laptop backup on wich i created at time a vdi file with 200gb dinamically alocated.
So in the guest machine i unninstalled all programs, remove temp files, defrag using auslogic defrag and also i booted the vm with hirens boot cd and did another defrag and also a sdelete to clean all the free space.
After that i resized the partitions using gparted and now the two partitions inside the vm are using only 52Gb and 6gb
but the disk inside the vm is seen as having 200gb capcity and on the host using the compact option is still at size 123 gb.
I have attached two images to better clarify this situation.

I just wanna put the vdi with the size that i have now on the vm .

Best regards.
Attachments
diskmanagement-vm.jpg
diskmanagement-vm.jpg (33 KiB) Viewed 1241 times
diskinfoonhost.jpg
diskinfoonhost.jpg (85.38 KiB) Viewed 1241 times
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Resize VDI from 200GB to less

Post by socratis »

Take a look at the CloneVDI tool by mpack and its compact option at viewtopic.php?f=6&t=22422
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
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: Resize VDI from 200GB to less

Post by mpack »

Neither sdelete nor "VBoxManage modifyhd -- compact" are effective if you have data on unpartitioned areas of your drive - which are vast since you used GParted to shrink the partitions. It very much depends on the order in which you did things. CloneVDI was always your best option, since it doesn't need such kludges to recognize unused areas of a drive.
Post Reply