Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How do I resize my virtual disk space? I'm running Ubuntu 10.04 LTS with only 8GB (which is the default allocated size) but it's running low on disk space. Thanks.


Here's the screenshot. Thanks to @Suhaib for the +points in reputation.

How to Resize Virtual Disk Image

share|improve this question
    
virtual disk space, you mean ubuntu is running as a guest in virtual box? –  Sam Nov 20 '12 at 18:04
    
yes.. only 1GB left, there's a window that pops up, giving a warning.. –  Jane Nov 20 '12 at 18:10
1  
possible duplicate: askubuntu.com/questions/88647/… –  Suhaib Nov 20 '12 at 18:14
    
@suhaib, that is running on WinXP..mine is Ubuntu.. –  Jane Nov 20 '12 at 18:20
1  
I already resolved it, but I can't upload a screenshot of what I did..need to earn more than 10 reputation.. –  Jane Nov 21 '12 at 17:44
show 4 more comments

2 Answers

up vote 4 down vote accepted

The last 2 comments in this forum greatly helped me, which said:

Oxwivi

Do I do that on Windows? Because if I do that it says: 'vboxmanage' is not recognized as an internal or external command, operable program or batch file.

sean.dybob June 8th, 2011, 09:07 AM

vboxmanage is found inside the virtualbox installation directory, should be inside C:\Program Files\Oracle\VirtualBox\ directory.

These are the steps I did (Host OS is Windows):

1) File >> Virtual Media Manager >> Select VDI >> Release

2) Copy the location of the VDI inside the Properties box. In my case, it's:

C:\Users\Se7eN\VirtualBox VMs\LUCID_LYNX\JH.vdi

3) Go to Google.com and type your desired size in gigabyte to be converted to megabyte. For example: 10 GB = MB

The result would be 10240.

4) Open the command line and type/copy this:

cd C:\Program Files\Oracle\VirtualBox

This is the location of the VirtualBox software you installed in your computer.

Notice that you have two VirtualBox folders, 1) "VirtualBox VMs", which contains your virtual machines, and 2) "VirtualBox", which is the program.

5) Lastly, run:

VBoxManage modifyhd YOUR_VDI_LOCATION --resize SIZE_IN_MEGABYTES

VBoxManage modifyhd C:\Users\Se7eN\VirtualBox VMs\LUCID_LYNX\JH.vdi --resize 10240

I have screenshots for all of the above steps, but need to earn more than 10 reputation to upload the image. Hope this helps. Thanks.

share|improve this answer
    
Hey, thanks for the mention. Fixed thread link. :) –  Oxwivi Nov 25 '13 at 14:25
add comment

Thanks for sharing. The downside. It is not implemented for VMDK file type, yet.

PS C:\Program Files\Oracle\VirtualBox> .\VBoxManage.exe modifyhd "C:\Users\John\VirtualBox VMs\Ubuntu UZH DS\-disk2.vmdk" --resize 15360
VBoxManage.exe : 0%...
At line:1 char:17
+ .\VBoxManage.exe <<<<  modifyhd "C:\Users\John\VirtualBox VMs\Ubuntu UZH DS
\-disk2.vmdk" --resize 15360
    + CategoryInfo          : NotSpecified: (0%...:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

Progress state: VBOX_E_NOT_SUPPORTED

VBoxManage.exe: error: Resize hard disk operation for this format is not implem
ented yet!

However, you could first transform the VMDK to VDI and then resize the VDI container.

VBoxManage clonehd original.vmdk new.vdi --format VDI

Analog command applies for Linux.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.