4

I am trying to increase the available disk space of the VM, but no use, tried many things written here and on other websites, mainly saying that this is possible through the Virtual Media Manager , I followed the steps:

File > Virtual Media Manager > ' but here I can't find a new option to add new virtual disk as proposed by this link: How to Increase Hard Disk Size with Virtualbox '

and the other option I know, is to go to settings of the VM from the Virtual box, and choose Storage, but there again, the option to increase the memory is not available -highlighted-.

I am using linuxmint-13-cinnamon-64bit with 8GB fixed storage.

*I can't add screenshots cause I don't have enough reputation.

4
  • 3
    Can you explicitly clarify if you want to add memory (RAM) or disk space?
    – mtak
    May 22, 2014 at 12:38
  • sorry, disk space.
    – Nour
    May 22, 2014 at 13:16
  • Yes you can add screenshots, indirectly. Upload them to imgur.com or imageshack.com and put the link in your mail. One of the readers with enough rep will edit your question and put the pictures in.
    – Jan Doggen
    May 22, 2014 at 13:19
  • And please edit your question (title) to tell us what you really want. First you talk about memory, then you talk about virtual disk size. Which is it?
    – Jan Doggen
    May 22, 2014 at 13:20

1 Answer 1

10

Increasing the memory of the VM is trivial: go to System -> Motherboard. You see Base Memory, you can set it to whatever you wish either by entering the explicit number, or by working on the graphical cursor. Now start your VM and you are done.

Increasing the disk size is just a bit trickier: issue the command

  VBoxManage modifyhd /path/toYourVM/disk.vdi --resize 50000

You must know where your VM's disk is (generally /home/yourName/VirtualBox\ VMs/YourVMName/YourVMName.vdi); the above command sets the new disk size to 50GB (default units, in the command, are MB).

Now comes the tricky part: the newly increased disk must have its partitions resized, so as to take advantage of the new size. Otherwise, the newly allocated space will simply appear as empty, i.e., not belonging to any partition.

But, as you know, an intervention of this kind cannot be done from the same machine which is using the disk. This is true for real pcs, but also for VMs. So now you take an iso image of a Linux distribution (Ubuntu?), put it into the virtual CD/DVD drive, and boot the VM from this, not from the HDD. This way the newly enlarged HDD is available for the operation to follow. You start GParted (by typing

  sudo gparted

in a terminal, if it is not already installed you will have to install, for instance by means of

  sudo apt-get install gparted

in Debian-like systems), and resize the partitions by taking advantage of the newly added space, as it best suits you.

When you are done resizing the partitions, bring the VM don, extract the Linux iso from the CD/DVD virtual driver, start from HDD, and you are done.

EDIT:

You are perfectly right, the error message means you have a fixed disk, rather than a dynamic one. For a fixed disk, the resize operation is not supported, but...

we can first convert the fixed disk to a dynamic one,

  VBoxManage clonehd  OldDisk.vdi NewDisk.vdi --variant Standard 

where --variant Standard is the keyword that transforms a fixed to a dynamic disk.Notice also that cloning means that your original disk will remain intact, and thus you will not lose data, a certainty that we do not enjoy with physical (as opposed to virtual) disks.

Now you can apply the operations previously discussed to the NewDisk.vdi, making sure that you are not loading the the OldDisk.vdi at all. This is like unplugging the old sik, leaving it in the drawer, while all operations are applied to the new one.

When you are done with the resizing, and you have persuadedyourself that everyything is in order, you may (if you wish) transform back new, expanded NewDisk into a fixed disk:

 VBoxManage clonehd NewDisk.vdi NewDiskFixed.vdi --variant Fixed

This is not necessary, just do it if you think the larger speeds are what you are after.

3
  • Progress State: VBOX_E_NOT_SUPPORTED VBoxManage.exe: error: Resize hard disk operation for this format is not implemented yet!
    – Nour
    May 22, 2014 at 13:51
  • probably the problem is because I use 'fixed size'.
    – Nour
    May 22, 2014 at 14:01
  • @Nour Please see my Edit May 22, 2014 at 15:32

You must log in to answer this question.

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