Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The title says it all.

I created the disk and now I would like to increase its size. I know I could add a new one, but I don't want to.

The guest os in question is Ubuntu 11.04

share|improve this question
This is the community's response to it. – new123456 Jul 2 '11 at 19:22
that's from 2007. many years have passed. – hexa Jul 2 '11 at 20:29

There is a very good blog entry on this at

Basic instructions, to resize to 30G:

  1. Shutdown any VM using the disk.

  2. "c:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyhd c:\path\to\ubuntu_big.vdi --resize 30000

  3. Download and boot to a Gparted "live CD" ISO (necessary because you can't adjust the partitions on a drive that you have mounted--for instance your boot drive). Linux live CD might work also.
  4. (if you have a swap partition) follow the instructions on the blog post to "move it to the right". If that doesn't work (it doesn't let you resize it--the left arrow doesn't work) then your swap partition might be contained in a secondary partition. In this case right click on the dashed cyan line surrounding the swap partition, and choose move/resize. Now "move" it to also include all the unallocated space (it won't let you move the left-most side yet) and click ok. Then right click on the "internal" partition (now located at the very left most end of the a larger partition), and "move/resize" it to the very end of that partition (you can just click in the middle and drag it to the right). Now move/resize the external partition "all the way to the right" (it lets you now). This should effectively move your unallocated space "next to" your main partition.
  5. Resize your main partition to also include the unallocated space next to it.
  6. Click "apply"
  7. Reboot to your main OS, you should see the new space available.
share|improve this answer
I know it's a bit long, but could you summarize the most important steps here, please? – slhck Mar 14 '12 at 9:26

There's a section in the VirtualBox Manual which tells you how to resize a VM Hard Disk using a cmd-line tool. Would this be any good?

share|improve this answer
No it isn't :( After I installed the virtualbox-ose pack, VBoxManage list hdds show no HDs, so I can't use it. Maybe this could work if I had another virtualbox, and I could operate on the .vdi file directly. Thanks for the tipo tho – hexa Jul 2 '11 at 18:46

My root (/) file filesystem was full on Guest VM with OS of Oracle Enterprise Linux (OEL) 7 created on Oracle Virtualbox. I believe similar steps should be present for other Linux flavors like Redhat, Fedora, CentOS or Ubuntu.

To increase disk space I followed below steps:

  1. I powered off the VM. Enabled EFI for the VM settings in Virtual Box.
  2. Increase size of virtual disk using below command:

    C:\Program Files\Oracle\VirtualBox\VBoxManage.exe modifyhd [absolute path to file] --resize [size in MB]
  3. Downloaded the Gparted live iso from here

    Mount Gparted iso in Optical Drive of the VM.

  4. Start the VM and booted to Gparted live OS. Default settings worked for me. Increase disk space using the Gpart.
  5. Shutdown the VM
  6. Revert EFI in VM Settings
  7. Login to VM. Su to root user
  8. Increase LVM using below command (assuming root volume is ‘/dev/ol/root‘)

    lvextend -L+10G /dev/ol/root 


    lvextend -l +100%FREE /dev/ol/root 
  9. Increase the file system size:

    xfs_growfs  /
  10. Verify using:

    df -k /

Hope it helps!

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .