Edit: I have updated how-to for newer version of Ubuntu and VirtualBox.
Instructions for:
- Sun xVM Virtual Box 2.2.4
- Windows XP SP3 as VM_host
- Ubuntu 9.04 as VM_guest
1. Install zerofree program:
Code:
sudo apt-get install zerofree
2. Reboot Ubuntu.
3. Press <Esc> to enter grub menu.
4. From grub menu select "recovery mode".
5. Select "root" from Recovery Menu.
6. Check to see disk names:
7. From previous command in left corner there are /dev/... devices in my case /dev/sda1. Mount this disk as read only:
Code:
mount -n -o remount,ro -t ext2 /dev/sda1 /
8. Make zeros:
9. Shutdown Ubuntu:
10. From Windows host execute:
Code:
"C:\Program Files\Sun\xVM VirtualBox\VBoxManage" modifyhd vdi_file.vdi compact
Regards,
Abcuser
Bookmarks