7 Cloning Oracle Management Agents

This chapter explains how you can clone existing Oracle Management Agents (Management Agents) using the Cloud Control console, or in silent mode. In particular, this chapter covers the following:

Overview of Cloning Management Agents

Oracle Management Agent (Management Agent) is one of the core components of Enterprise Manager Cloud Control that enables you to convert an unmanaged host to a managed host in the Enterprise Manager system. The Management Agent works in conjunction with the plug-ins to monitor the targets running on that managed host.

Therefore, if you want to monitor a target running on a host, you must first convert that unmanaged host to a managed host by installing an Oracle Management Agent, and then manually discover the targets running on it to start monitoring them.

However, the Management Agent you install using other installation types is always a fresh installation without any customized configuration that you had done or interim one-off patches that you had applied to other running Management Agents.

If you want to install an additional Management Agent that is identical to the existing well-tested, pre-patched, and running Management Agent, then a good option is to clone the existing instance. This saves time and effort in patching a fresh installation all over again and bringing it to the current state.

You can clone an existing Management Agent in graphical or silent mode.

  • In graphical mode, you use the Add Host Targets Wizard that is accessible from within the Enterprise Manager Cloud Control console. The wizard enables you to select a source Management Agent, which you want to clone, and identify one or more remote hosts on which you want to clone it.

    The wizard first copies the source Management Agent image to the host on which Oracle Management Service (OMS) is running, and then, it transfers that copied image to the destination hosts. Although the wizard can be used for remotely cloning one, single Management Agent, it is best suited for mass-deployment of Management Agents, particularly while mass-deploying Management Agents of different releases on hosts of different platforms.

  • In silent mode, you use a compressed file (ZIP), which you transfer. Understandably, this is a much easier method because you compress the Oracle home of an existing Management Agent and transfer it to the destination host without having to specify any parameters or values in an interview screen, but still retaining all its configuration settings and applied one-off patches.

    While cloning Management Agents in silent mode, you need to create a different compressed file for every platform on which you want to deploy the cloned Management Agent. Hence, this method is not ideal for the mass deployment of Management Agents on hosts of different platforms. This method is a quick and an effective one for deploying Management Agents on hosts that have the same platform.

After installing a Management Agent, to monitor a target, add the target to Enterprise Manager Cloud Control either using the Auto Discovery Results page, the Add Targets Manually page, or the discovery wizards offered for the targets you want to monitor.

For information about discovering targets and adding targets in Enterprise Manager Cloud Control, see Overview of Discovering and Adding Target in the Oracle Enterprise Manager Cloud Control Administrator's Guide.

Once the installation is complete, you will see the following default contents in the agent base directory:

<agent_base_directory>
    |_____agent_13.5.0.0.0
          |_____sbin
          |_____OPatch
          |_____agent.rsp
          |_____bin
          |_____cfgtoollogs
          |_____config
          |_____install
          |_____instalclient
          |_____.
          |_____.
          |_____.
    |_____agent_inst
    |_____agentInstall.rsp
    |_____agentimage.properties

Note:

You can repoint your existing Management Agents to a new Oracle Management Service (OMS). For instructions, see Redirecting Oracle Management Agent to Another Oracle Management Service.

When you repoint your existing Management Agents to a new OMS, you cannot move the targets monitored by the Management Agents, the target history, and the Management Agent history. The monitored targets and the history data is lost.

Before You Begin Cloning a Management Agent

