VirtualBox: Expand the Oracle PreBuilt VM HD partition in Mac OSX

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/

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/ clonehd “<full path>/Oracle_Developer_Day-disk2.vmdk” “/<fullpath>/disk2-clone.vdi” –format vdi

/Applications/ modifyhd “/<fullpath>/disk2-clone.vdi” –resize 30720

/Applications/ 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 .


VirtualBox expand the virtual HDD vmdk ( MAC OSX)

Will use

In MacOSX VBoxManage are located at /Applications/

bash$VBoxManage clonehd "source.vmdk" "copy1.vdi" --format vdi
bash$VBoxManage modifyhd "copy1.vdi" --resize <value>
bash$VBoxManage clonehd "copy1.vdi" "newcopy.vdi" --format vmdk

Installing Oracle XE on Ubuntu in VirtualBox running in Mac OS X

As this works for development purposes only not for production:

Software requirement

  • VirtualBox 4.2.6 – VirtualBox-4.2.6-82870-OSX.dmg
  • Ubuntu 64bit Desktop 12.10- ubuntu-12.10-desktop-amd64.iso as this Oracle XE only work on 64bit Linux
  • Oracle XE 11.2.0 for Linux –
  • As at now im using Mac OS X 10.7.5

Continue reading

Generating SSL key in Mac

This info I found from


I’d like to use my Mac OS X with https for local development tests. How can I easily make Apache2 respond to ssl, just for test proposes – I don’t want a real certificate, just a fake to make local https work ?


Generating the private key:

openssl genrsa -des3 -out server.key 1024


Generating RSA private key, 1024 bit long modulus …………………………………………………++++++ ……..++++++ e is 65537 (0x10001) Enter PEM pass phrase: Verifying password – Enter PEM pass phrase:

enter a passphrase for your private key.
Generating the CSR (certificate signing request):

openssl req -new -key server.key -out server.csr

It will request details like this:

Country Name (2 letter code) [GB]:
State or Province Name (full name) [Berkshire]:
Locality Name (eg, city) [Newbury]:
Organization Name (eg, company) [My Company Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server’s hostname) []:
Email Address []:
Please enter the following ‘extra’ attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:

it’s fairly straightforward, the common name is your server’s hostname as it says in brackets.

Generating the self signed certificate:

openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

Configuring SSL in httpd.conf for Apache:

SSLEngine on
SSLCertificateFile /path/to/generated/server.crt
SSLCertificateKeyFile /path/to/generated/server.key

(replace path appropriately with the path to your certificate and key)

Restart Apache:

apachectl restart

Apache will ask you for the passphrase to your key. If you think you will be shutting the server down a lot, you may want to remove the passphrase from the key so you can avoid entering it each time. If not, don’t worry about it. If so, complete this step after step 2 (Generating the CSR):

cp server.key server.key.copy
openssl rsa -in server.key.copy -out server.key