VirtualBox: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
Line 25: Line 25:
  VBoxManage modifyhd xp-msql-box.vdi --compact
  VBoxManage modifyhd xp-msql-box.vdi --compact
  VBoxManage modifyhd xp-base-box.vdi --compact
  VBoxManage modifyhd xp-base-box.vdi --compact
 
'''OR'''
  VBoxManage.exe modifymedium --compact xp-base-box.vdi  
  VBoxManage.exe modifymedium --compact xp-base-box.vdi  
  VBoxManage modifymedium --compact xp-base-box.vdi  
  VBoxManage modifymedium --compact xp-base-box.vdi  

Revision as of 09:20, 2 November 2018

  1. Run defrag in the Windows Guest
  2. Nullify free space:

Linux Guest

sudo dd if=/dev/zero | pv | sudo dd of=/bigemptyfile bs=4096k
sudo rm -rf /bigemptyfile

OR

telinit 1
mount -o remount,ro /dev/sda1
zerofree -v /dev/sda1

Windows Guest

cleanmgr
del C:\Windows\SoftwareDistribution\Download
del C:\Windows\Temp
del C:\Documents and Settings\<user>\Local Settings\Temp
del C:\Windows\$Nt*Uninstall*
http://cdn.chorke.org/soft/winx/sdelete/sdelete.zip
sdelete.exe c: -z
sdelete.exe d: -z

Compact

VBoxManage modifyhd xp-msql-box.vdi --compact
VBoxManage modifyhd xp-base-box.vdi --compact

OR

VBoxManage.exe modifymedium --compact xp-base-box.vdi 
VBoxManage modifymedium --compact xp-base-box.vdi 
vboxmanage modifymedium --compact xp-base-box.vdi

References