Before you begin cloning an Oracle Management Agent, keep these points in mind:

  • (Only for Graphical Mode) The Add Host Targets Wizard converts an unmanaged host to a managed host in the Enterprise Manager system by cloning an existing Oracle Management Agent.

  • For more information on the compatibility between a particular version of Oracle Management Agent 13c and a particular version of Oracle Management Service 13c, see Before You Begin Installing an Enterprise Manager System in the Oracle Enterprise Manager Cloud Control Basic Installation Guide.

  • (Only for Graphical Mode) Using the Add Host Targets Wizard, you can clone only when the source host (from where you are cloning the Management Agent) and the destination host are running on the same operating system. Therefore, if you have hosts running on different platforms, then you must have one deployment session per platform.

  • Ensure that you do not use the central agent (that is, the Management Agent installed on the OMS host) as the source Management Agent.

  • While cloning, the source Management Agent is not shut down.

  • (Only for Graphical Mode) If you have multiple hosts, sharing a common mounted drive, then install the Management Agents in two different phases:

    1. First, clone the Management Agent to the host where the drive is shared by selecting the deployment type Clone Existing Agent in the Add Host Targets Wizard. Follow the instructions outlined in this chapter.

    2. Then, install a Management Agent on all other hosts that access the shared, mounted drive by selecting the deployment type Add Host to Shared Agent in the Add Host Targets Wizard. (Here, you will select the Management Agent you installed in the previous step.) For more information, follow the instructions outlined in Installing Shared Agents.

  • Cloning on shared clusters is NOT supported. If you have an Oracle RAC Cluster with multiple nodes, then you must clone the Management Agent on each of the nodes separately. In other words, in the Add Host Targets Wizard, you must add each node explicitly as a destination host.

  • (Only for Graphical Mode) The Add Host Targets Wizard uses SSH to establish connectivity between Oracle Management Service (OMS) and the remote hosts where you want to install the Management Agents

  • (Only for Graphical Mode) Only SSH1 (SSH version 1) and SSH2 (SSH version 2) protocols offered by OpenSSH are supported for deploying a Management Agent.

  • (Only for Graphical Mode) The Add Host Targets Wizard supports Named Credentials that enable you to use a set of credentials registered with a particular name specifically for this operation, by your administrator. This ensures an additional layer of security for your passwords because as an operator, you can only select the named credential, which is saved and stored by an administrator, and not know the actual user name and password associated with it.

    In case the named credential you select does not have the privileges to clone, then you can set the named credential to run as another user (locked user account). In this case, the wizard logs in to the hosts using the named credential you select, but clones using the locked user account you set.

    For example, you can create a named credential titled User_A (the user account that has remote login access), and set it to run as User_X (the Management Agent install user account for which no direct login is set) that has the required privileges. In this case, the wizard logs in to the hosts as User_A, but installs as User_X, using the privilege delegation setting (sudo or PowerBroker) specified in the named credential.

  • (Only for Graphical Mode) Named credentials support SSH public key authentication and password based authentication. So you can use an existing SSH public key authentication without exposing your passwords.

    To set up SSH public key authentication for a named credential, follow these steps:

    Note:

    If you have already set up SSH public key authentication for a named credential and the SSH keys are already created, upload the SSH keys to Enterprise Manager, as mentioned in Step 4 of the following procedure.

    1. Navigate to the following location in the Oracle home of the OMS host:

      $<ORACLE_HOME>/oui/prov/resources/scripts

      For example,

      /home/software/em/middleware/oms/oui/prov/resources/scripts

    2. If the OMS host runs on Oracle Solaris, edit the sshUserSetup.sh script to change the following:

      "SunOS") SSH="/usr/local/bin/ssh" SSH_KEYGEN="/usr/local/bin/ssh-keygen"

      to

      "SunOS") SSH="/usr/bin/ssh" SSH_KEYGEN="/usr/bin/ssh-keygen"

    3. If the OMS host runs on any Unix based operating system, run the sshUserSetup.sh script on the OMS host as the OMS install user, and pass the Management Agent install user name and the fully qualified name of the target hosts:

      sshUserSetup.sh -setup -user <agent_install_user_name> -hosts <target_hosts>

      The following SSH keys are created:

      $HOME/.ssh/id_rsa
      $HOME/.ssh/id_rsa_pub
      

      Here, $HOME refers to the home directory of the OMS install user.

      If the OMS host runs on Microsoft Windows, install Cygwin on the OMS host (described in Oracle Enterprise Manager Cloud Control Basic Installation Guide), then run the following script on the OMS host as the OMS install user, and pass the Management Agent install user name and the fully qualified name of the target hosts:

      sshUserSetupNT.sh -setup -user <agent_install_user_name> -hosts <target_hosts>

    4. Upload the SSH keys to Enterprise Manager.

      From the Setup menu, select Security, then select Named Credentials. Click Create. For Credential Name, specify the name of the credential, for Credential Type, select SSH Key Credentials, and for Scope, select Global. If you do not select the Global option, you cannot use the SSH named credential to install Management Agents using the Add Host Targets Wizard.

      To upload one of the private SSH keys created in Step 3, in the Credential Properties section, specify the location of the private SSH key as a value for the Upload Private Key field. Click Save.

      To upload one of the public SSH keys created in Step 3, in the Credential Properties section, specify the location of the public SSH key as a value for the Upload Public Key field. Click Save.

      Figure 7-1 describes how to upload SSH keys to Enterprise Manager.

      Figure 7-1 Uploading SSH Keys to Enterprise Manager


      Security Wizard to upload SSH keys to Enterprise Manager

    If you have already set up SSH public key authentication for a named credential, you can use the named credential while installing Management Agents using the Add Host Targets Wizard.

    You can also use the Add host Targets Wizard to set up SSH public key authentication for a named credential.

  • By default, the Add Host Targets Wizard configures all the plug-ins that were configured with the Management Agent you are cloning.

  • You must have read privileges on the Oracle WebLogic Server's alert log directories for the Support Workbench (Incident) metrics to work properly. You must also ensure that the Management Agent that is monitoring this Oracle WebLogic Server target is running on the same host as the Oracle WebLogic Server.

  • Upgrading a lower release of Solaris by applying a kernel patch or a patch bundle is not equivalent to installing the actual Solaris 5.10 Update 10+ image. Oracle Management Agent 13c Release 5 is built, tested, and certified on a minimum update version of Solaris 5.10 Update 10+, so Oracle recommends that you install Oracle Management Agent only on Solaris 5.10 Update 9, and not on any release that was upgraded using patches.

  • Changes done to the emd.properties file on the source host before cloning are not carried over to the destination host after cloning.

Prerequisites for Cloning a Management Agent

Before cloning the Management Agent, ensure that you meet the following prerequisites.

Table 7-1 Prerequisites for Cloning Oracle Management Agent

Requirement Description

Hardware Requirements

Ensure that you meet the hard disk space and physical memory requirements. For more information, see Hardware Requirements for Enterprise Manager Cloud Controlin the Oracle Enterprise Manager Cloud Control Basic Installation Guide.

Software Requirements

(Only for Graphical Mode)

(For Microsoft Windows) Ensure that you have installed Cygwin 1.7 on the destination host. For more information, see the chapter on installing Cygwin in the Installing Cygwin in the Oracle Enterprise Manager Cloud Control Basic Installation Guide.

Note: While running cygwin.bat in Microsoft Windows Server 2008 and Microsoft Windows Vista, ensure that you invoke it in administrator mode. To do this, right-click the cygwin.bat file and select Run as administrator.

Operating System Requirements

Ensure that you install the Management Agent only on certified operating systems as mentioned in the Enterprise Manager certification matrix available on My Oracle Support.

To access the Enterprise Manager certification matrix, follow the steps outlined in Accessing the Enterprise Manager Certification Matrix in the Oracle Enterprise Manager Cloud Control Basic Installation Guide.

For information about platforms receiving future support, refer to My Oracle Support note 793512.1.

Note: If you use Oracle Solaris 10, then ensure that you have update 10 or higher installed. To verify whether it is installed, run the following command:

cat /etc/release

You should see the output similar to the following. Here, s10s_u6 indicates that update 6, which is not a supported update level for installation, is installed.

Solaris 10 10/08 s10s_u6wos_07b SPARC

File System Requirements

Ensure that the file system mounted on the destination host does not permit buffered writes.

