Let’s say we want to resize the VDI to 60GB

  • Make a backup of the VDI file you want to resize
  • "c:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyhd my-favourite-os.vdi --resize 61440
    
    
  • Download gParted ISO and add it as LiveCD to your virtualbox machine
  • Boot gParted from LiveCD ISO
  • Resize partition.
  • Remove gParted iso
  • Boot the virtual machine
  • Check partitions by ‘df -h’

If you are using Logical Volume Manager then extra steps needs to be done:

  • Run LVM tools: (use slightly less size for LVM then for disk drive and take into account swap size)
    lvs 
    lvresize volume-group-name/logical-volume-name --size 56G
    #example:
    lvresize fedora_fedora-xfce/root --size 56G
    #
    resize2fs /dev/mapper/volume-group-name-logical-volume-name 56G
    #example:
    resize2fs /dev/mapper/fedora_fedora--xfce-root 56G
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s