Installing 12c RAC on Linux VM: Copy/clone this virtual machine to create second node and modify host details

Previous: Add additional virtual Ethernet card and perform prerequisites in Linux

In order to copy/clone the VM for node 1 to another VM, first you need to cleanly shutdown the first host i.e. dbhost1

Once it is cleanly shutdown, you can either user VMWare’s clone option or simply copy the whole VM directory including .vmdk and .vmx files to another directory and name it node2.

Since this is identical copy if the first node, we don’t want to create IP conflict while starting the VM so this time start only VM for node2 using VMWare or VirtualBox.

When it prompts following, select “I moved it“. This will preserve all settings including IP address from node 1 VM. Otherwise it will copy the interfaces to ethx.bak and create new interfaces in Linux which we want to avoid.

Now node2 OS is booted, login with root user.

In order to change the IP address and hostname, follow these steps.

Make sure the /etc/hosts entries are correct.

[root@ dbhost2~]# more /etc/hosts

# Do not remove the following line, or various programs

# that require network functionality will fail.

127.0.0.1 localhost.localdomain localhost

#::1 localhost6.localdomain6 localhost6

192.168.1.121 dbhost1.paramlabs.com dbhost1

192.168.1.122 dbhost2.paramlabs.com dbhost2

192.168.1.123 dbhost1-vip.paramlabs.com dbhost1-vip

192.168.1.124 dbhost2-vip.paramlabs.com dbhost2-vip

192.168.2.121 dbhost1-priv.paramlabs.com dbhost1-priv

192.168.2.122 dbhost2-priv.paramlabs.com dbhost2-priv

192.168.1.125 dbhost-scan.paramlabs.com dbhost-scan

192.168.1.121 nfshost.paramlabs.com nfshost

Now open the network setup screen as follows.

It will show 2 existing interfaces with IPs of node 1.

We need to change IPs for eth0 to match dbhost2 IP. While for eth1 it should match dbhost2-priv IP. Select the interface and click Edit to make the changes.

Change the hostname using DNS tab in the network configuration screen. Enter hostname as dbhost2.paramlabs.com

Once you change the IP addresses, make sure to save the configuration using File -> Save.

Once this is done, restart the network service using following command.

[root@ dbhost2~]# service network restart

Change the hostname to dbhost2

[root@r12host ~]# hostname dbhost2.paramlabs.com

Make sure changes are persistent by restarting network service.

[root@dbhost2 ~]# service network restart

Shutting down interface eth0: [ OK ]

Shutting down interface eth1: [ OK ]

Shutting down loopback interface: [ OK ]

Bringing up loopback interface: [ OK ]

Bringing up interface eth0: [ OK ]

Bringing up interface eth1: [ OK ]

 

[root@dbhost2 ~]# ping dbhost2.paramlabs.com -c1

PING dbhost2.paramlabs.com (192.168.1.122) 56(84) bytes of data.

64 bytes from dbhost2.paramlabs.com (192.168.1.122): icmp_seq=1 ttl=64 time=0.021 ms

— dbhost2.paramlabs.com ping statistics —

1 packets transmitted, 1 received, 0% packet loss, time 0ms

rtt min/avg/max/mdev = 0.021/0.021/0.021/0.000 ms

Now you can restart Node 2 to make sure the new IPs and new hostname are preserved. Also we can start Node 1 now since there will be no conflict now.

This concludes the steps for creating second node for the RAC.

Next: Setup shared file system and other pre-requisites

Oracle 12c (12.1) RAC (Real Applications Cluster) installation on Linux Virtual Machines – Step by step guide

1. Create Virtual Machine and install 64 bit Linux
2. Add additional virtual Ethernet card and perform prerequisites in Linux
3. Copy/clone this virtual machine to create second node and modify host details
4. Setup shared file system and other pre-requisites
5. Install Oracle Grid Infrastructure
6. Install Oracle Database software and create RAC database

  1. Bryan
    May 19th, 2014 at 17:01 | #1

    Thanks for the input Tushar; I will try checking the DNS then.
    But originally it was working before I followed this article for virtual RAC installation. I backed my VM; So when restore to the older snapshot; web connectivity works. But when following this article above all Ips are pinging except web connectivity is gone. Let me try checking DNS and will get back to you. if anything more you want me to try ..please let me know. thank you.

  2. Bryan
    May 16th, 2014 at 23:31 | #2

    After setting up the 2 vms, neither of them could connect to the internet ?

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>