4.3.18.1 CLONE GUEST

This command clones an existing VM guest and creates a new fully functional guest with storage, users, and Oracle RAC instances.

Prerequisites

Before you can clone an virtual machine (VM) guest, you must download the appropriate software images from My Oracle Support and extract the files. Place the extracted "klone.zip" files for Oracle Grid Infrastructure and Oracle Database in the /EXAVMIMAGES/onecommand/<platform>/WorkDir directory in the VM host where the new guest clone will be created.

Syntax

CLONE GUEST
   { SRCNAME=source_guest TGTNAME=target_guest | 
     TGTNAMES=target_guests }
[ WHERE
     STEPNAME=stepname ]
SET PARENT NAME=parent_name 
[ SET ADMINNET NAME=admin_name IP=admin_ip [ GATEWAY=gateway NETMASK=netmask ] ]
[ SET BACKUPNET NAME=backup_name IP=backup_ip ]
SET PRIVNET NAME1=priv_name_1 IP1=priv_ip1 NAME2=priv_name_2 IP2=priv_ip2 
[ SET INTERCONNECT NAME1=priv_name_1 IP1=priv_ip1 NAME2=priv_name_2 IP2=priv_ip2 ]
SET CLIENTNET NAME=client_name IP=client_ip [ NATHOSTNAME=nat_host_name NATIP=nat_ip NATDOMAINNAME=nat_domain_name, NATNETMASK=nat_netmask ]
SET VIPNET NAME=vip_name,IP=vip_ip
[ SET VCPU COUNT=guest_cpu ]
[ SET VMEM SIZE=guest_memory ]

Arguments

  • SRCNAME: Specifies the name of an existing guest VM from which the new guest VM is derived.
  • TGTNAME: Specifies the host name of the new guest VM that you are creating with the clone operation.
  • TGTNAMES: Specifies a comma-separated list of new guest VMs to add.

  • STEPNAME: Specifies the deployment step to perform, which is one of the following:

    • CREATE_GUEST
    • CREATE_USERS
    • CELL_CONNECTIVITY
    • CONFIG_CLUSTERWARE
    • RUN_ROOTSCRIPT
    • EXTEND_DBHOME
    • ADD_INSTANCE

You can specify the following additional settings when specifying CLONE GUEST with the WHERE STEPNAME=CREATE_GUEST clause or when specifying CLONE GUEST without using any WHERE STEPNAME clause:

  • PARENT: Specifies the name of the virtual machine (VM) host (Oracle Linux KVM or Oracle VM) that hosts the new guest.

  • ADMINNET : Specifies the DNS name and IP address to use for the administration network. Also, optionally specifies the gateway and netmask for the administration network.

  • BACKUPNET : Specifies the DNS name and IP address to use for the backup network. The DNS name may optionally include the domain name. Not required on guests without a backup network.

  • PRIVNET : Specifies the names and IP addresses to use for the first and second private networks.

  • INTERCONNECT: Only required if the compute nodes are configured with Exadata Secure RDMA Fabric Isolation or InfiniBand security (PKEYS). Specifies the names and IP addresses to use for the first and second private networks.

  • CLIENTNET : Specifies the DNS name and IP address to use for the client network. May optionally include host name, IP address, domain name, and netmask details to support Network Address Translation (NAT).

  • VIPNET : Specifies the DNS name and IP address to use for the virtual IP (VIP) network.

Usage Notes

  • For configurations with Exadata Secure RDMA Fabric Isolation or InfiniBand security (PKEYS), INTERCONNECT defines the private network that connects the database nodes and PRIVNET defines the private storage network.

  • When you load the XML configuration file to use when cloning a guest domain, the XML file should have the management domain (dom0) node of the source VM defined but not allocated to the cluster that is being extended into the guest domain.

  • You should save the modified XML file after the actions are merged so that you have a new XML file that reflects the addition of the new guest domain.

  • You can use the CLONE GUEST command to add a VM to a server that already contains a VM in the same cluster. Consequently, you can create a configuration where one VM host contains multiple VMs that are members of the same cluster. However, this capability is only available on systems not configured with Exadata Secure RDMA Fabric Isolation.

  • During deployment, the cloned guest inherits various configuration attributes from the source guest, including the client network configuration and the backup network configurations (if present).

    If all of the KVM hosts have the same network configuration, then the inherited attributes work as expected.

    However, if the new KVM host uses a different physical network configuration, deployment of the cloned guest will fail. This situation is most likely when an Exadata system contains different versions of compute node hardware. For example, when adding an X10M server to an X8M-2 rack.

    In this case, you must manually adjust the relevant network definition by using the ALTER NETWORK command before deployment. Contact Oracle Support for details.

Example 4-24 Cloning a Guest VM

This example shows how to clone a new guest from an existing node in the cluster. In this example, the source node name is exa01adm01vm01.example.com and the new node is exa01adm03vm01.example.com. A series of SET commands are used to specify the configuration for the new guest VM.

The XML file loaded at the beginning of this example has the dom0 node (host01adm01.example.com) defined but not allocated to the cluster that is being extended into the guest.

oedacli> LOAD FILE NAME=exa01-pre-cloning-node3.xml
oedacli> CLONE GUEST SRCNAME='exa01adm01vm01.example.com' TGTNAME='exa01adm03vm01.example.com'
oedacli> SET PARENT NAME='exa01adm03.example.com'
oedacli> SET ADMINNET NAME='exa01adm03vm01.example.com' IP='10.xxx.xx.x'
oedacli> SET CLIENTNET NAME='exa01client03vm01.example.com' IP='10.xxx.xx.x'
oedacli> SET PRIVNET NAME1='exa01adm03vm01-priv' IP1='192.168.16.8' NAME2='exa01adm01vm03-priv2' IP2='192.168.16.9'
oedacli> SET VIPNET NAME='exa01client03m01-vip.example.com' IP='10.xxx.xx.x'
oedacli> SAVE ACTION
oedacli> MERGE ACTIONS
oedacli> SAVE FILE NAME='exa01-cloned-node3-rac.xml'
oedacli> DEPLOY ACTIONS

Example 4-25 Cloning Multiple Guests Using TGTNAMES

This example clones dbguest23 and creates the new guests dbguest24 and dbguest25. By using the TGTNAMES argument, both new guests are deployed at the same time in the final DEPLOY ACTIONS.

CLONE GUEST SRCNAME='dbguest23' TGTNAME='dbguest24'
SET ADMINNET name='dbguest24' ip='10.128.161.202'
...
SAVE ACTION FORCE

CLONE GUEST SRCNAME='dbguest23' TGTNAME='dbguest25'
SET ADMINNET name='dbguest25' ip='10.128.161.203'
...
SAVE ACTION FORCE

CLONE GUEST TGTNAMES='dbguest24,dbguest25'

SAVE ACTION
MERGE ACTIONS
DEPLOY ACTIONS