Using vCenter Orchestrator with RabbitMQ and vCloud Director – Part 4


In this post we are going to install the vCloud Director Notification Package, subscribe to a RabbitMQ queue and then configure vCenter Orchestrator to monitor to the newly created queue.

Installing the vCloud Director Notification Package

The vCloud Director Notification Package has various workflows, actions, etc that will allow us to parse AMQP notification messages from vCloud Director and act on them.  By avoiding this heavy lifting, we can focus on using the parsed values in our workflows. Go to and select the download link for Unzip the archive and you’re left with a file named com.vmware.coe.vcd55.notifications.package.

From the the vCO client:

  1. Select Administer from the drop-down menu
  2. Select the Packages tab
  3. Select Import package
  4. Select the file com.vmware.coe.vcd55.notifications.package
  5. Select Open


Select Import on the following screen:


I’ve already imported the package so there is nothing selected, but you should have a lot of items with green arrows that will be imported:


Once the import is finished, you’ll see a new package with various workflows, actions, etc:



Subscribing to a RabbitMQ queue

In the vCO client go to the workflow tab and then Library > AMQP > Configuration.  Right-click the Subscribe to queues workflow and set select Start Workflow. Give the queue a name and select Next



Select your broker and click Next.


Select Not Set and enter the name of your test queue in the in the New value field.  Once you’ve entered your queue name select Accept.


My Queue section looks like:


Press submit and it should complete successfully:



Creating a new policy

Here is where we will create a policy that will tell vCO to monitor a RabbitMQ queue for messages and to run a workflow when a new message is found.

  1. Select the Run menu
  2. Select the Policies tab
  3. Create the new policy


Edit the new policy:


  1. Select Add policy element
  2. Select AMQP:Subscription
  3. Press OK

Type the name of your queue, select it and press Select.


Select the AMQP:Subscription line and then select Add trigger event.


Select OnMessage and then Select Trigger.


It should now look like this (not sure what’s up with the blue background):


Select OnMessage and below you will notice that no workflow is set.  Click on the magnifying glass to search for a workflow to run:


Select the highlighted workflow:


Once you select the workflow you’ll notice that you have two new parameters that are not set:


Click on not set for subscription and then select the highlighted entry below:


Now do the same for messageBody:


The result should look like:


Start the policy by right-clicking on your policy and selecting Start policy. 


The policy should now have a green arrow on it:


In the next post we will configure the workflow that will run when a new message is found.

Using vCenter Orchestrator with RabbitMQ and vCloud Director – Part 3


In this post we are going to use vCO to create a RabbitMQ broker, exchange and a queue.  We will then bind to the queue so that we can send messages to the queue and retrieve them.

Adding a Broker

In the vCO client go to the workflow tab and then Library > AMQP.  Right-click the Add a broker workflow and set select Start Workflow. Give the broker a name and select Next.


Fill in the RabbitMQ host, leave the virtual host as / unless you want to change it and know what you’re doing.  The credentials are guest / guest.


If the workflow is successful, you will see:


Declaring an Exchange

In the vCO client go to the workflow tab and then Library > AMQP.  Right-click on Declare an exchange and select Start Workflow.

  1. Select Not Set and browse to your broker
  2. Expand AMQP and select your broker
  3. Select Select


Press Next and enter the following:


Press Submit and if it completes successfully, you’ll see a green check.


If you go to your RabbitMQ web interface, you’ll see the exchange we just created:


Declaring a Queue

In the vCO client go to the workflow tab and then go to Library > AMQP.  Right-click on Declare a queue and select Start Workflow.

Select your broker as before:


Fill in the following info:


Select Submit and you should get a green check if the workflow completes successfully.

In the RabbitMQ web interface we can see the new queue:


Binding to the Queue

In the vCO client go to the workflow tab and then go to Library > AMQP.  Right-click on Bind and select Start Workflow.

Select your broker and select Next:


Fill in the following and press Submit.


The routing key is “true.*.*.*.com.vmware.vcloud.event.blockingtask.create.vappDeploy”.  See Notification Message Format for more information on this. Once we have blocking tasks in vCloud set up, every time a vApp is deployed, a blocking task will go into this queue.  Now if we click on the queue in the RabbitMQ web interface, we will see the new binding:


Sending a message to the queue

In the vCO client go to the workflow tab and then go to Library > AMQP.  Right-click on Send a text message and select Start Workflow.

Select your broker and select Next:


Fill in the following and select Next:


Type in a message and select Submit.  Sometimes here Submit isn’t highlighted so you have to press Back then Submit


Back in the RabbitMQ web interface we see that a new message has arrived:


We can also scroll down to the Get messages section and press Get Messages.


Here we can see our message.  Set Requeue to No so that the message is removed off of the queue.

vCloud Director Configuration

Let’s do something a little more interesting and configure vCloud Director (vCD) to send messages to RabbitMQ when a vApp is deployed.  From the vCD portal, enter the following:


Configure the blocking task:

  1. Select the Administration menu item
  2. Select Extensibility
  3. Check Start vApp (Deploy from API)
  4. Press Apply


Go ahead and start any vApp.  You’ll see the status change to Pending processing…


This time the payload has a lot of vCD related information such as the ids for the org, user, etc of the vApp that was attempted to be deployed:


