0

I've been trying to follow a myriad of directions all to no avail.

I have a 49.4gb drive that is only using 12.1gb of space. I would like to reduce this drive to 20gb in order for it to be used on a more economical VPS hosting solution (rates vary based on HD space and RAM needed)

enter image description here

Here is one set of instructions I followed that did not work.

However the output seemed to work

c:\Program Files\Oracle\VirtualBox>VBoxManage modifyhd "D:\VMBox\EveServers.info
Alpha Live v.3\EveServers.info Alpha Live v.1-disk1.vdi" -compact
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

Any advice would be appreciated!

2 Answers 2

0

Are you trying to shrink the / logical volume or the block device (virtual disk) that EVEServer PV is based on?

If it is a dynamically allocated virtual disk, you don't need to worry about the physical size of the VDI too much.

VBoxManage modifyhd --compact is used to shrink the VDI image - which removes blocks that only contains zeros (zero out virtual HDD required beforehand). It will shrink a dynamically allocated image, reduce the physical size of the VDI.

You need to use the --resize option to change the capacity of an existing VDI image. However, this works with dynamically allocated disk ONLY, and it is capable to expand ONLY, not shrink.

See => VBoxManage modifyhd

1
  • Well i ran VBoxManage modifyhd --compact but it didnt seem to effect the displayed size of the disk inside Ubuntu. My concern is when I try to upload this image to a VPS host, that they will see the disk as being 50 gigs instead of what I would want, 20gb, and charge me for the larger unneeded space....
    – Guardian
    Aug 8, 2013 at 15:39
0

If you want to change the displayed size inside Ubuntu, you have no option except copying the partition to a smaller virtual disk. Ubuntu will always display the virtual size of the disk - in your case, it's >= 49.4 GB - and it can not know that it occupies less space on the host operating system.

You must log in to answer this question.

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