Virtualbox Disk Reduce or Disk Compact Rumi, February 9, 2016February 9, 2016 You have to do the following steps: 1. Run defrag in the guest (Windows only) Nullify free space: With a Linux Guest run this: sudo dd if=/dev/zero of=/bigemptyfile bs=4096k sudo rm -rf /bigemptyfile Or: telinit 1 mount -o remount,ro /dev/sda1 zerofree -v /dev/sda1 Or sudo apt-get install secure-delete sfill -f -z -l -l -I -v / With a Windows Guest, download SDelete from Sysinternals and run this: sdelete –z 2. Shutdown the guest VM 3. Now run VBoxManage’s modifyhd command with the –compact option: With a Linux Host run this: vboxmanage modifyhd /path/to/thedisk.vdi --compact With a Windows Host run this: VBoxManage.exe modifyhd c:\path\to\thedisk.vdi --compact With a Mac Host run this: VBoxManage modifyhd /path/to/thedisk.vdi --compact This reduces the vdi size. Src: http://superuser.com/questions/529149/how-to-compact-virtualboxs-vdi-file-size http://marianposaceanu.com/articles/how-to-reduce-the-size-of-your-vms Related Virtualbox virtualbox
Install Virtualbox Extension pack in command line December 5, 2011December 14, 2011 – Open a command prompt as Administrator : Right-click on “Accessories\Command Prompt” and choose : Run As Administrator. – CD C:\Program Files\Oracle\VirtualBox – Make sure the ExtensionPack is located in the same directory – C:\Program Files\Oracle\VirtualBox>VBoxManage.exe extpack install Oracle_VM_Virt ualBox_Extension_Pack-4.0.4-70112.vbox-extpack C:\Program Files\Oracle\VirtualBox>VBoxManage.exe extpack install Oracle_VM_VirtualBox_Extension_Pack-4.0.4-70112.vbox-extpack 0%…10%…20%…30%…40%…50%…60%…70%…80%…90%…100% Successfully installed “Oracle VM… Read More
VBoxHeadless – Running Virtual Machines With VirtualBox 4.0 On A Headless CentOS 5.6 Server December 14, 2011December 14, 2011 This guide explains how you can run virtual machines with VirtualBox 4.0 on a headless CentOS 5.6 server. Normally you use the VirtualBox GUI to manage your virtual machines, but a server does not have a desktop environment. Fortunately, VirtualBox comes with a tool called VBoxHeadless that allows you to… Read More
Reinstall VirtualBox on Ubuntu & CentOS January 8, 2020 For Ubuntu To remove virtualbox sudo dpkg –list virtualbox-* sudo apt autoremove –purge virtualbox* dpkg -l virtualbox* | grep ^i Remove all PPAs from sources.list and source.list.d directory mkdir ~/apt-tmp sudo mv /etc/apt/sources.list.d/* ~/apt-tmp Make sure there is nothing except official repositories sources in /etc/sources.list. And update your sources: sudo apt… Read More