EM12c agent installation for Windows hosts…without Cygwin!

The majority of Enterprise Manager 12c Cloud Control agent installations are pretty straight forward, just do the usual checks, ensuring firewalls are open etc. and then deploy from the EM console.  The Windows installations are not as straight forward these days, as the deployment method uses SSH connectivity which requires the installation and configuration of Cygwin as a pre-requisite :( …this is time consuming, confusing at times (if you’ve not done it before), and isn’t needed thereafter, so this post outlines an alternative and quicker way of rolling out the agent to Windows machines, using the silent install method…

The example below is based around my EM12c OMS running from an Oracle Linux 6.4 machine (VM0112), with the agent being deployed to a Windows Server 2003 x64 (64-bit) machine (VM0201).

First of all, you need to make sure  the software library has already been configured in EM12c.  I’d imagine most people at this stage have this setup already, but if not take a look here.

Check software availability using EMCLI from OMS

We need to connect to the EM repository using EMCLI and check which agents are available i.e. images that have been downloaded and applied:

export OMS_HOME=/u01/app/oracle/middleware/em12cr3/oms
export AGENT_HOME=/u01/app/oracle/agent12c/core/

Login as the SYSMAN user:

$OMS_HOME/bin/emcli login -username=sysman -password=******
Login successful

Fetch a list of agent software available from the the repository:

$OMS_HOME/bin/emcli get_supported_platforms
Version =
Platform = Linux x86-64
Platforms list displayed successfully.

In this example, you can see I only have the agent software available for Linux.  If you already have the software, ignore the next section and move onto building the image.

Download the Microsoft agent software

I won’t go into too much detail about how to do this, but you need to ensure you’re My Oracle Support connection has been configured in EM12c, then navigate to:

Setup > Extensibility > Self Update > Agent Updates

From here you can check for the latest updates and download the required software.  In this case, I’m after the latest ‘Microsoft Windows x64 (64-bit)’, which at the time of writing is version  Screenshots as below…








Once the download has completed and been applied to the software library, go back to your EMCLI session, run a synchronize command and check again:

$OMS_HOME/bin/emcli sync
Synchronized successfully

$OMS_HOME/bin/emcli get_supported_platforms
Version =
Platform = Linux x86-64
Version =
Platform = Microsoft Windows x64 (64-bit)
Platforms list displayed successfully.

Build an image for the agent

My software library simply sits under /swlib on my OMS machine.  I’m going to create a sub-directory here for this particular agent, then generate a zip file that can be used to deploy the agent locally from my Windows x64 server.

mkdir /swlib/win_x64_agent
export ZIP_LOC=/usr/bin/zip

NOTE: It’s important to set ZIP_LOC here, otherwise you’re likely to get an ‘execution failed’ message during the build (MOS 1590393.1).

Again using EMCLI, run the following command to generate a zip file (checking the platform and version):

$OMS_HOME/bin/emcli get_agentimage -destination="/swlib/win_x64_agent" -platform="Microsoft Windows x64 (64-bit)" -version=

=== Partition Detail ===
Space free : 18 GB
Space required : 1 GB
Check the logs at /u01/app/oracle/middleware/gc_inst/em/EMGC_OMS1/sysman/emcli/setup/.emcli/get_agentimage_2014-02-06_10-21-17-AM.log
Downloading /swlib/win_x64_agent/
File saved as /swlib/win_x64_agent/
Downloading /swlib/win_x64_agent/
File saved as /swlib/win_x64_agent/
Downloading /swlib/win_x64_agent/unzip
File saved as /swlib/win_x64_agent/unzip
Agent Image Download completed successfully.

Now you can copy the ‘’ file across to your Windows server where you want to install the agent (using something like FileZilla or WinSCP):

Unzip the contents to a sensible directory like D:\app\oracle\agent12c

Update installation files

Edit the agent response file (agent.rsp) accordingly:

# OMS host name
# OMS upload port
# Password for registering new agents
# Base installation directory
# Instance home directory
# Agent communication port
# Starts the agent after the install
# Oracle home name
# Fully qualified host name where agent is to be installed

Save these changes.

If you’re not sure on the ports, you can check these details by looking at the following file on your OMS:


If you’ve got loads of Windows agents to deploy, then it’s probably worth editing the agent.rsp file at source instead (editing the copy within the zip file on the OMS), but I didn’t bother here as there were only a few to deploy.

Optionally, add an entry into your hosts file for the OMS (C:\Windows\system32\drivers\etc\hosts)

# Oracle Enterprise Manager server     VM0112.vbox     VM0112

Install the agent

Finally, execute the batch file (agentDeploy.bat) to deploy the agent, where ORACLE_HOSTNAME is the Windows machine you’re deploying the agent to:

agentDeploy.bat RESPONSE_FILE=D:\app\oracle\agent12c\\agent.rsp

You can monitor progress by checking the following log file:


UPDATE: If you hit the “Invalid invocation. AGENT_BASE_DIR is mandatory.” error, you’ll need to edit the agentDeploy.bet script itself to include the following variable:

set agentBaseDir=E:\app\oracle\agent

You’ll likely see an error like the one below part way through the install.  It’s nothing to worry about, just a permissions issue which can be safely ignored.  So just close the window by clicking on the ‘X’:

That’s it, agent deployed! :)

Installing Oracle Management Agent in Silent Mode
Installing Cygwin and Starting the SSH Daemon


3 thoughts on “EM12c agent installation for Windows hosts…without Cygwin!

  1. I ran into AGENT_BASE_DIR error and upon further reserach, I found the following. Please modifty uour posting to include this additional infor.

    “Unfortunately editing of the response file ist not enough. Also an entry of the AGENT_BASE_DIR value in the response file can’t protect the following error.
    Invalid invocation. AGENT_BASE_DIR is mandatory.
    What helps is an entry in the agentDeploy.bat itself”

    set agentBaseDir=E:\app\oracle\agent

    courtesy: http://www.carajandb.com/en/blogs/blog-swinkler-en/194-oem-12c-agent-deploy-on-windows-no-problem-without-cygwin

  2. Hello there,

    Thanks for the excellent post. Just an addition to complement your work. You can add that the agentDeploy.bat file has to be run in an Administrator Command Prompt logged on as a user who is a member of Administrators group. I believe it is trivial but would help someone who runs into the following error.

    INFO: SEVERE:Create service for service name:Oracleagent12cR4Agent has failed.


    • If the agent service is already installed – you need to delete it first (using sc delete Oracleagent12cR4Agent) or change the name of the agent service (not recommended)

      Hope it helps

Leave a comment

Your email address will not be published. Required fields are marked *