File Descriptor Requirements

  • Ensure that the maximum user process limit is set to 13312 or greater.

    To verify the current value set, run the following command:

    ulimit -u

    If the current value is not 13312 or greater, then contact your system administrator to set it to at least 13312.

  • Ensure that you set the soft limit of file descriptor to a minimum of 4096 and hard limit less then or equal to 16384.

    To verify the current value set, run the following commands:

    For Soft Limit:

    /bin/sh -c "ulimit -n"

    For Hard Limit:

    /bin/sh -c "ulimit -Hn"

    If the current value is not 4096 or greater, then as a root user, update the /etc/security/limits.conf file with the following entries:

    <UID> soft nofile 4096

    <UID> hard nofile 16384

Package Requirements

Ensure that you install all the operating system-specific packages. For more information, see the chapter on package requirements in the Package, Kernel Parameter, and Library Requirements for Enterprise Manager Cloud Control in the Oracle Enterprise Manager Cloud Control Basic Installation Guide.

User and Operating System Group Requirement

Ensure that the destination host where you want to install the Management Agent has the appropriate users and operating system groups created.

For more information, see the chapter on creating operating system groups and users in the Creating Operating System Groups and Users for Enterprise Manager Cloud Control in the Oracle Enterprise Manager Cloud Control Basic Installation Guide.

Note: If your enterprise has a policy against installing Management Agents using the OMS install operating system user account, you can use a different operating system user account to install Management Agents. However, ensure that the user account you use and the OMS install user account belong to the same primary group.

/etc/hosts File Requirements

Ensure that the /etc/hosts file on the host has the IP address, the fully qualified name, and the short name in the following format:

172.16.0.0 example.com mypc

Destination Host Requirements

Ensure that the destination hosts are accessible from the host where the OMS is running.

If the destination host and the host on which OMS is running belong to different network domains, then ensure that you update the /etc/hosts file on the destination host to add a line with the IP address of that host, the fully qualified name of that host, and the short name of the host.

For example, if the fully-qualified host name is example.com and the short name is mypc, then add the following line in the /etc/hosts file:

172.16.0.0 example.com mypc

Destination Host Credential Requirements

(Only for Graphical Mode)

Ensure that all the destination hosts running on the same operating system have the same set of credentials. For example, all the destination hosts running on Linux operating system must have the same set of credentials.

The wizard installs the Management Agent using the same user account. If you have hosts running on the same operating system but with different credentials, then have two different deployment sessions.

Destination Host Time Zone Requirements

(Only for Graphical Mode)

Ensure that the time zones of the destination hosts have been set correctly. To verify the time zone of a destination host, log in to the OMS host, and run the following command:

ssh -l <install_user> <destination_host_name> /bin/sh -c 'echo $TZ'

If the time zone displayed is incorrect, log in to the destination host, and follow these steps:

  1. Run the following commands to set the time zone on the destination host:

    • For Korn shell:

      TZ=<value>

      export TZ

    • For Bourne shell or Bash shell:

      export TZ=<value>

    • For C shell:

      setenv TZ <value>

    For example, in the Bash shell, run the following command to set the time zone to America/New_York:

    export TZ='America/New_York'

    To set the time zone on a destination host that runs on Microsoft Windows, from the Start menu, select Control Panel. Click Date and Time, then select the Time Zone tab. Select your time zone from the displayed drop down list.

    To view a list of the time zones you can use, access the supportedtzs.lst file present in the <AGENT_HOME>/sysman/admin directory of the central agent (that is, the Management Agent installed on the OMS host).

  2. Restart the SSH daemon.

    If the destination host runs on a UNIX based operating system, run the following command:

    sudo /etc/init.d/sshd restart

    If the destination host runs on a Microsoft Windows operating system, run the following commands:

    cygrunsrv -E sshd

    cygrunsrv -S sshd

  3. Verify whether the SSH server can access the TZ environment variable by logging in to the OMS host, and running the following command:

    ssh -l <install_user> <destination_host_name> /bin/sh -c 'echo $TZ'

Note: If you had ignored a prerequisite check warning about wrong time zone settings during the cloning procedure, you must set the correct time zone on the destination hosts after cloning the Management Agent. For information on setting time zones post cloning, see After Cloning a Management Agent.

Time Zone Requirements

(Only for Silent Mode)

Ensure that the host time zone has been set correctly. To verify the host time zone, run the following command:

echo $TZ

If the time zone displayed is incorrect, run the following commands, before running the agentDeploy.sh or agentDeploy.bat scripts, to set the correct time zone:

  • For Korn shell:

    TZ=<value>

    export TZ

  • For Bourne shell or Bash shell:

    export TZ=<value>

  • For C shell:

    setenv TZ <value>

For example, in the Bash shell, run the following command to set the time zone to America/New_York:

export TZ='America/New_York'

To set the time zone on a destination host that runs on Microsoft Windows, from the Start menu, select Control Panel. Click Date and Time, then select the Time Zone tab. Select your time zone from the displayed drop down list.

To view a list of the time zones you can use, access the supportedtzs.lst file present in the <AGENT_HOME>/sysman/admin directory of the central agent (that is, the Management Agent installed on the OMS host).

Note:

  • If you are installing a Management Agent on a host that runs on Microsoft Windows Server 2003, and you encounter an error when you use the Asia/Kolkata time zone, see the My Oracle Support note 1530571.1.

  • If you had ignored a prerequisite check warning about wrong time zone settings during the cloning procedure, you must set the correct time zone on the host after cloning the Management Agent. For information on setting time zones post cloning, see After Cloning a Management Agent.

Note: If you had ignored a prerequisite check warning about wrong time zone settings during the cloning procedure, you must set the correct time zone on the host after cloning the Management Agent. For information on setting time zones post cloning, see After Cloning a Management Agent.

sudo/pbrun/sesu/su SSH Requirements

(Only for Graphical Mode)

(Only for UNIX)

