SolarEclipse

Howto resize a Dynamical VirtualBox Disk with a Linux-Guest

Howto resize a Dynamical VirtualBox Disk with a Linux-Guest

If you want to resize a VirtualBox Disk on a Windows-Host with a Linux-Guest (with LVM-Disks) follow the following steps:

Check the type of your Disk, it must be dynamically allocated storage

351665157-9ee562b2aa86c7f207e58b4ddecf4e09970c4d71c6f0b677c1cf0baa4a70bffe.png
Actual size of the Disk = 117.56GB

  • Insert a SystemRescueCd Live Image into the CDROM of your Linux-Guest-VM
  • Boot up your VM
  • Detect all available partitions and LVM-Volumes
    • fdisk -l

351665157-7783a7da2be5315d65173ddf6ce045bea5b39c63499ae3cc8fdcb25c384f73d6.png

  • Empty space by overwriting with zeros with the tool zerofree in every detected partition and LVM-Volume.
    • zerofree -v /dev/mapper/ubuntu--vg-root

351665157-6bcb1040890da5592b580772e04e8123dbc03f1af18f7ce5ebfa5a73eeabead8.png

  • Shutdown your VM and open your cmd.exe on your Windows-Host. Change to the directory of your VirtualBox installation folder.
    • VBoxManage.exe modifyhd --compact "C:\Path\to\your\vdi-file.vdi"
  • Done

351665157-632131b87700a0ab7703db446be3893928cae73cbf1e3eff1c3213222e70f344.png
New size of the Disk 34.76GB

Success!!

 

Did you enjoy this article?


SolarEclipse
SolarEclipse

Believing that crypto is changing our world. To the better or to the worse? We will see!


SolarEclipse
SolarEclipse

In this blog, I write about my findings in the crypto world.

Publish0x Publish0x

Reward the author with $0.01 in crypto, and earn yourself as you read!

20% to author / 80% to me.
Rewards are FREE. Publish0x pays them, not you.

Page not displaying correctly?