Thinking Out Loud

December 18, 2016

Cloning 12c SE2 Oracle Home for Windows 2012 R2

Filed under: 12c,cloning,VirtualBox,Windows — mdinh @ 6:13 am

Process is pretty much similar to *nix environment with a few exceptions.

It was harder than it should be since I wanted to perform task using CLI vs GUI.

This does not cover zip and unzip of OH and I cannot believe how junky Winzip has become since I have typically been using 7-Zip.

Click link below for details.
Cloning 12c SE2 Oracle Home for Windows 2012 R2



May 28, 2014

Headless VirtualBox on Windows 7

Filed under: VirtualBox — mdinh @ 1:04 am

Recently I came to know about Headless features for VirtualBox and was curious as to how it works.

When using Headless, there is not a need to start VirtualBox GUI which is nice and removes clutters from Desktop.

Here’s a demo on how to start VirtualBox Headless.

List available VMs.

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\dinh>cd "c:\Program Files\Oracle\VirtualBox"

c:\Program Files\Oracle\VirtualBox>VBoxManage.exe list vms
"arrow" {202d474e-7b00-4fce-a38a-844a650545b8}

Start VM Headless.

c:\Program Files\Oracle\VirtualBox>VBoxManage.exe startvm arrow --type headless
Waiting for VM "arrow" to power on...
VM "arrow" has been successfully started.

c:\Program Files\Oracle\VirtualBox>exit

Test connection to VM.
VM was shutdown in the next step while connected.

dinh@CMWPHV1 ~
$ ssh oracle@
oracle@'s password:
Last login: Tue May 27 17:34:30 2014 from
The Oracle base remains unchanged with value /u01/app/oracle
Broadcast message from root@arrow.localdomain
        (unknown) at 17:38 ...

The system is going down for halt NOW!

Broadcast message from root@arrow.localdomain
        (unknown) at 17:38 ...

The system is going down for halt NOW!
Connection to closed by remote host.
Connection to closed.

dinh@CMWPHV1 ~

Shutdown VM.

c:\Program Files\Oracle\VirtualBox>VBoxManage.exe controlvm arrow acpipowerbutton

January 15, 2013

OEL 6.3 Minimal Install VirtualBox for Database

Filed under: 11g,linux,oracle,VirtualBox — mdinh @ 4:15 am

I am a lazy DBA. The less configuration I do the less chance I have to make a mistake.

Surprisingly, oracle-rdbms-server-11gR2-preinstall does not configure pam.d/login and selinux.

Here’s how to create kernel panic with incorrect configuration.


NOTE: Configuration should be SELINUX=disabled NOT SELINUXTYPE=disabled

At the same time, I need to slow down and read more carefully.

Here is the super condensed version since there are already many blogs on how to install Linux on VirtuaBox.

Customize Minimal Install

Base System
> Base
> Client Management Tools
> Desktop
> Desktop Platform
> Graphical Administration Tools
> X Window System

NTP not configured


Disable Firewall/Disable Software Updates

yum install oracle-rdbms-server-11gR2-preinstall

Note: I did not have to modify public-yum-ol6.repo for OEL 6.3

Read more about it here

Modify /etc/grub.conf to include: divider=10

Read more about it here via @rmoff

Modify /etc/pam.d/login to include: session required

Modify /etc/selinux/config: SELINUX=disabled

Install Guest Additions.

yum clean all

Configure /etc/hosts accordingly.


As root, Configure oracle:

passwd oracle
usermod -G dba,vboxsf oracle
mkdir -p /u01/app/oracle
mkdir -p /u01/app/oraInventory
mkdir -p /u01/app/oracle/cfgtoollogs
mkdir -p /u01/app/oracle/product/
chown -R oracle:oinstall /u01
chmod -R 775 /u01

As oracle, Modify /home/oracle/.bash_profile to include:

