Redeploy NSX Edge Gateway Using Rest API

In this post I will demonstrate how to redeploy edge gateway in vCloud Director using Rest API

Disclaimer: This is not any fancy post and I am going to perform very simple task here. Most of you may be already aware of this. This post is for those who are new to API and also a reference post for me for future.

Lets get started.

We have to follow below steps for redeploying an edge gateway using API calls

Step 1: Generate Auth Token

# curl -sik -H “Accept:application/*+xml;version=5.6” -u “admin@system” -X POST https://vcd-b.alex.local/api/sessions | grep auth
Enter host password for user ‘admin@system’:

x-vcloud-authorization: 3fc8a5425f804c9d94eeff04e0272ed7

Step 2: Get Org UUID

# curl -sik -H “Accept:application/*+xml;version=5.6” -H “x-vcloud-authorization:3fc8a5425f804c9d94eeff04e0272ed7” -X GET https://vcd-a.alex.local/api/org/

Step 3: Get vDC UUID

# curl -sik -H “Accept:application/*+xml;version=5.6” -H “x-vcloud-authorization:3fc8a5425f804c9d94eeff04e0272ed7” -X GET https://vcd-a.alex.local/api/org/58d92de4-4aa5-4a14-9b39-28e1de5e9809Read More

Detaching and Deleting Independent Disks in vCloud Director via REST API

Yesterday while working on one of the production issue where we had to deprovision a tenant environment in vCloud Air, I noticed that independent disks were preventing automated deprovision of the environment and the error messages were loud and clear in the log files.

It was a new issue for me so I started reading about independent disks in vCloud Director and want to share few things about this.

First of all independent Disk feature in vCD is completely different from an Independent Disk in vSphere. Independent disks can be shared across multiple vApps/VM’s in vCloud Director. This feature was first introduced in vCD v5.1.

Following quote from vCloud Architecture Toolkit document rightly explains about independent disks

The use of independent disks with vCloud Director allows updates of virtual machines without impacting the underlying data.

The feature is designed to enable users to create virtual disks which can be attached to and detached from virtual machines.Read More

Replacing vCD SSL Certificates in a Multi Cell Environment

After a long wait I finally got chance to work on vCloud Director ssl certificates. This was the only component in my lab which was still using self-signed certs and that encouraged me to do something new in lab.

A note on vCD SSL certificates

vCloud Director like any other VMware product needs a certificate to be installed on the device that it uses for communication with the other products. By default vCD uses a self-signed certificate. If you have a certificate authority in your environment then you can get the certs created in advance before installing vCloud director and save your self from pain of messing with certificates at later stages.

vCD has 2 IP address which allows support for 2 different SSL endpoints (http and consoleproxy). Each endpoint requires its own SSL certificate. vCloud Director uses a java keystore to read its SSL certificates from.  In a Multi-cell environment you need to create 2 certificates for each cell and import the certificates into vcd java keystore.… Read More

Troubleshooting Failed Org Network Creation in vCloud Director

Today while working in my lab, I observed that while creating a new VDC in vCD was failing because org network failed to create.

On navigating to Org VDC list and clicking on error, it read the error load and clear that org vdc network can’t be created.

vcd-1

On navigating to Org VDC Networks section and clicking on error, I was able to identify what has caused the network creation failure.

vcd-2

The error stack was reading as below:

Read More

Troubleshooting Mysterious Catalog Item in vCloud Director

Few days back while working on one of the customer ticket, I came across an incident where customer was reporting that he is not able to see one of his template in his catalog. He sent the VM via ODT to vCloud Air to be imported in his catalog.

I verified that VM was missing from catalog but was present in vCenter. I tried to import the VM again in Catalog by selecting the option “Import from vSphere” but to my surprise the VM was showing up in the list for selection.

corpsql01 not listing

I have never seen such behaviour in VCD. Even if import of template is failed midway, the item is listed in catalog with a question mark against it and status of item reads as “failed to create

After scratching my head for 15-20 minutes and checking with my peer if he had seen any such issue in past, I decided to employ API calls for catalog query (GUI is a big fat lier sometimes) and to my surprise I was seeing 2 entries for catalog items.Read More

RabbitMQ Clustering

