Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to reduce the size of a Dynamically expanding virtual machine, I have a Windows Xp host machine and a Ubuntu 11.10 guest virtual machine whose maximum size is 8GB which is getting maxed out i dont want to resize the .vdi file , data in the virtual machine is about 3 GB but when we delete some files it does not free space in virtual machine.

Virtual box version 4.1.8 Windows Xp host Ubuntu 11.10 guest

share|improve this question

migrated from Jan 21 '12 at 14:00

This question came from our site for professional and enthusiast programmers.

this isn't a programming related question, flagged to there: – BiAiB Jan 19 '12 at 10:11
up vote 3 down vote accepted

Inside the virtual machine:

  1. defragment
  2. zero the free space with sdelete

Outside the virtual machine

  1. VBoxManage modifyhd Disk.vdi --compact
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.