Configuring Syslog Settings on Edge Gateway in vCloud Air via Rest API

Recently I deployed syslog server in my vCloud Lab and was looking for a way to send Edge gateway logs to my syslog server. This post in focused on how to configure edge gateway syslog settings. 

VMware vCloud® Air supports the ability for customers to collect information about traffic coming to and from their edge gateway through the use of a syslog server. By configuring edge gateway to transfer log data to your syslog server, you can then set up alerts or notifications and build reports with your preferred tools.

If you do not have ANS subscription in vCloud Air then the only way to configure syslog settings on the Edge gateway is via vCloud API. There is no option available in GUI when you open edge gateway properties from within vCloud Director interface.

When it comes to using Rest API we have variety of choice to use as Rest Client. Some of the common clients include curl, Postman,Mozilla rest Client etc.

I personally prefers curl and postman and in this post I will demonstrate the curl option.

Requirements to Configure Syslog on Edge Gateway:

1: A REST client.

2: vCloud Air credentials.

3: vCloud Air Endpoint/Org name.

4: Configured syslog server and IP address.

Obtaining vCloud Air Endpoint/Org name

You can obtain the endpoint details by logging into vCloud Air portal and navigating to your Org/vDC.

Obtaining vCloud Air supported API versions

List of supported API versions that can be used with vCloud Air can be obtained by firing below command. 

# curl -sik -H “Accept:application/*+xml;version=5.6” -u “mjha@vmware.com” -X GET https://au-south-1-15.vchs.vmware.com/api/versions

You will get a long list of versions as output. Select any one of the version. Also make a note of the login URL. 

<VersionInfo>
 <Version>9.0</Version>
 <LoginUrl>https://au-south-1-15.vchs.vmware.com/api/compute/api/sessions</LoginUrl>
</VersionInfo>

Obtaining Auth Code for vCloud API Login

You need 4 things for generating Auth code for API login

A: Login URL (copy from previous output)

B: API Version: (copy from previous output)