Ensure that you set the oracle.sysman.prov.agentpush.enablePty property to true in the $<ORACLE_HOME>/sysman/prov/agentpush/agentpush.properties file, if the privilege delegation tool you are using requires a pseudo terminal for remote command execution via SSH. Most privilege delegation tools such as pbrun, sesu, and su require a pseudo terminal for remote command execution, by default.

Note: If you are using sudo as your privilege delegation tool, and you do not want to set the oracle.sysman.prov.agentpush.enablePty property to true, do one of the following:

  • Include Defaults visiblepw in the /etc/sudoers file, or enter the sudo command with the -S option for Privileged Delegation Setting on the Installation Details page.

    For information on how to access the Installation Details page, see Cloning a Management Agent in Graphical Mode.

  • Comment out Defaults requiretty in the /etc/sudoers file.

sudo/pbrun/sesu/su Requirements (for Root User)

(Only for Graphical Mode)

(Only for UNIX)

  • Ensure that the installing user has the privileges to invoke the id command and the agentdeployroot.sh script as root. Grant the privileges in the configuration file of your privilege delegation tool.

    For example, if you are using sudo as your privilege delegation tool, include the following in the /etc/sudoers file to grant the required privileges:

    <install_user> ALL=(root) /usr/bin/id, <agent_home>/*/agentdeployroot.sh

    For example, oracle ALL=(root) /usr/bin/id, /home/oracle/agentibd/*/agentdeployroot.sh

    Here, oracle is the installing user, and /home/oracle/agentibd is the Management Agent home, that is, the agent base directory.

  • You do not require the following entry in the /etc/sudoers file for installing a Management Agent. However, the entry is required for performing provisioning and patching operations in Enterprise Manager. Therefore, if you are removing this entry before installing a Management Agent, then ensure that you bring back the entry after installing the Management Agent.

    In Enterprise Manager Cloud Control 12c Release 2 (12.1.0.2), Release 3 (12.1.0.3), Release 4 (12.1.0.4), Release 5 (12.1.0.5), 13c Release 1, 13c Release 2, 13c Release 3 or 13c Release 4:

    (root) /<AGENT_ORACLE_HOME>/sbin/nmosudo

    In Enterprise Manager Cloud Control 12c Release 1 (12.1.0.1) [with Bundle Patch 1]:

    (root) /<AGENT_INSTANCE_DIRECTORY>/bin/nmosudo

sudo/pbrun/sesu/su Requirements (for Locked Account User)

(Only for Graphical Mode)

(Only for UNIX)

Ensure that the installing user has the privileges to invoke /bin/sh as the locked account user. Grant the privileges in the configuration file of your privilege delegation tool.

For example, if you are using sudo as your privilege delegation tool, include the following in the /etc/sudoers file to grant the required privileges:

login_user1 ALL=(oracle) /bin/sh

Here, login_user1 is the SSH log in user, and oracle is the locked account and install user.

If you do not want to grant privileges to the installing user to invoke /bin/sh as the locked account user, set the oracle.sysman.prov.agentpush.pdpShellOutEnabled property to false, and ensure that the installing user has the privileges to invoke id, chmod, cp, mkdir, rm, tar, emctl, agentDeploy.sh, em13400_<platform>.bin, and unzip as the locked account user. Grant the privileges in the configuration file of your privilege delegation tool.

For example, if you are using sudo as your privilege delegation tool, include the following in the /etc/sudoers file to grant the required privileges:

