Oracle has provide sets of Prebuilt VM for developers can try. For this purpose, i have downloaded the smallest Prebuilt VM “Database App Development that contains Oracle 11gR2 and it runs on Oracle Linux. By default, this Prebuilt VM comes with 2 of 12G hdd settings. the /home/ already occupies 7.5G which we cannot extend our database for future development environment, like having Webcenter Suit on that Prebuilt VM.
The Prebuilt VM file would be Oracle_Developer_Day.ova
The software that use to expand the partition in LINUX is GParted ,gparted-live-0.14.1-6-i486.iso
The application for expanding the storage in VirtualBox is VBoxManage and the command involved are clonehd and modifyhd
The original storage for the Oracle_Developer_Day.ova are Oracle_Developer_Day-disk2.vmdk and Oracle_Developer_Day-disk1.vmdk , depends on your machine. Im going to expand the /home/ which located in Oracle_Developer_Day-disk2.vmdk
Once imported into VirtualBox , jump straight to expand the storage. Since im using MAC , the exact location of VirtualBox ( if you have moved it to Application folder) is /Applications/VirtualBox.app/Contents/MacOS/
The resizehd value is in Mb , since im going to expand to around 30Gb , the value should be like or around 30720
Clone the original vmdk to VDI , since we can only resize VDI file
/Applications/VirtualBox.app/Contents/MacOS/VBoxManage clonehd “<full path>/Oracle_Developer_Day-disk2.vmdk” “/<fullpath>/disk2-clone.vdi” –format vdi
/Applications/VirtualBox.app/Contents/MacOS/VBoxManage modifyhd “/<fullpath>/disk2-clone.vdi” –resize 30720
/Applications/VirtualBox.app/Contents/MacOS/VBoxManage clonehd “/<fullpath>/disk2-clone.vdi” “/<fullpath>/Oracle_Developer_Day-disk2-resized.vmdk” –format vmdk
Now at the VirtualBox , remove the existing storage Oracle_Developer_Day-disk2.vmdk and add this Oracle_Developer_Day-disk2-resized.vmdk
Now load the GParted iso gparted-live-0.14.1-6-i486.iso into the VirtualBox. Start the machine and choose the boot option to CD. Now you can expand the storage using GParted which i will not explain that .