Tuesday, March 13, 2012

Oracle Virtualbox Add new hard disk procedure

All oracle developers these days must get familiar with oracle virtual box concepts.. there is base images available from oracle for download for you to play around with. After downloading these images, you can add software to it and save it as a copy for you to transfer to different machines... how cool is that!!!

However if you are a novice, you need to get familiar with how to add disk space, to the base VMs. Most oracle base VM images come with just enough space, so for adding a new software (either middleware or database management tools for example) these  instructions come handy.



Click Settings -> Select Storage
Select IDE Controller -> Click Add Hard Disk

Click Create New Disk

Select VDI (Virtual box image format) or vmdk format and continue through wizard and select or enter amount of space required.
Start VMDK
Login as root
Run “fdisk –l”
You’ll see a message such as /dev/hdc doesn’t contain a valid partition table
Run the command mkfs –t ext3 /dev/hdc
Mkdir /stagingDisk1
Edit /etc/fstab and add the following entry /dev/hdc /stagingDisk1  ext3 defaults 0 0
If this doesn’t work run  mount /dev/hdc /stagingDisk1