Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 stackoverflow.com 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: superuser.com –  BiAiB Jan 19 '12 at 10:11
add comment

1 Answer

up vote 3 down vote accepted

Inside the virtual machine:

  1. defragment
  2. zero the free space with http://technet.microsoft.com/en-us/sysinternals/bb897443 sdelete

Outside the virtual machine

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

Your Answer

 
discard

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.