# User specific environment and startup programs
if [ $USER = “oracle” ]; then
if [ $SHELL = “/bin/ksh” ]; then
ulimit -p 16384
ulimit -n 65536
ulimit -u 16384 -n 65536
umask 022

export TEMP=/tmp
export ORACLE_TERM=xterm;
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/
export LD_LIBRARY_PATH=/lib:/usr/lib
export ORACLE_HOSTNAME=gg1.localdomain
export PS1=”
${LOGNAME}@`hostname -a`:\${ORACLE_SID}:\${PWD}
> ”

Install oracle software only

January 6, 2013

Cloning VM RAC node

Filed under: VirtualBox — mdinh @ 5:46 pm

Software Configuration

Windows 7 SP1 x64 (guest OS)


VirtualBox installed at D:\VirtualBox

VM Configuration

Clone VM to rac02

VBoxManage clonevm rac01 –mode machine –name rac02 –register

Clone created new directory rac02 as well as copies for all asm disks (rac02-disk?.vdi)

Remove disk attachment from rac02

VBoxManage storageattach rac02 –storagectl “SATA” –port 1 –device 0 –type hdd –medium none

VBoxManage storageattach rac02 –storagectl “SATA” –port 2 –device 0 –type hdd –medium none

VBoxManage storageattach rac02 –storagectl “SATA” –port 3 –device 0 –type hdd –medium none

VBoxManage storageattach rac02 –storagectl “SATA” –port 4 –device 0 –type hdd –medium none

Remove disk image from VirtualBox media registry

Be sure to change directory to where the disks are located.

VBoxManage closemedium disk rac02-disk1.vdi

VBoxManage closemedium disk rac02-disk2.vdi

VBoxManage closemedium disk rac02-disk3.vdi

VBoxManage closemedium disk rac02-disk4.vdi

Delete rac02 virtual disk image

del rac02-disk*.vdi

Attach asm*.vdi to rac02:

Be sure to change directory to where the disks are located.

VBoxManage storageattach rac02 –storagectl “SATA Controller” –port 1 –device 0 –type hdd –medium asm01.vdi –mtype shareable

VBoxManage storageattach rac02 –storagectl “SATA Controller” –port 2 –device 0 –type hdd –medium asm02.vdi –mtype shareable

VBoxManage storageattach rac02 –storagectl “SATA Controller” –port 3 –device 0 –type hdd –medium asm03.vdi –mtype shareable

VBoxManage storageattach rac02 –storagectl “SATA Controller” –port 4 –device 0 –type hdd –medium asm04.vdi –mtype shareable

MWSnap004 2013-01-01, 19_18_48


January 7, 2011

VirtualBox Command Line

Filed under: VirtualBox — mdinh @ 4:20 am

I have manually configured VirtualBox Host-Only Ethernet Adapter for static IP.

However, the IP can change after reboot which affects connectivity with the Guest with static IP.

I have not been able able to figure out why.

However, one method to resolve this is to add the following commands in a batch file and have it executed at startup.

VBoxManage hostonlyif ipconfig “VirtualBox Host-Only Ethernet Adapter” –ip
VBoxManage dhcpserver modify –ifname “VirtualBox Host-Only Ethernet Adapter” –disable
VBoxManage list -l hostonlyifs

C:\>VBoxManage hostonlyif ipconfig "VirtualBox Host-Only Ethernet Adapter" --ip

C:\>VBoxManage dhcpserver modify --ifname "VirtualBox Host-Only Ethernet Adapter" --disable

C:\>VBoxManage list -l hostonlyifs
Name:            VirtualBox Host-Only Ethernet Adapter
GUID:            97cdbf73-e6e7-45d3-a8fe-ea4ee0fd5939
Dhcp:            Disabled
IPV6Address:     fe80:0000:0000:0000:ecfc:c04f:b7dd:4054
IPV6NetworkMaskPrefixLength: 64
HardwareAddress: 08:00:27:00:98:7d
MediumType:      Ethernet
Status:          Up
VBoxNetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter


Blog at