Learning Academy

The Cure of Ignorance is to Question. MUHAMMAD (PBUH)

VirtualBox

How-to increase disk space of .vmdk virtual machine in VirtualBox?

Problem:

How-to increase disk space of .vmdk virtual machine in VirtualBox?

Solution:

Unfortunately you cannot increase the disk size of .vmdk directly. First of all you have to convert .vmdk file to .vdi file to increase the disk size of your virtual machine in VirtualBox,

Step1: Converting .vmdk file to .vdi

D:\Program Files\Oracle\VirtualBox>VBoxManage.exe clonehd “E:\GreenCloud-VM-1.0.5\Ubuntu-GreenCloud-12.04\Ubuntu-12.04-i686.vmdk” “E:\GreenCloud-VM-1.0.5\Ubuntu-GreenCloud-12.04\Ubuntu-12.04-i6861.vdi” –format vdi

The output will look like

D:\Program Files\Oracle\VirtualBox>VBoxManage.exe clonehd “E:\GreenCloud-VM-1.0.5\Ubuntu-GreenCloud-12.04\Ubuntu-12.04-i686.vmdk” “E:\GreenCloud-VM-1.0.5\Ubuntu-GreenCloud-12.04\Ubuntu-12.04-i6861.vdi” –format vdi

0%…10%…20%…30%…40%…50%…60%…70%…80%…90%…100%
Clone hard disk created in format ‘vdi’. UUID: 42c425d3-7a27-4133-a182-461945a355c3

Step2: Increasing disk size of .vdi file

Now you can increase the disk size of .vdi file, so you have to issue this command.

D:\Program Files\Oracle\VirtualBox>VBoxManage.exe modifyhd “E:\GreenCloud-VM-1.0
.5\Ubuntu-GreenCloud-12.04\Ubuntu-12.04-i6861.vdi” –resize 15000

The output will look like

D:\Program Files\Oracle\VirtualBox>VBoxManage.exe modifyhd “E:\GreenCloud-VM-1.0.5\Ubuntu-GreenCloud-12.04\Ubuntu-12.04-i6861.vdi” –resize 15000
0%…10%…20%…30%…40%…50%…60%…70%…80%…90%…100%

Step3: expending disk space of VM

To resize/expend your hard disk partitions in your VM. You need to use software like Gparted. (http://gparted.sourceforge.net/download.php).
You have to boot your VM with the GParted live CD and allocate the new space to the partition that you want.

Congratulations you have done it, don’t forget to comment.

 

 

Muhammad Shaukat

Content Developer at LearnAcad.com

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Pin It on Pinterest