In the last post of this series, we learned how to install/configure RMQ for vCloud Director. This post is an extension of my last post where I will be adding one more node to my RMQ setup to form a cluster for high availability.

What data is replicated in an RMQ Cluster?

All data/state required for the operation of a RabbitMQ broker is replicated across all nodes. An exception to this is message queues, which by default reside on one node, though they are visible and reachable from all nodes. To replicate queues across nodes in a cluster, see the documentation on high-availability

Note: Before proceeding with cluster formation, please ensure the following:

1: Use the same version of Erlang and RMQ server rpm which is installed on the master node.

2: RMQ nodes address each other using domain names, either short or FQDNs. Therefore hostnames of all cluster members must be resolvable from all cluster nodes, as well as machines on which command line tools such as rabbitmqctl might be used.Read More

Installing RabbitMQ for vCloud Director

In this post, I will demonstrate how to install RMQ for vCloud Director. Before jumping into any lab activity, let’s learn first what is RabbitMQ and why we need it.

What is RabbitMQ?

RabbitMQ is an open-source message-queuing software that helps facilitate message exchange between 2 or more applications. The exchange of messages is done via a queue which is defined by the administrator. An application can publish a message to the queue which can be retrieved or consumed by a different application.

A message can include any kind of information for example, it could have information about a process/task that should start on another application may be on another server or it could be just a simple text message.

The queue-manager software stores the messages until a receiving application connects and takes a message off the queue. The receiving application then appropriately processes the message.

How does it work?

RabbitMQ works by offering an interface, that connects message senders (Publishers) with receivers (Consumers) through an exchange (Broker) which distributes the data to relevant lists (Message Queues).Read More

VM replication state going to ‘Not Active’ as soon as vm is configured for replication

After a long back I dived into my lab yesterday and was working again on setting up DR to vCloud Air.I have wrote few blog posts in past on vSphere Replication and DR to vCloud Air using VR. If you are interested in reading those posts, you can read them from below links

1: Replicating and Recovering VM’s using vSphere Replication

2: Disaster Recovery with vcloud Air

3: Replicate VM to vCloud Air using vSphere Replication

This time in my lab I noticed that all my VM’s replication state were going to ‘Not Active’ as soon as its configured for replication. This was a brand new setup and I was sure that I followed all required steps in deploying and configuring the replication appliance. This was strange as I never faced this issue before.

repn-1.PNG

in hms.log on my on-prem VR appliance I was seeing the same messages about replication not active

hms.logRead More

Learning Apache Cassandra-Part-5-Getting Familiar With Nodetool

In last post of this series we learnt about how to add nodes in a cassandra cluster. If you have missed earlier posts of this series

then you can read them from below links:

1: Introduction to Cassandra

2: Understanding Cassandra Read/Write Mechanism

3: Installing Cassandra on RHEL6

4: Adding Node To Cassandra Cluster

In this post we will explore nodetool and will see how we can manage a cassandra cluster using nodetool utility.

What is nodetool?

The nodetool utility is a command line interface for managing a cluster. It provides a simple command line interface to expose operations and attributes available with cassandra.

There are hundreds of options available with nodetool utility and in this post I will cover only those which ae used more often.

Note: This post is suitable for those admins who are not sevrice owners of cassandra nodes/cluster but have to interact with cassandra day in day out in their infrastructure.… Read More

Learning Apache Cassandra-Part-4-Adding Node To Cassandra Cluster

In last post of this series we learnt how to install cassandra on Rhel 6. In this post we will look into additional configuration parameter that is needed to configure in order to facilitate other nodes to join the cassandra cluster.

If you have missed earlier posts of this series then you can read them from below links:

1: Introduction to Cassandra

2: Understanding Cassandra Read/Write Mechanism

3: Installing Cassandra on RHEL6

At the moment we have one node cassandra cluster. Before going ahead and installing cassandra on other nodes, we will first perform following configuration changes in cassandra.yaml file.

Navigate to cassandra.yaml file which is located in cassandra_install_dir/conf folder. Open the file in editor of your choice and look for following options:

  • Listen_address: Address where gossip will be listening to. This address can’t be localhost or 0.0.0.0, because the rest of nodes will try to connect to this address.
Read More