C: Customer Header: Accept:application/*+xml;version=9.0

D: vCloud Air Credentials in format: username@domain-name@org-name

When you have all the 4 info handy, fire below API query to obtain Auth code

# curl -sik -H “Accept:application/*+xml;version=9.0” -u “mjha@vmware.com@bdd75fd4-a319-47d5-b4f2-77aad691488f” -X GET https://au-south-1-15.vchs.vmware.com/api/compute/api/sessions | grep auth

Enter host password for user ‘mjha@vmware.com@bdd75fd4-a319-47d5-b4f2-77aad691488f’:

x-vcloud-authorization: 1e95dc1064aa4083ae79bb617221853e

Now use following API queries in sequence

Find Org Href

# curl -sik -H “Accept:application/*+xml;version=5.6” -H “x-vcloud-authorization:1e95dc1064aa4083ae79bb617221853e” -X GET https://au-south-1-15.vchs.vmware.com/api/org/ | grep bdd75fd4-a319-47d5-b4f2-77aad691488f    

Note: bdd75fd4-a319-47d5-b4f2-77aad691488f is my org name

<Org href="https://au-south-1-15.vchs.vmware.com/api/compute/api/org/4f5feba5-bb82-456e-8898-95d4970f2624" name="bdd75fd4-a319-47d5-b4f2-77aad691488f" >

Find vDC Href

# curl -sik -H “Accept:application/*+xml;version=5.6” -H “x-vcloud-authorization:1e95dc1064aa4083ae79bb617221853e” -X GET https://au-south-1-15.vchs.vmware.com/api/compute/api/org/4f5feba5-bb82-456e-8898-95d4970f2624 | grep vdc

<href="https://au-south-1-15.vchs.vmware.com/api/compute/api/vdc/e89232de-3507-4b66-98d7-8ec25e99c826" name="Manish-VCAP-LAB" >
 

Find Edge Gateway Href

# curl -sik -H “Accept:application/*+xml;version=5.6” -H “x-vcloud-authorization:1e95dc1064aa4083ae79bb617221853e” -X GET https://au-south-1-15.vchs.vmware.com/api/compute/api/vdc/e89232de-3507-4b66-98d7-8ec25e99c826 | grep edge

<href="https://au-south-1-15.vchs.vmware.com/api/compute/api/admin/vdc/e89232de-3507-4b66-98d7-8ec25e99c826/edgeGateways" > read more

vCloud Air Disaster Recovery- Performing Reverse Replication (Failback)

In last post of this series,we learnt about Recovery options available with vCloud Air Disaster Recovery and we discussed about Test recovery and actual recovery and saw the use case for both type.

In this post we will discuss about failback of a VM (which is recovered in vCloud Air) to on-premise. If you have landed straight to this post accidentally then I will urge you to check out previous blog posts which I have wrote on vCloud Air Disaster Recovery.

vCloud Air Disaster Recovery Solution (DRaaS) read more

vCloud Air Disaster Recovery Failover

Disaster Recovery to vCloud Air is now a tested and reliable solution and helps customer to replicate their critical workloads to vCloud Air so that in event of Disaster in on-premise, customer can recover their workloads and continue their operation without much impact to business.

In this post we will learn how to recover VM’s in vCloud Air in event of disaster or in case when scheduled maintenace is planned in on-premise. For those who are not much familiar with what is vCloud Air Disaster Recovery solution, I urge you to read about that from below links: read more

vCloud Air: Access Your Linux Server Over SSH From Outside

This week while working in my lab, I came across a situation where I wanted to run few commands on my linux server which is running in vCloud Air. To access my lab from outside I have configured a Windows jump server and from there I access my lab components (using SSH or RDP to other server). At times it is annoying to switch back and forth between your home desktop and the RDP session.

I went ahead and configured my main Linux server to access it over SSH directly from my home computer (without logging into my windows jump server). read more

vCloud Air Data Protection:Part-3: Restore a Deleted VM From Backup

In last post of this series Virtual Machine Backup we had a look into how to configure Data Protection Service on a Virtual Datacenter and how to take backup of a virtual machine.

In this post we will learn how to recover a VM from the backup.

To learn more about DPS I would recommend reading first 2 posts of this series from below links

1: Introduction to vCloud Air Data Protection

2: Taking Virtual Machine Backup using DPS

Let’s jump into lab now and see how restore works within DPS.

1: Login to vCloud Air and Navigate to Data Protection tab and select any VM on which you have previously taken backup. read more

vCloud Air Data Protection:Part-2: Virtual Machine Backup

In last post of this series Introduction to DPS we had a look on what DPS is and how it works. We also discussed the benefits which a customer can get via DPS for his critical workloads running in vCloud Air.

In this post we will look into how to configure Org vDC’s for backups, edit backup policies and how to take backup of a VM.

Prerequisites for DPS:

1: You should have a Dedicated/Virtual Private Cloud Instance running in vCloud Air

2: You should have purchased DPS subscription.

Lets jump into lab now. read more

vCloud Air Data Protection:Part-1:Introduction

Everybody knows how important is to backup your critical workloads in your infrastructure. The need to protect workloads is the same whether it’s onsite or in the cloud.vCloud Air Data Protection services ensures business continuity for the workloads which are running in your vCloud Air environment.

So what is vCloud Air Data Protection exactly?  

VMware vCloud® Air Data Protection offers secure, policy-based backup and recovery in the cloud for virtual machines hosted exclusively on vCloud Air. It is an agent-less, self-service, policy-driven backup and recovery service with works on the principle of image-level backups. read more

vCloud Air Pricing Calculator

If you are looking for vCloud Air solution but don’t know about about vCloud Air offerings and associated prices, don’t worry. VMware has solution to this problem.

The vCloud Air Pricing Calculators below are available to help you estimate your costs of using various vCloud Air services. Configure the type of service and features you’re looking for and get pricing information quickly.

vCloud Air offers many solution including Virtual Private Cloud, Dedicated Cloud and Disaster Recovery. To know more about service offerings login to vCloud Air Portal and select service offerings to see list of all services offered. read more

Replicate VM to vCloud Air using vSphere Replication

In my last post Disaster Recovery with vcloud Air we discussed what is vcloud Air Disaster Recovery service and saw how to prepare your infrastructure for replicating VM’s to Vcloud Air.

This post is continuation of my last post where I will be demonstrating how to replicate VM from on premise datacenter to vCloud Air. Let’s jump into action straightaway.

1: Login to your on-premise vSphere Web-Client and select the VM which you want to replicate, right click on it and chose All vSphere Replication Action > Configure Replication read more

Disaster Recovery with vCloud Air

Why you need DR solution?

Business continuity and disaster recovery are paramount for ensuring your business critical environment, data, and online presence are available with minimal downtime. The availability services offered on vCloud Air help ensure that your data is protected, recoverable, and accessible by you and your customers.

What is VMware vCloud Air Disaster Recovery Solution?

VMware vCloud Air Disaster Recovery is a recovery-as-a-service (DRaaS) offering. It provides simple, affordable protection in the cloud for your vSphere environment. It leverages vSphere Replication to provide powerful, asynchronous replication capabilities at the hypervisor layer. read more

vCloud Air: External Catalog Publishing

I am running my lab on top of vCloud Air and I have 2 organizations created in vCloud Air, one in Australia and one in US. I have all lab components running in Australia location and was setting another environment in US which will be exact replica of Australia.

I have my vApp templates and ISO media files uploaded in catalog at Australia location, and in order to setup everything from scratch, I needed to upload everything again in US location.

I was looking for a solution where I can share resources from one location to another in vCloud Air and then came across a cool concept of “External Catalog Publishing”. This feature was introduced in vCloud Director 5.5 read more