You could work with this data in the current format, but it’s much easier to use the vCD Notification Package.  This package will extract all the details from the blocking task and populate variables such as user, org, org vDC, etc.  It also allows you to run vCO workflows where you can use the data that was extracted out of the blocking task to do whatever you want.  For example, you could add the deployed system to a CMDB, call out to Infoblox to update the DNS, etc.  You probably want to use a different blocking task (vApp creation) type for this however.  There are two different types for creating vApps.  I’ll cover the vCD Notification Package and creating RabbitMQ subscriptions from vCO in the next post.




Using vCenter Orchestrator with RabbitMQ and vCloud Director – Part 2


In this entry in the series, we are going to install and configure the RabbitMQ vCO plug-in and configure the vCenter vCO plug-in.

Installing the RabbitMQ vCO plug-in

First we need to make sure we have the RabbitMQ pulg-in for vCO.  The easiest way to get it is to go and click the gigantic orange banner and then select AMQP 1.0.3.  Once you download the plug-in you should have a file named o11nplugin-amqp-1.0.2-228.vmoapp.  Using a web browser to go your vCO server (mine is https://vco55b.vmware.local)

  1. Select Plug-ins
  2. Scroll to the bottom and select the magnifying glass
  3. Browse to the downloaded plug-in
  4. Select Upload and install


You should now see:



Adding vCenter to vCO

Since we are already here, let’s go ahead and add vCenter to vCO.

  1. Select Network
  2. Select SSL Trust Manager
  3. Enter the address of your vCenter server and press Import


Select Import:


  1. Select vCenter Server
  2. Enter your vCenter’s host name/IP
  3. I’m using the Share a unique session option so that all my workflows run as the specified user.
  4. Enter the user credentials that the workflows will run under.

To fully install the plug-ins we need to restart the vCO service:

  1. Select Startup Options
  2. Select Restart service


The vCO Client

Using a web browser, go back to your vCO server.  you can either run the vCO client directly or install it.  The default credentials should be vcoadmin / vcoadmin.


If we switch over to the Workflows tab, we can see the new AMQP workflows that were installed when we installed the RabbitMQ plug-in:


Then if we select the Inventory tab, we can browse all the plug-in inventories.  Here I’m showing my vCenter inventory.


The error messages you receive when logging into vCO can be pretty misleading.  If you’re having trouble logging in, you may need to your vCO server to your Java exception list.



In the next post I’ll go over how to use vCO to create the RabbitMQ Exchanges, queues, etc.

Using vCenter Orchestrator with RabbitMQ and vCloud Director – Part 1


This post will be the first part in a series on how to configure vCenter Orchestrator (vCO) to integrate with vCloud Director’s blocking tasks via RabbitMQ.  I’ll also try to cover some use cases that don’t involve vCloud Director and show how vCO can monitor RabbitMQ queues and execute vCO workflows.  Actually, most of this will revolve around vCO and RabbitMQ.

I’m not going to cover how to install vCO, but I’ll cover how to configure certain parts.  My testing was done with vCO 5.5.2, which can be downloaded at  If you need help deploying vCO, you can see how to deploy an OVF/OVA at  You can probably use the vCO that comes with vCenter, but I haven’t went that route in a while.  vCenter and the ESXi hosts are at 5.5 U2.  vCloud is at

Installing RabbitMQ

I’ll be using the Windows version of RabbitMQ and will be installing it on my vCenter server that is running on Windows 2008 R2.  RabbitMQ can be downloaded at  I’m using the current version, which is 3.3.5 at this time.  When you start the installation you’ll be notified that you need to install Erlang and the installer will direct you to the Erlang download site:


I installed version 17.3 of Erlang:  You can now re-run the RabbitMQ installer.  Of course, you can install Erlang first and then run the RabbitMQ installer and you will not receive this message.

Configuring RabbitMQ

The first thing we need to do is enable the Web UI for RabbitMQ.  You don’t have to do this if you’re comfortable with doing all of the management from the command line.  Go to Start > All Programs > RabbitMQ Server > RabbitMQ Command Prompt (sbin dir).  At the command line run the command rabbitmq-plugins enable rabbitmq_management

Now you’ll be able to access RabbitMQ’s management interface by going to http://localhost:15672/ from the machine where you installed RabbitMQ.  The default credentials are guest/guest.   With this version of RabbitMQ, by default you can only access the web interface using the guest account from the local machine.  I’m sure you can create users from the command line and access the RabbitMQ service remotely, but I’m trying to keep it simple.  We need to modify RabbitMQ’s conf file and then re-install it for the change to take effect.  I’m not sure why this is the case.  I found this out from

Open a command prompt and run copy %APPDATA%\RabbitMQ\rabbitmq.config.example to %APPDATA%\RabbitMQ\rabbitmq.config.  Edit the new rabbitmq.config file and find this section (The %%s are comments).

%% The default “guest” user is only permitted to access the server
%% via a loopback interface (e.g. localhost).
%% {loopback_users, [<<“guest”>>]},
%% Uncomment the following line if you want to allow access to the
%% guest user from anywhere on the network.
%% {loopback_users, []},

We want to change the last line to

{loopback_users, []},

Simply restarting the RabbitMQ service does not pick up the change.  We need to re-install it.  This is actually very easy to do.  Simply go to Start > All Programs > RabbitMQ Server > RabbitMQ Service – (re)install

 Configuring vCloud Director to talk to RabbitMQ

As a system admin in vCloud Director, go to the following section and fill in the highlighted areas.  The Exchange, vHost and Prefix fields don’t matter for now.  Once you’re done press Test AMQP Connection and it should succeed as long as the vCloud Director Cell can communicate to the AMQP host/port.


In the next post I’ll go over how to configure the RabbitMQ vCO and vCenter plug-ins.