How to increase actual size of hard disk in VirtualBox?

After I did steps shown here I've noticed in VM's settings that I only increased virtual size but actual size remain the same. How to increase it also?

enter image description here


Solution 1:

When you increase the virtual disk size, you typically have to increase some partition size within the OS's actual file system in order to make use of the added space. However, because you've set it to "dynamically allocated", it will grow as used. See http://www.virtualbox.org/manual/ch05.html which says:

"For more flexible storage management, use a dynamically allocated image. This will initially be very small and not occupy any space for unused virtual disk sectors, but will grow every time a disk sector is written to for the first time, until the drive reaches the maximum capacity chosen when the drive was created. While this format takes less space initially, the fact that VirtualBox needs to expand the image file consumes additional computing resources, so until the disk file size has stabilized, write operations may be slower than with fixed size disks. However, after a time the rate of growth will slow and the average penalty for write operations will be negligible."

Solution 2:

This is still a valid question to this day, I was a bit confused. I expanded mine from 10GB to 20GB. But after opening the VM, nothing changed. This is because it was expanded as UNNALOCATED SPACE.

All I had to do, after expanding in VirtualBox settings, was:

  1. Open Disk Management on windows guest
  2. (now there will be unallocated 10GB because I expanded)
  3. right click the 10GB in-use partition
  4. click expand
  5. confirm dialogs etc. that's it

Solution 3:

Put it simple, if you copy a big file, say, 1 GB size to the virtual disk, the actual size will approximately increase 1 GB. To consume the diskspace will increase the actual size.