login_user1 ALL=(oracle) /usr/bin/id, /bin/chmod, /bin/cp, /bin/mkdir, /bin/rm, /bin/tar, /home/oracle/agentibd/agent_inst/bin/emctl, /home/oracle/agentibd/*/agentDeploy.sh, /home/oracle/agentibd/*/prereq_stage/agent_13.4.0.0.0/oui/bin/em13400_<platform>.bin, /home/oracle/agentibd/*/unzip, /home/oracle/agentibd/*/unzipTmp/unzip, /home/oracle/agentibd/*/agentcore.bin

Here, login_user1 is the SSH log in user, oracle is the locked account and install user, and /home/oracle/agentibd is the agent base directory.

Permission Requirements

  • Ensure that the agent base directory you specify is empty and has write permission.

  • Ensure that the instance directory is empty and has write permission.

PATH Environment Variable Requirements

(Only for Graphical Mode)

On the destination host, ensure the following:

  • (For Microsoft Windows) Ensure that the Cygwin software location appears before other software locations in the PATH environment variable. After making it the first entry, restart the SSH daemon (sshd).

  • (For UNIX) On the destination host, ensure that the SCP binaries (for example, /usr/bin/scp) are in the PATH environment variable:

Path Validation Requirements

Validate the path to all command locations. For more information, see the appendix on validating command locations in the Validating Command Locations in the Oracle Enterprise Manager Cloud Control Basic Installation Guide.

CLASSPATH Environment Variable Requirements

Unset the CLASSPATH environment variable. You can always reset the variable to the original value after the installation is complete.

Temporary Directory Space Requirements

Ensure that you allocate 400 MB of space for a temporary directory where the executables can be copied.

By default, the temporary directory location set to the environment variable TMP or TEMP is honored. If both are set, then TEMP is honored. If none of them are set, then the following default values are honored: /tmp on UNIX hosts and c:\Temp on Microsoft Windows hosts.

Agent Base Directory Requirements

Ensure that the agent base directory is empty and has at least 1 GB of free space.

Ensure that the directory name does not contain any spaces.

The install user owns the agent base directory. The agent base directory and the parent directories of the agent base directory have read, write, and execute permissions for the install user. Ensure that the install user or the root user owns all the parent directories of the agent base directory, and that the parent directories have read and execute permissions for the install user group and all the other users. Also, ensure that the root user owns the root directory.

For example, if the agent base directory is /scratch/OracleHomes/agent, and oracle is the install user, then the /scratch/OracleHomes/agent directory must be owned by oracle, directories scratch and OracleHomes must be owned by either oracle or the root user, and the root directory (/) must be owned by the root user.

If the agent base directory is mounted, then ensure that it is mounted with the setuid turned on.

Default SSH Port Requirements

(Only for Graphical Mode)

Ensure that the SSH daemon is running on the default port (that is, 22) on all the destination hosts. To verify the SSH port on a Unix host, run the following command:

netstat -anp | grep -i sshd

For example, the output of this command may be the following:

tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 3188/sshd

The above output indicates that the SSH daemon is running on port 22.

Also, on a Unix host, you can run the following command to verify the SSH port:

cat /etc/ssh/sshd_config

For a Microsoft Windows host, the SSH port value is mentioned in the C:\cygwin\etc\sshd_config file.

If the SSH port is a non-default port, that is, any port other than 22, then update the SSH_PORT property in the following file:

$<ORACLE_HOME>/oui/prov/resources/Paths.properties

Software Availability Requirements

(Only for Graphical Mode)

For Cloning an Existing Management Agent

Ensure that you already have Oracle Management Agent 13c running in your environment. Ensure that the platform on which it is running is the same as the platform of the destination hosts on which you want to clone.

For Installing a Management Agent Using Shared Oracle Home

Ensure that you already have Oracle Management Agent 13c installed as a Master Agent in a shared, mounted location.

Installation Base Directory Requirements

(Only for Graphical Mode)

Ensure that the agent base directory you specify in the Installation Base Directory field is empty and has write permission.

Job System Requirements

Ensure that the job system is enabled on the source Management Agent you want to clone.

Installing User Requirements

If the central inventory owner and the user installing the Management Agent are different, then ensure that they are part of the same group.

Also ensure that the inventory owner and the group to which the owner belongs have read and write permissions on the inventory directory.

For example, if the inventory owner is abc and the user installing the Management Agent is xyz, then ensure that abc and xyz belong to the same group, and they have read and write access to the inventory.

Central Inventory (oraInventory) Requirements

  • Ensure that you allocate 100 MB of space on all destination hosts for the Central Inventory.

  • Ensure that you have read, write, and execute permissions on oraInventory on all destination hosts. If you do not have these permissions on the default inventory (typically at /etc/oraInst.loc) on any destination host, then ensure that you specify the path to an alternative inventory location by using one of the following options in the Additional Parameters field of the Add Host Targets Wizard. However, these parameters are supported only on UNIX platforms, and not on Microsoft Windows platforms.

    INVENTORY_LOCATION=<absolute_path_to_inventory_directory>

    -invPtrLoc <absolute_path_to_oraInst.loc>

Port Requirements

Ensure that the default ports described in What Default Ports Are Used for Enterprise Manager Cloud Control Installation? are free.

Agent User Account Permissions and Rights

(Only for Microsoft Windows)

(For Microsoft Windows) If you are installing the Management Agent on a Microsoft Windows-based operating system, then ensure that the agent user account has permissions and rights to perform the following:

  • Act as part of the operating system.

  • Adjust memory quotas for a process.

  • Replace process level token.

  • Log on as a batch job.

To verify whether the agent user has these rights, follow these steps:

  1. Launch the Local Security Policy.

    From the Start menu, click Settings and then select Control Panel. From the Control Panel window, select Administrative Tools, and from the Administrative Tools window, select Local Security Policy.

  2. In the Local Security Policy window, from the tree structure, expand Local Policies, and then expand User Rights Assignment.

Permissions for cmd.exe

(For Microsoft Windows) If you are installing the Management Agent on a Microsoft Windows-based operating system, then ensure that you grant the Cmd.exe program Read and Execute permissions for the user account that the batch job runs under. This is a restriction from Microsoft.

For more information on this restriction and to understand how you can grant these permissions, access the following URL to Microsoft Web site:

http://support.microsoft.com/kb/867466/en-us

Runtime Library File Requirements

(For Microsoft Windows) If you are installing the Management Agent on a Microsoft Windows-based operating system, then ensure that the Msvcp71.dll and Msvcr71.dll runtime library files are present in c:\windows\system32.

Preinstallation/Postinstallation Scripts Requirements

(Only for Graphical Mode)

Ensure that the preinstallation and postinstallation scripts that you want to run along with the installation are available either on the OMS host, destination hosts, or on a shared location accessible to the destination hosts.

Cloning a Management Agent

This section describes the following:

Note:

If the OMS host is running on Microsoft Windows, and the OMS software was installed in a drive other than C:\, then update the SCRATCH_PATH variable in $OMS_HOME\oui\prov\resources\ssPaths_msplats.properties.

For example, if the OMS software was installed in D:\, ensure that you update the SCRATCH_PATH variable to D:\tmpada

Cloning a Management Agent in Graphical Mode

This section describes how to clone a Management Agent using the Cloud Control console. It consists of the following:

Cloning a Management Agent Using Add Host Targets Wizard

To clone a Management Agent in graphical mode using Add Host Targets Wizard, follow these steps:

  1. In Cloud Control, do one of the following:

    • From the Setup menu, select Add Target, and then, click Auto Discovery Results. On the Auto Discovery Results page, select a host you want to monitor in Enterprise Manager Cloud Control, and click Promote.

      Enterprise Manager Cloud Control displays the Add Host Wizard, where you can select the option to clone an existing Management Agent.

    • From the Setup menu, select Add Target, and then, click Add Targets Manually. On the Add Targets Manually page, click Install Agent on Host.

      Enterprise Manager Cloud Control displays the Add Host Wizard, where you can select the option to clone an existing Management Agent.

  2. On the Host and Platform page, do the following:

    1. Accept the default name assigned for this session or enter a unique name of your choice. The custom name you enter can be any intuitive name, and need not necessarily be in the same format as the default name. For example, add_host_operation_1

      A unique deployment activity name enables you to save the cloning details specified in this deployment session and reuse them in the future without having to enter all the details all over again in the new session.

    2. Click Add to enter the fully qualified name and select the platform of the host on which you want to clone the Management Agent.

      Note:

      • Oracle recommends you to enter the fully qualified domain name of the host. For monitoring purpose, Enterprise Manager Cloud Control adds that host and the Management Agent with the exact name you enter here.

      • You must enter only one host name per row. Entering multiple host names separated by a comma is not supported.

      • You must ensure that the host name you enter does not have underscores.

      Alternatively, you can click either Load from File to add host names stored in a file, or Add Discovered Hosts to add host names from a list of hosts discovered by Enterprise Manager. For information on how the host name entries must appear in the host file, see Format of Host List File.

      Note:

      When you click Add Discovered Hosts and add hosts from a list of discovered hosts, the host's platform is automatically detected and displayed. The platform name is detected using a combination of factors, including hints received from automated discovery and the platform of the OMS host. This default platform name is a suggestion, so Oracle strongly recommends you to verify the platform details before proceeding to the next step.

      As you can clone only if the source host and destination host are running on the same platform, set the platform for the first host in the first row of the table and from the Platform list, select Same for All Hosts. This will ensure that the platform name you selected for the first host is also set for the rest of the hosts in the table.

      Note:

      If you are cloning a Management Agent on a platform that is different from the platform on which the OMS host is running, then ensure that the Management Agent software for that platform is available in Oracle Software Library (Software Library). If the Management Agent software for the required platform is not available in Software Library, acquire and apply the software using the Self Update console.

      To access the Self Update Console, from the Setup menu, select Extensibility, then select Self Update. To acquire the latest Management Agent software, click Agent Software, select the required software, then click Download.

      For more information on how to acquire and apply the Management Agent software for a platform using the Self Update console, see Oracle Enterprise Manager Cloud Control Basic Installation Guide.

    3. Click Next.

  3. On the Installation Details page, do the following:

    1. In the Deployment Type section, select Clone Existing Agent. Then, for Select Target, click the torch icon and select the Management Agent you want to clone.

      Note:

      • Ensure that you do not use the central agent (that is, the Management Agent installed on the OMS host) as the source Management Agent.

      • If you have multiple hosts sharing a common mounted drive, then install the Management Agents in two different phases:

        1. In the Add Host Targets Wizard, select the deployment type Clone Existing Agent, and clone the Management Agent to the host where the drive is shared.

        2. In the Add Host Targets Wizard, select the deployment type Add Host to Shared Agent, and install a Management Agent on all other hosts that access the shared, mounted drive. (Here, you will select the Management Agent you cloned in the previous step as the master agent or shared agent.)

    2. From the table, select the first row that indicates the hosts grouped by their common platform name.

    3. In the Installation Details section, provide the installation details common to the hosts selected in Step 3 (b). For Installation Base Directory, enter the absolute path to the agent base directory where you want the software binaries, security files, and inventory files of the Management Agent to be copied.

      For example, /usr/home/software/oracle/agentHome

      If the path you enter does not exist, the application creates a directory at the specified path, and copies the Management Agent software binaries, security files, and inventory files there.

      Note:

      The Installation Base Directory is essentially the agent base directory. Ensure that the directory you provide is empty. If a previously run deployment session had failed for some reason, then you might see an ADATMP_<timestamp> subdirectory in the installation base directory. In this case, either delete the subdirectory and start a new deployment session, or retry the failed session from the Add Host Status page.

    4. For Instance Directory, accept the default instance directory location or enter the absolute path to a directory of your choice where all Management Agent-related configuration files can be stored.

      For example, /usr/home/software/oracle/agentHome/agent_inst

      If you are entering a custom location, then ensure that the directory has write permission. Oracle recommends you to maintain the instance directory inside the installation base directory.

      If the path you enter does not exist, the application creates a directory at the specified path, and stores all the Management Agent-related configuration files there.

    5. From Named Credential list, select an appropriate profile whose credentials can be used for setting up the SSH connectivity between the OMS and the remote hosts, and for installing a Management Agent on each of the remote hosts.

      Note:

      • If you do not have a credential profile, or if you have one but do not see it in the Named Credential list, then click the plus icon against this list. In the Create New Named Credential window, enter the credentials and store them with an appropriate profile name so that it can be selected and used for installing the Management Agents. Also set the run privilege if you want to switch over from the Named Credential you are creating, to another user who has the privileges to perform the installation.

      • If the plus icon is disabled against this list, then you do not have the privileges to create a profile with credentials. In this case, contact your administrator and either request him/her to grant you the privileges to create a new profile or request him/her to create a profile and grant you the access to view it in the Named Credential list.

      • If you have manually set up SSH public key authentication between the OMS and the remote hosts, then you may not have a password for your user account. In this case, create a named credential with a dummy password. Do NOT leave the password field blank.

    6. For Privileged Delegation Setting, validate the Privilege Delegation setting to be used for running the root scripts. By default, it is set to the Privilege Delegation setting configured in Enterprise Manager Cloud Control.

      For example, you can specify one of the following for the Privileged Delegation Setting field:

      /usr/bin/sudo -u %RUNAS% %COMMAND%
      /usr/bin/sudo -u -S %RUNAS% %COMMAND% (if a pseudo terminal is required for remote command execution via SSH)
      /usr/bin/sesu - %RUNAS% -c "%COMMAND%"
      /usr/bin/pbrun %PROFILE% -u %RUNAS% %COMMAND%
      /usr/bin/su - %RUNAS% -c "%COMMAND%"
      

      If you leave the Privileged Delegation Setting field blank, the root scripts will not be run by the wizard; you will have to run them manually after the installation. For information about running them manually, see After Cloning a Management Agent.

      This setting will also be used for performing the installation as the user set in the Run As attribute of the selected Named Credential if you had set the user while creating that Named Credential.

      Note:

      In the Privilege Delegation setting, the %RUNAS% is honored as the root user for running the root scripts and as the user set in the Run As attribute of the Named Credential for performing the installation.

    7. For Port, accept the default port (3872) that is assigned for the Management Agent to communicate, or enter a port of your choice.

      The custom port you enter must not be busy. If you are not sure, you can leave this field blank. Enterprise Manager Cloud Control automatically assigns the first available free port within the range of 1830 - 1849.

    8. (Optional) In the Optional Details section, enter the absolute path to an accessible location where the preinstallation and postinstallation scripts you want to run are available. Note that only one preinstallation or one postinstallation script can be specified.

      If you want to run the script as root, then select Run as Root. If the script is on the host where OMS is running and is not on the host where you want to install the Management Agent, then select Script on OMS. In this case, the script will be copied from the OMS host to the destination hosts, and then run on the destination hosts.

    9. (Optional) For Additional Parameters, enter a whitespace-separate list of additional parameters that you want to pass during the installation. For a complete list of supported additional parameters, see Table 7-2.

      For example, if you want to provide the inventory pointer location file, then enter -invPtrLoc followed by the absolute path to the file location. Note that this parameter is supported only on UNIX platforms, and not on Microsoft Windows platforms.

    10. Repeat Step 3 (b) to Step 3 (i) for every other row you have in the table.

    11. Click Next.

  4. On the Review page, review the details you have provided and if you are satisfied with the details, then click Deploy Agent to clone the Management Agent.

    If you want to modify the details, then click Back repeatedly to reach the page where you want to make the changes.

    When you click Deploy Agent and submit the deployment session, you are automatically taken to the Add Host Status page that enables you to monitor the progress of the deployment session.

    Note:

    On the Add Host Status page, if you see the error message Copying Source Agent Image Failed, then refer to the following log file in the Oracle home of the OMS host:

    $<ORACLE_HOME>/sysman/prov/agentpush/<timestampdir>/applogs/deployfwk.log

    This error usually occurs when the job system is not enabled on the source Management Agent you are cloning. Ensure that the job system is enabled.

Format of Host List File

In the Add Host Targets Wizard, you can click Load from File to add the hosts listed in a file. However, ensure that the file you select has one of the following formats:

  • Only the host name.

    For Example,

    host1.example.com

    host2.example.com

  • The host name followed by the platform name.

    For Example,

    host1.example.com linux_x64

    host2.example.com aix

    The supported platform names are linux_x64, linux, solaris, hpunix, hpi, linux64_zseries, aix, linux_ppc64, windows_x64, solaris_x64, win32.

Additional Parameters Supported for Cloning a Management Agent in Graphical Mode

Table 7-2 lists the additional parameters supported for cloning a Management Agent in graphical mode.

Table 7-2 Supported Additional Parameters

Parameter Description

INVENTORY_LOCATION

Enter the absolute path to the Central Inventory (oraInventory).

For example, INVENTORY_LOCATION=$HOME/oraInventory

Important:

  • This parameter is supported only on Unix platforms, and not on Microsoft Windows platforms.

  • Ensure that you use this parameter only when no other Oracle product is installed on the remote host, and the Central Inventory pointer /var/opt/oracle/oraInst.loc (for Solaris and HP-UX platforms) or /etc/oraInst.loc (for other Unix platforms) does not exist.

  • If you use this parameter, ensure that you do not use the -invPtrLoc parameter.

-invPtrLoc

Enter the absolute path to the inventory file that has the location of the Central Inventory (oraInventory).

For example, -invPtrLoc /tmp/oraInst.loc

Important:

  • This parameter is supported only on Unix platforms, and not on Microsoft Windows platforms.

  • You can use this parameter even when another Oracle product is already installed on the remote host, and the Central Inventory pointer /var/opt/oracle/oraInst.loc (for Solaris and HP-UX platforms) or /etc/oraInst.loc (for other Unix platforms) exists.

  • If you use this parameter, ensure that you do not use the INVENTORY_LOCATION parameter.

s_agentSrvcName

(Only for Microsoft Windows) Enter a custom name for the Management Agent service.

Every Management Agent appears as a service in Microsoft Windows, and every Management Agent has a default service name. If you want to assign a custom name to identify it, then use this parameter.

For example, s_agentSrvcName=agentsrvc1

Note: If you upgrade a 12c Management Agent installed on a Microsoft Windows host to 13c, and you want to install another Management Agent on the same host, reporting to a different OMS, ensure that you specify the s_agentSrvcName parameter.

START_AGENT=false

Specify this parameter if you do not want the Management Agent to start automatically once it is installed and configured.

If you do not specify this parameter, the Management Agent starts automatically once it is installed and configured.

b_secureAgent=false

Specify this parameter if you do not want the Management Agent to be secured after the install.

If you specify this parameter, ensure that you also specify the OMS HTTP port, using the EM_UPLOAD_PORT parameter.

For example, b_secureAgent=false EM_UPLOAD_PORT=4899

If you do not specify this parameter, the Management Agent is secured automatically after the install.

Cloning a Management Agent in Silent Mode

To clone a Management Agent manually, follow these steps:

Note:

Ensure that you do not use the central agent (that is, the Management Agent installed on the OMS host) as the source Management Agent.

  1. Set the required environment variables as described in Table 7-3.

    Table 7-3 Setting Environment Variables for Cloning in Silent Mode

    Variable What to Set? How to Set?

    AGENT_BASE_DIR

    Set it to the installation base directory of the Management Agent you want to clone.

    • In bash terminal, run the following command:

      export AGENT_BASE_DIR=<absolute_path_to_agent_install_base_dir>

      For example,

      export AGENT_BASE_DIR=/u01/software/em13c/agentbasedir

    • In other terminals, run the following command:

      setenv AGENT_BASE_DIR <absolute_path_to_agent_install_base_dir>

      For example,

      setenv AGENT_BASE_DIR /u01/software/em13c/agentbasedir

    AGENT_HOME

    Set it to the Oracle home of the Management Agent.

    For example,

    /u01/software/em13c/agentbasedir/agent_13.5.0.0.0

    • In bash terminal, run the following command:

      export AGENT_HOME=<absolute_path_to_agent_home>

      For example,

      export AGENT_HOME=/u01/software/em13c/agentbasedir/agent_13.5.0.0.0

    • In other terminals, run the following command:

      setenv AGENT_HOME <absolute_path_to_agent_home>

      For example,

      setenv AGENT_HOME /u01/software/em13c/agentbasedir/agent_13.5.0.0.0

    T_WORK

    Set it to /tmp/clone_work.

    • In bash terminal, run the following command:

      export T_WORK=/tmp/clone_work

    • In other terminals, run the following command:

      setenv T_WORK /tmp/clone_work

  2. Navigate to the agent base directory:

    cd $AGENT_BASE_DIR

  3. Run the create_plugin_list.pl script from the Management Agent Oracle home:

    $AGENT_HOME/perl/bin/perl <AGENT_HOME>/sysman/install/create_plugin_list.pl -instancehome <AGENT_INSTANCE_HOME>

  4. Compress the directories and files present in the agent base directory, and create a ZIP file in the temporary directory (represented by the environment variable T_WORK):

    zip -r $T_WORK/agentcoreimage.zip agent_13.5.0.0.0 plugins.txt

  5. Navigate to the temporary directory (represented by the environment variable T_WORK):

    cd $T_WORK

  6. Copy the agentDeploy.sh to the temporary directory:

    cp $AGENT_HOME/sysman/install/agentDeploy.sh .

  7. Copy the UNZIP utility to the temporary directory:

    cp $AGENT_HOME/bin/unzip .

  8. Copy the agentimage.properties to the temporary directory:

    cp $AGENT_HOME/sysman/agentimage.properties .

  9. Create the final ZIP file with all the contents to be transferred, in the temporary directory:

    zip -r agent.zip $T_WORK/*

  10. Transfer the ZIP file to the installation base directory of the destination host using a file transfer utility (for example, FTP).

  11. Extract the contents of the ZIP file to a temporary directory on the destination host (the temporary directory is referred to as <extracted_location> in the steps that follow).

  12. Create a response file titled agent.rsp (in the same directory) as described in Table 6-4.

    Note:

    The response file you create can have any name, and not necessarily agent.rsp. For easy understanding, this chapter uses the name agent.rsp. Also, instead of creating a response file, you can choose to pass the values in separate arguments while invoking the deployment script. However, Oracle recommends that you create a response file and capture the information there.

  13. Invoke the deployment script and pass the response file:

    <extracted_location>/agentDeploy.sh AGENT_BASE_DIR=<absolute_path_to_clone_agentbasedir> RESPONSE_FILE=<absolute_path_to_responsefile> -clone

    Note:

    • Instead of creating a response file, if you choose to pass the values in separate arguments, then invoke the deployment script with some mandatory arguments in the following way:

      <extracted_location>/agentDeploy.sh AGENT_BASE_DIR=<absolute_path_to_agentbasedir> OMS_HOST=<oms_hostname> EM_UPLOAD_PORT=<em_upload_port> AGENT_REGISTRATION_PASSWORD=<password>

    • In addition to passing the agent base directory and a response file (or individual mandatory arguments with installation details), you can also pass other options that are supported by the deployment script. For more information, see Options Supported by the agentDeploy Script.

    • If the source Management Agent was installed using the Add Host Targets Wizard, ensure that you specify the START_AGENT=true and the b_secureAgent=true parameters while invoking the deployment script.

After Cloning a Management Agent

After cloning a Management Agent, follow these steps:

  1. (Only for Graphical Mode) Verify the installation on the Add Host Status page. Review the progress made on each of the phases of the deployment operation — Initialization, Remote Prerequisite Check, and Agent Deployment.

    Note:

    In the Add Host Targets Wizard, after you click Deploy Agent to install one or more Management Agents, you are automatically taken to the Add Host Status page.

    If you want to view the details or track the progress of all the deployment sessions, then from the Setup menu, select Add Target, and then, click Add Targets Manually. On the Add Targets Manually page, click Install Agent Results.

    If a particular phase fails or ends up with a warning, then review the details provided for each phase in the Agent Deployment Details section, and do one of the following:

    • Ignore the warning or failure, and continue with the session if you prefer.

      • You can choose to proceed with the deployment of Management Agents only on those remote hosts that have successfully cleared the checks, and you can ignore the ones that have Warning or Failed status. To do so, click Continue and select Continue, Ignoring Failed Hosts.

      • You can choose to proceed with the deployment of Management Agents on all the hosts, including the ones that have Warning or Failed status. To do so, click Continue and select Continue, All Hosts.

    • Fix the problem by reviewing the error description carefully, understanding its cause, and taking action as recommended by Oracle.

      • You can choose to retry the deployment of Management Agents with the same installation details. To do so, click Retry and select Retry Using Same Inputs.

      • You can retry the deployment of Management Agents with modified installation details. To do so, click Retry and select Update Inputs and Retry.

    Note:

    If you see the error message Copying Source Agent Image Failed, then refer to the following log file in the Oracle home of the OMS host:

    $<ORACLE_HOME>/sysman/prov/agentpush/<timestampdir>/applogs/deployfwk.log

    This error usually occurs when the job system is not enabled on the source Management Agent you are cloning. Ensure that the job system is enabled.

  2. Perform the post installation steps as described in After Installing a Management Agent in Silent Mode.

Note:

  • You can repoint your existing Management Agents to a new Oracle Management Service (OMS). For instructions, see Redirecting Oracle Management Agent to Another Oracle Management Service.

    When you repoint your existing Management Agents to a new OMS, you cannot move the targets monitored by the Management Agents, the target history, and the Management Agent history. The monitored targets and the history data is lost.