Privacy Policy
Snippets index

  How to resize a VirtualBox vmdk file

VBoxManage clonehd "source.vmdk" "cloned.vdi" --format vdi
VBoxManage modifyhd "cloned.vdi" --resize 51200
VBoxManage clonehd "cloned.vdi" "resized.vmdk" --format vmdk
The above will resize the hard disk up to 50GB (50 * 1024MB).

To complete things you need to resize the drive too!

To achieve this, you might want to download gparted iso and boot from that iso to resize your drive (select the iso from within the virtualbox settings).

Add a second HD and move /home folder there

Create a new HD from VirtualBox GUI, then:

fdisk -l
fdisk /dev/sdc
n
p
w

mkfs -t ext4 -j /dev/sdc1
mount /dev/sdc1 /mnt/
mv /home/* /mnt

vim /etc/fstab:
    LABEL=cloudimg-rootfs   /        ext4   defaults        0 0
    /dev/sdc1               /home    ext4   defaults        0 0

umount /mnt
mount -a