2016/03/13

Extending the vmdk file size


I had some free time to try the OBI12c installation.  While doing so, I downloaded the Oracle DB12c VM image from OTN and was installing OBI 12c on top of it.

The Oracle DB VM is delivered with 45G vmdk files, which was not enough to install OBI 12c, half-way through the process I encountered the "not enough space on the disk" error.

Here I am listing the steps required for extending the vmdk file size.


  • Shutdown the Virtual Machine.
  • We can not directly extend the vmdk file size, so first clone the vmdk file into vdi format.    
  • Navigate to the directory where the Virtual Box is installed and start the manage virtual box command as below:
  • In my case, the command is available under -  C:\Program Files\Oracle\VirtualBox

.\VBoxManage.exe clonehd B:\db\OracleDB_VM_BI12c\OracleDB_VM_BI12c-disk1.vmdk B:\db\OracleDB_VM_BI12c\OracleDB_VM_BI12c-disk1.vdi -format vdi

VBoxManage command takes the below parameters

    • clonehd - parameter to tell the command to copy the disk
    • <original vmdk file>
    • <target vdi file name>
    • followed by target file format
The progress for the conversion process is displayed and a successful conversion message is displayed once the process completes successfully

0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

Clone medium created in format 'vdi'. UUID: 1b9ed13b-98c8-4483-97bb-cbf8906ecfc5


  • Now , resize the vdi file to adjust the size to the required level
.\VBoxManage.exe modifyhd B:\db\OracleDB_VM_BI12c\OracleDB_VM_BI12c-disk1.vdi --resize 76800

The "modifyhd" command parameter "resize" does the trick for extending the file size.  The resize parameter comes in 2 flavours:
--resize
--resizebyte
  • Once the resize of vdi file is complete, now convert the file back to vmdk format using the "modifyhd" command.
.\VBoxManage.exe clonehd B:\db\OracleDB_VM_BI12c\OracleDB_VM_BI12c-disk1.vdi B:\db\OracleDB_VM_BI12c\OraDB_BI12c_VM-disk1.vmdk -format vmdk


  • Verify the file size in Virtual box and you should see the increased file size, in my case originally the file size was 14G and now it is 75G.

No comments:

Post a Comment

File Handling with Python

This little utility is for copying files from source to target directories.  On the way it checks whether a directory exists in the target, ...