resize disk capacity VDI

5,703

Solution 1

Resize of VDI is supported, but you can only make hard disks bigger. You tried:

VBoxManage.exe modifyhd "C:\Documents and Settings\User\VirtualBoxVMs\windows\windows.vdi" --resize 40

That means you try to make a 40 MB harddisk, your harddisk is bigger, though. Try:

VBoxManage.exe modifyhd "C:\Documents and Settings\user\VirtualBo x VMs\windows\windows.vdi" --resize 40000

This make new size 40 GB.

Solution 2

I know this is an old question but it just happened to me today and made me spent a lot of time searching for an answer, so I decided to post it here in case it happens to someone else.
I was going to add a comment to @justTryToHelp's answer but I don't have enough points to do so.

So, as stated by @Steve, disk as to be dynamic.
The "--resize" value must be set to [your_current_disk_size] + [space_to_add].
Ex.: You created a disk with 25GBs and you need additional 9GBs => (25 + 9) * 1024= 34816
cmd => VBoxManage modifyhd YOUR_HARD_DISK.vdi --resize 34816


Hope this helps

EDIT
Don't forget to extend your disk in disk management.
Check this link for more information.

Solution 3

Your vdi format does not support resizing. Maybe you could try cloning it to a new, larger vdi, possibly with a format that does support resizing. Have a look at the clonehd option of VBoxManage here http://www.virtualbox.org/manual/ch08.html#vboxmanage-clonevdi

Then you can use the new, larger vdi in your virtual machine.

Share:
5,703
Ellouze Anis
Author by

Ellouze Anis

Updated on September 18, 2022

Comments

  • Ellouze Anis
    Ellouze Anis over 1 year

    I use virtualBox version 4.2.6 and I install windows server 2008. the issue is when I was working with this windows a message is displayed said that the capacity of disk is limited. so I want to know if there is a method to increase the disk size. thank

    • Ellouze Anis
      Ellouze Anis about 11 years
      i try this method : VBoxManage modifyhd YOUR_HARD_DISK.vdi --resize SIZE_IN_MB but it doesn't work
    • Steve
      Steve about 11 years
      please provide the error message you get when you attempt to resize the disk
    • jet
      jet about 11 years
      I guess VM guest OS is not running
  • Ellouze Anis
    Ellouze Anis about 11 years
    the disk is set to dynamic
  • Steve
    Steve about 11 years
    can you paste the full command you are running.
  • Ellouze Anis
    Ellouze Anis about 11 years
    VBoxManage.exe modifyhd "C:\Documents and Settings\user\VirtualBo x VMs\windows\windows.vdi" --resize 40 0%... Progress state: VBOX_E_NOT_SUPPORTED VBoxManage.exe: error: Resize hard disk operation for this format is not implemented yet!
  • Ramhound
    Ramhound over 9 years
    This is an exact duplicate of justTryToHelp's answer.
  • Fetchez la vache
    Fetchez la vache over 9 years
    @Ramhound. I'd assumed that the initial "resize 40" was in all likelihood smaller than the current size of the vdi, hence the error. In my case the new size was larger and failed. Upped it even larger and it worked again. I can see why you may think it's similar however.
  • Ramhound
    Ramhound over 9 years
    You list the exact same commands. The answer explains what the 40 stood for, 40 MB, so I am not sure where your confusion was. As for the error message, its clearly the incorrect message, you likely tried to shrink the hdd smaller than its physical size on the host operating system.
  • Fetchez la vache
    Fetchez la vache over 9 years
    What other command would I list? That is the command. As for the size I initially had the error attempting to increase a 17.5gb vdi to 25gb. Anyway, thank you for at least stating why you'd downvoted, most don't have the decency / spine to.