VMware Hands-on Labs - HOL-HBD-1483

Lab Overview - HOL-HBD-1483 - Managing Your Hybrid Cloud

Lab Guidance

VMware announced the rebranding of VMware vCloud Hybrid Service to VMware vCloud Air on Thursday, August 21, 2014. The new name represents VMware’s transformation into a cloud services provider, and and our plans to extend the vCloud Air beyond Infrastructure as a Service. The new name has been rolled out in marketing content and documentation, and it will begin to show up in service UIs, videos, and other assets in the weeks ahead. Some references to vCloud Hybrid Service remain in the lab manual.

The main objective in this lab is for you to learn about managing and monitoring workloads running in VMware vCloud® Air™using various tools available from VMware. Since the lab is running in a self-contained virtual environment and is designed to be lightweight while still giving you the opportunity to learn about the topics, some of the lessons in the lab will make more sense if you can picture the environment you are working with to be a production instance on a much larger scale.

With that in mind, the lab is running two distinct compute environments: an instance of vCloud Air and an instance of vSphere. The local vSphere environment consists of a single cluster of two hosts. This local vSphere infrastructure is managed by a vCenter Server: vcsa-01a.corp.local. The cloud environment is VMware vCloud Air which can be managed via its web portal or via the tools you will be learning about in this lab.

An important point to note is that since these labs are self-contained pods without network access, you will not be connecting to the actual vCloud Air in the lab. While we have done our best to maintain the full functionality and robustness of the live vCloud Air it is possible that you will run into issues that are related to us having scaled the service down to fit in a lab pod.

The README.txt File

On the desktop of your lab console machine there is a README.txt file. The file contains URLs, user names and passwords for the modules in this lab. You can copy and paste text from this file instead of typing them in if you prefer.

The Lab Modules

The lab consists of four modules:

Module 1 - IT Service delivery on vCloud Air with vRealize Automation Center. This module deals with adding vCloud Air as an endpoint in vRealize Automation Center in order to automate the provisioning of workloads to the hybrid cloud. (60 minutes)

Module 2 - Monitor resources in vCloud Air with vRealize Operations Manager. In this module you will configure the vCloud Air management pack in vRealize Operations Manager, explore the included dashboards and build a new dashboard from scratch to customize the way you view metrics and relationships from the hybrid cloud and from the local vSphere environment. (45 minutes)

Module 3 - Migrate workloads to vCloud Air with vCloud Connector. This module walks you through using the vCloud Connector to move VMs from the local vSphere environment to the hybrid cloud. (15 minutes)

Module 4 - Automate resource management in vCloud Air with PowerCLI. Here you will explore some of the vCloud Air management functionality available through the PowerCLI command-line interface. (30 minutes)

When you start a VMware Hands On Lab, you are allotted 90 minutes for the session. You can choose to take any of the modules in any order. From the estimated module lengths above, you can see that it is unlikely you will be able to complete all four modules in a single lab session so you might want to think about your preferred module order before you get started. Remember that you can return to the Hands On Labs for a new session at a later time and take whatever module(s) that you don't complete in this session.

Information on how to jump to a specific module is included at the end of this introductory article.

What is vCloud Air?

VMware vCloud Air (formerly called vCloud Hybrid Service) is a secure, hybrid cloud service operated by VMware, built on the trusted foundation of vSphere. The service supports existing workloads and third-party applications as well as new application development, giving IT a common platform to seamlessly extend their data center into the public cloud and remain in control.

VMware vCloud Air is built on the trusted foundation of vSphere and is compatible with your on-premise data center. vCloud Air allows you to extend your workloads into the cloud with ease. You can migrate existing virtual machines (VMs) from on-premises to the public cloud or start up new application VMs directly in the cloud. You can also easily port VMs and other business-critical workloads back and forth to the location of your choice, all with the secure and capable foundation of vSphere.

With vCloud Air, applications don’t need to be modified when moved into the public cloud, and since administrators will be leveraging the same tools they are already familiar with. Now to create this truly seamless hybrid cloud experience requires some fundamental components. They include: a common management and orchestration platform, unified networking, a common security model and one place to call for support.

This means IT can remain in control using all the same procedures and tools they are already familiar with, and the line of business can get to the cloud faster without having to re-architect the application. vCloud Air is the Ready-to-Run cloud. Meaning any application, with no changes.

vCloud Air Common Management

Automate with existing onsite tools

Automate service delivery and create any new service in minutes with vCloud Automation Center (vCAC).

Administer resources with one interface

Manage resources onsite and offsite using a single pane of glass. Use the vSphere web client to view and administer resources onsite as well as in vCloud Air

Monitor performance with existing tools

Use vRealize Operations plugin for vCloud Air to automate operations management using patented analytics and an integrated approach to monitor performance, capacity and configuration management.

Automate critical configuration and compliance management tasks on vCloud Air using vRealize Configuration Manager. Utilize the out-of-the-box configuration compliance toolkits and features such as deep configuration data collection, change tracking, and compliance assessment to assess operational and security compliance on vCloud Air workloads.

Get a holistic view into performance, capacity & configuration issues onsite and on vCloud Air with vRealize Operations Manager, vRealize Hyperic and vRealize Configuration Manager

Avoid performance bottlenecks

The Lab Layout

This lab environment consists of two "locations" - the local data center vSphere environment managed by vCenter vcsa-01a.corp.local and the off-site vCloud Air cloud managed via the web portal at https://portal.vchs-int.vmware.com. You will be accessing both locations throughout the lab.

Lab Manual Navigation

None of the lab modules are dependent on any other module so you can choose to take them in any order and to skip any that don't interest you. To jump to a specific module in the manual:

Click More Options at the top of this manual window

Click Table of Contents

Lab Details

Lab SKU: HBD-1483

Lab captains:

Sebastien Bourque

Gregg Parsons

Ivan Talley

Greg Fox

Module 1 - Automate IT Service delivery on VMware vCloud Air with vRealize Automation (60 Min)

Module Introduction

In this module, we will be demonstrating how to automatically provision new services from catalog to vCloud Air via vRealize Automation (vRA). At first, we will setup vRA to discover vCloud Air resources. Then, we will provision a service to vCloud Air and provide access to the user. Lastly, we will explore the different actions possible to operate that service.

What is vRealize Automation (vRA)?

VMware vRealize Automation is the new name for vCloud Automation Center, empowers IT to accelerate the delivery and ongoing management of personalized, business-relevant infrastructure, application and custom services while improving overall IT efficiency. Policy-based governance and logical application modeling assures that multi-vendor, multi-cloud services are delivered at the right size and service level for the task and that needs to be performed. Full lifecycle management assures resources are maintained at a peak operating efficiency and release automation allows multiple application deployments to be kept in-synch through the development and deployment process.

vRealize Automation turns IT into business enablers.

vRA Policy-Based Governance with Automated Delivery

vRealize Automation is VMware’s solution for Cloud Automation. It is a strategic tool to onboard customers, who have virtualized their environment, onto the cloud.

vRealize Automation supports a multi-vendor, multi-cloud Infrastructure that allows IT services to be delivered across a wide range of multi-vendor, virtual, physical, and cloud platforms. It can easily be configured to work with each of these infrastructure platforms by configuring vendor specific configuration parameters.

It provides the ability to stand up an infrastructure-as-a-service (IaaS), a platform-as-a-service (PaaS) or a desktop-as-a-service (DaaS). In addition it provide the capability to create any IT service to extend and round up the existing out of the box services capabilities. “Any” service can include storage-as-a-service, backup-as-a-service, or perhaps creating mailboxes to onboard new employees

vRealize Automation can provide the agility your business needs through automating delivery of personalized IT service. For Infrastructure organizations it provides :

Choice through flexibility to map and integrated into existing infrastructures, processes and environments

Same interface for service request across clouds

vRealize Automation provides a Unified Service Catalog that gives consumers an App Store ordering experience to make requests from a personalized collection of application and infrastructure services. In addition, administrators can use the Advanced Service Designer to automate, and make available custom IT services through the new IT service catalog. Service Entitlements and optional approvals allow IT administrators to deliver personalized IT service catalog which can be optimized to the specific needs of individual users or groups of users.

Introduction to the scenario

For the purpose of this module, we will operate through the eyes of four different individuals of a typical organization.

First is the Infrastructure-as-a-Service administrator or simply IaaS Admin. An IaaS admin brings resources under vRealize Automation's management.

Second is the Fabric Administrator. A fabric administrator configures the machine prefix that are used to create names for machines provisioned by using vRealize Automation (vRA). He also creates a reservation to allocate resources to a business group.

Third is the Tenant Admin. A tenant administrator creates at least one business group of users who need to request machines.

Finally, the user requesting workloads is a developer working on the UI of a project called devProjectA.

Preconditions

This lab is focused on automating the deployment and management of workloads to vCloud Air. For details on using vRA as a self-service portal for automating service delivery, please refer to HOL-SDC-1421 - Brokering IT

This lab has the services that we'll want to deploy using vRA already configured for you in order to focus our attention on the resources and endpoints we are deploying to.

Also, please remember that vCloud Air is running here in a pod for Hands on Lab purposes and is not an exact copy of vCloud Air.

Review vCloud Air Resources in portal

In this lesson we will view the vCloud Air portal from the perspective of an administrator.

IMPORTANT

**This lab is a facsimile of the vCloud Air. Issues that might arise in this environment are not an indicator of the performance or reliability of the actual service.

*Before you launch Firefox and attempt to login make absolutely sure the DesktopInfo watermark on the desktop says Ready (see graphic).

Open Firefox from desktop

To begin, let's launch the vCloud Air portal by clicking on Firefox from the desktop.

Logging into vCloud Air

Default page is the login page to the vCloud Air portal. Next we will proceed to log in.

vCloud Air Login

We will login as the hol@vmware.com user. Password is VMware1#

Please note the password is different in vCloud Air than in the rest of this lab. With vCloud Air we'll use VMware1# while in the rest of this lab we'll use VMware1!

Click on the "Sign in" button.

Allocated Resources

The dashboard is the main overview of resources available for administrators. As you can see, there is a listing of all the resources that we have available to us. We chose to allocate all of our available resources in a single virtual data center called HOL-DC1-VPC1-3 but we could have allocated the resources amongst two or more virtual data centers.

In this lab module we will be focusing on the automated provisioning of workloads to consume the resources that administrators have allocated for the deployed virtual datacenter (vDC).

If you'd like an overall tour of the VM Air interface and deploying virtual data centers, we encourage you to enroll in lab HOL-HBD-1481.

NOTE: For the purposes of this lab you have a 2GHz by 1GB by 10GB slice of resources purchased. This resource division is not representative of the actual service and used here for demonstration purposes only.

Select the Virtual Data Center

At the bottom, click the Virtual Data Center "HOL-DC1-VPC1-3"

Reviewing Virtual DataCenter Resources

This section gives an overview of the resources allocated to this virtual data center (VDC). It's also where the tenant administrator can manage network details related to the VDC using the Networks tab while the Gateways tab gives access to managing network access to the VDC. Assigning users to the VDC is done using the Users tab.

Click the Virtual Machines tab

VM Actions

Click the down arrow next to cloud-vm-01 (you will need to hover over the row in order to see the down arrow)

Review the actions possible from the portal.

Select View & Edit Details.

Viewing a VM configuration

This view shows the configuration and various properties of the VM. There are additional VM configuration options available by managing the same VM from vCloud Director using the link Manage VM in vCloud Director. However, we will stick to the vCloud Air interface in this case.

Let's simulate modifying the number of vCPUs of this VM.

Click the CPU line

Change a VM's configuration

If we wanted to change the assigned number of vCPU for this VM, we would simply replace the value shown here.

For now, let's leave it at 1

Click the X to cancel the operation.

Monitoring a VM

From the interface, you get basic monitoring of consumed resources by each VM, including CPU, memory and disk.

Adding a VM to the Virtual Data Center

To show how to access VMware's catalog as well as our organization's catalog, let's simulate adding a new VM.

Click the Add One button.

The VMware Catalog

The VMware Catalog tab shows the templates that are available in VMware's catalog. vCloud Air supports many operating systems - some of which are available in the VMware catalog. For this lab, the catalog only shows 3 items to choose from but the actual vCloud Air service lists many more than this.

My Catalog

The My Catalog tab lists those VM templates that your organization has created and made available to you. One way that templates can be added to the catalog is by using the vCloud Connector. vCloud Connector is covered in Module 3 of this lab.

For now:

Click the X since we will be using vRealize Automation to provision new VMs and services.

Leave the Firefox browser open - you will use it in the next lesson.

Create and configure a tenant

In this section, we will create a new tenant for our project.

To accomplish this, we will need the help of the system administrator.

The system administrator is typically the person who installs vRealize Automation and is responsible for ensuring its availability for other users. The system administrator creates tenants and manages system-wide configuration such as system defaults for branding and notification providers. This role is also responsible for monitoring system logs. In a single-tenant deployment, the same person might also act as the tenant administrator.

In this module, the system administrator is administrator@vsphere.local

Log in to vRealize Automation

As a system administrator, log in to vRA to create a new tenant.

1. User Name : administrator@vsphere.local

2. Password : VMware1!

3. Click Login

Possible error message

You may encounter a Login failed error message. It is a known issue.

If it happens at login, simply press the Go back to login page button and login again using the same credentials.

Edit Tenant

For the sake of this lab, the tenant DevProjectA has already been created. We will now configure it.

Select the tenant DevProjectA and click Edit

Add Identity Store

vRealize Automation uses identitystores to authenticate users. Each tenant is associated with at least one identitystore when it is created, but you can add new ones if necessary.

Move to the Identity Store tab, then select Add Identity Store

Configure Identity Store

Enter the empty fields as below :

Name : corp-identity

Type : Active Directory

URL : ldap://controlcenter.corp.local:389

Domain : corp.local

Login user DN : CN=Administrator,CN=Users,DC=corp,DC=local

Password : VMware1!

Group search base DN : DC=corp,DC=local

2. Click the Test Connection button

Test identity store connection

Confirm Connection is available. If not, review the information entered at the previous step and try again by hitting the Test Connection button

Click the Add button

Identity Store Configured

1. Identity Store is configured, click Next to continue configuring the tenant DevProjectA

Configure roles

In the Tenant administrators search field, enter admin-projecta

Click the search icon

Select admin projecta (admin-projecta@corp.local) to add it to the box below

Repeat the same steps for the Infrastructure administrators using admin-iaas@corp.local

Hit the Update button.

Tenant Configured

The tenant DevProjectA has been created and configured. The system administrator can then notify the IaaS Administrator admin-iaas@corp.local that resources can now be assigned to that tenant.

1. Select Logout.

Add a vCloud Air Endpoint in vRealize Automation (vRA)

Now let's set up vRA to use resources in vCloud Air. These tasks are usually done by the Infrastructure as a Service (IaaS) administrator whose main objective here is to make cloud resources available in vRA.

For vRA to manage the infrastructure, the IaaS administrator must:

Create endpoints

Store administrator-level user credentials for those endpoints

Add compute resources to a fabric group

IaaS Administrator Tasks

The Infrastructure Administrator is the person who defines the managed endpoints that are required to interact with and discover the infrastructure resources.

In this module, the endpoint will be a Virtual DataCenter (vDC) in vCloud Air.

Create a Managed Endpoint

In order to have vRA to manage vCloud Air, the Infrastructure Administrator must define one or more vCloud Air endpoints using the appropriate location and credentials. This information is stored encrypted in the vRA repository.

Once the endpoints are configured, vRA can discover the compute resources and policies provided by vCloud Air.

In the case of vCloud Air, those resources are virtual data centers and the software-defined service associated with these virtual data centers. Policies include things like vApp templates which control how a VM will be provisioned.

You will need a separate endpoint for each virtual data center within your vCloud Air deployment. Endpoints can be defined one at a time via the vRA management console or imported in bulk via a CSV (formatted text) file.

For the remainder of this lesson, we will see how to manually add our vCloud Air virtual data center as an endpoint in vRA and discover the available resources.

Browse to the vCAC Login Page

For this lab, the tenant created in vRA in the previous lesson was named DevProjectA.

The user admin-iaas@corp.local is our IaaS administrator for this tenant and admin-projecta@corp.local is our tenant administrator.

View the Endpoint Information

Name : vCA-HOL-DC1-VPC1-3 (or whatever name we want to assign to this endpoint)

Description : A description of your choice for the endpoint

Address : Paste from the vCloud Director API URL we copied from the vCloud Air portal (you may need to go back in vCloud Air and copy it again). Note that anything after the :443/ should be removed.

Organization : This must match the virtual data center name in vCloud Air.

Credentials : Click the ellipsis

Select New Credentials

Select New Credentials

Add vCloud Air Credentials

Enter the credentials as image below. These are the same credentials that you used to log into the vCloud Air portal.

Enter name vCloud Air Cred

User Name is hol@vmware.com

Password is VMware1# (again, please note the # at the end, not a !) and needs to be entered twice

Click the OK button

Confirm credentials

Confirm selected credentials and click OK

Close the Endpoint Configuration Page

Click OK to close the page (you may have to scroll down to see the button)

Data collection

The Data Collection process will query vCloud Air to discover the available resources in the vCloud Air virtual data center.

For the endpoint, hover over the arrow to the right of the endpoint name and click Data Collection

Start Data Collection

Start a new data collection by clicking the Start button

Data Collection Started

Select Data Collection again to return to the Data Collection window and you will see that data collection has been requested or has started.

Data Collection Succeeded

Data collection in this environment should take between two and five minutes.

Click the Refresh button occasionally to check Data Collection status. Once you see the "succeeded" message it means that vRA is now aware of the resources available in the vCloud Air virtual data center.

Log out of vRA.

After the vCloud Air Virtual Data Centers are discovered, they are not automatically placed under vRealize Automation’s control. You will first need to have a Business Group and will need to add the discovered resources to a Fabric Group.

Organize Resources into a Fabric Group

This lesson will focus on how to add the vCloud Air virtual data center (VDC) to a Fabric Group in vRealize Automation and how to reserve resources for use by a Business Group.

Fabric Admin organizes Resources into a Fabric Group

Now that we've added our vCloud Air Endpoint in vRA, to place these added resources under vRA's control, the resources need to be associated to a Fabric Group.

An IaaS administrator can organize virtualization compute resources and cloud endpoints into fabricgroups by type and intent. One or more fabric administrators manage the resources in each fabric group.

Fabric administrators are responsible for creating reservations on the compute resources in their groups to allocate fabric to specific business groups. Fabricgroups are created in a specific tenant, but their resources can be made available to users who belong to business groups in all tenants.

Create a Fabric Group

Enter Fabric Group info

Compute resources: the vCloud Air Endpoint that was created earlier is selected

Scroll to the bottom of the page and click OK

The vCloud Air compute resources that were previously discovered have been assigned to the Fabric Group.

Logout

Logout of vRealize Automation.

Create a Business Group and Machine Prefix

In this section, we will create a business group for the tenant DevProjectA.

A businessgroup associates a set of services and resources to a set of users, often corresponding to a line of business, department or other organizational unit.

Business Groups

Tenant administrators create businessgroups. Users must belong to a businessgroup to request machines.

In this module, the tenant administrator for ProjectA is admin-projecta@corp.local.

The Machine Prefix

But before we go on to create a Business Group, we need to create a machine prefix.

Machine prefixes are used to generate the names of virtual machines provisioned through vRealize Automation. Machine prefixes are shared across all tenants. Tenant administrators and business group managers select these machine prefixes and assign them to provisioned machines through blueprints and business group defaults.

Every business group has a default machine prefix. Every blueprint must have a machine prefix or use the group default prefix.

Fabric administrators are responsible for managing machine prefixes. A prefix is a base name to be followed by a counter of a specified number of digits. For example, a prefix of g1dw for group1 and developer workstation, with a counter of three digits produces machines named g1dw001, g1dw002, and so on.

Login as the Fabric Administrator

We will log in as the Fabric Administrator which is, for this module, admin-fabric@corp.local.

Enter the credentials:

User name: admin-fabric@corp.local
Password: VMware1!

Click the Login button

Browse to the Reservations Group

Within the Infrastructure tab, navigate to Reservations -> Reservations

Select New Reservation -> Cloud -> vApp (Cloud)

Review the Reservation

Compute Resource : this is the vCloud Air Endpoint we added earlier. From the drop-down menu, select hol-dc1-vpc1-3

Optionally you can customize the name that is automatically generated.

Tenant : this is the tenant that has been associated with the Compute resource. No change required.

Business Group : the Business Group within that Tenant. No change required.

Optionally you can specify a Reservation Policy and Machine Quota. Leave both fields empty.

Choose a priority for this reservation and optionally specify any custom properties. Enter 1 as the Priority.

Reservation Resources

Click on the Resources tab.

This tab shows the amount of RAM and storage that has been allocated from the vCloud Air endpoint to our Business Group.

In the Memory section, add 1 under This Reservation

In the Storage section, add a checkmark next to SSD-Accelerated

Storage Reservation

Add a 2 under This reservation reserved

Add a Priority of 1

Click the green checkmark

New Reservation Network

Click on the Network tab

Select the isolated network

Click OK to finish configuring the Reservation

Log Out of vRA

Click Logout

Create a Blueprint

Machine blueprints determine a machine's attributes, the manner in which it is provisioned, and its policy and management settings. A tenant administrator or business group manager creates a vAppcomponentblueprint for each component machine to be included in the vApp. The vAppcomponentblueprint must exist before the vAppblueprint can be configured.

Create infrastructure service or machine blueprint

The last few steps in this process is to create an infrastructure service or machine blueprint, author vRA Services, publish to the Service catalog and Entitle users to access specific services.

Configuring vRA Blueprint Policies to manage VCD vApps

vRA can provision a vApp as a single entity, but manage the component VMs individually. In order to enable this functionality, the vRA admin needs to configure Blueprints for both component VMs as well as the vApp Blueprint.

The vApp Component Blueprint’s policies control how the machine will be provisioned, how much resources it can consume, and which management functions users are allowed to perform

The vApp Blueprint provides governance policies which limit attributes of the multi-machine vApp. (i.e. The max number of machines of each type)

Machine blueprints determine a machine's attributes, the manner in which it is provisioned, and its policy and management settings. A tenant administrator or business group manager creates a vAppcomponentblueprint for each component machine to be included in the vApp. The vAppcomponentblueprint must exist before the vAppblueprint can be configured.

New vApp Component Blueprint

The vAppcomponentblueprint provides information for provisioning a vApp virtual machine in vCloud Director.

Within the Infrastructure tab, navigate to the Blueprints -> Blueprints area.

Select New Blueprint -> Cloud -> vApp Component (vCloud)

Build Info

Choose the Build Information tab, then :

Using the drop-down menu, select Server as for the Blueprint Type.

In Action, choose Clone

In Provisioning workflow, select vAppCloneWokflow

Click the ellipsis in the Clone From area

Select Template

Displayed is a list of available vApp Component Templates available for our endpoint in vCloud Air.

Select the base-sles-01b vApp Component Template

Click OK.

Move to the next step to add machine resources.

Machine Resources

From the Machine Resources section you will choose the various machine resources, including the minimum and maximum values for # of CPUs, Memory, and Storage. In addition, you can customize the existing storage volumes, or add additional volumes.

For this lab, under Minimum, leave 1 in the #CPUs field and at 512 the Memory (MB) field

Under Maximum, enter 2 for #CPU, 1024 for memory and 3 for storage

Move to the next step.

Blueprint info

Scroll back up and click the Blueprint Information tab. Review the information below.

In the Name field, enter DevVM-SLES

In the Machine Prefix field, select the devprjA- machine prefix we created earlier

Add a cost of 1 in the Cost (daily) box

When you’re finished, click OK.

vApp Blueprint

vApp Component Blueprint is now created.

Create vApp Blueprint

Next let’s create a vApp Blueprint.

Within the Blueprints area, hover over New Blueprint and select Cloud -> vApp (vCloud).

vApp Blueprint Build Info

Upon selecting the vApp Template, click the Build Information tab.

Make sure the Action field shows Clone

In the Provisioning workflow, confirm vAppCloneWorkflow is selected

In the Clone from section, click the ellipsis button.you’ll then see the list of component blueprints. Click the edit icon.

Select vApp Template

In the Select vApp Template window, select base-sles-01b and click OK

Select vApp Component Blueprint

Click the pencil to edit the vApp Component Blueprint

Select vApp Component Blueprint

In the Components section, click the * Blueprint box to display a list of available blueprint components

Select the component blueprint we created earlier (DevVM-SLES)

Click the green check to save.

vApp Blueprint Info

Under the Blueprint Information tab, fill out all of the required fields.

Under Name, enter SLES-VM

Next to Machine prefix, use the drop down menu to select devprjA-

Under Archive (days), enter 1.

Enter a cost of 1

Click OK when finished.

Blueprints Created

Blueprints are created. The final step is to publish the vApp Blueprint.

Publish blueprint

Blueprints are saved in the draft state and must be manually published before they appear as catalog items. You need to publish a blueprint only once. Any changes you make to a published blueprint are automatically reflected in the catalog.

For this lab, you may or may not publish the vApp Component blueprint. Publishing a component blueprint would bring it under the control of approvals. However, component blueprints can not be used to request individual component machines.

To publish the SLES-VM vApp blueprint, select the Publish option from the drop-down menu next to the vApp Blueprint SLES-VM.

Click OK in the ensuing window asking for confirmation.

The blueprint is now a catalog item.

Log out

The blueprint is now created and published. With that blueprint we determined the machine's attributes, the manner in which it is provisioned, and its policy and management settings.

Logout of vRA.

Deploy a Service to vCloud Air

In this lesson, we'll go over the last few steps required before requesting a new VM to be created into our vCloud Air VPC.

First, before we'll add our developer to our business group responsible for developing the UI of ProjectA.

Next we'll manage our entitlements and then make a request for a new VM to be provisioned into vCloud Air.

Please note that there is a known issue in the vCloud Air version used in this lab. This issue could prevent the creation of the VM to succeed.

Module Conclusion

In conclusion, we have shown you the automated provisioning capabilities for vCloud Air that are available as part of vRealize Automation (vRA).

What we've also seen is just an overview of how the VMware ecosystem can leverage and tie-in to vCloud Air to provide a powerful solution for self-provisioning within the datacenter and to external resources.

There are three additional modules available in this lab. We will discuss the monitoring of resources inside vCloud Air with vRealize Operations, then we'll go over the migration of workloads to and from the local datacenter to vCloud AIr. Last, we'll touch on the automation of resource management inside vCloud Air using PowerCLI.

Module Introduction

In this lab module you will see how you can monitor workloads not just in your local datacenter but also in vCloud Air using the VMware's vRealize Operations management platform. vRealize Operations automates operations management using predictive analytics and an integrated approach to performance, capacity, and configuration management. It enables IT organizations to get greater visibility and actionable intelligence to proactively ensure service levels, optimum resource usage, and configuration compliance in dynamic virtual and cloud environments. vRealize Operations can gather performance metrics and entity relationships from many different IT operations tools such as vCenter, EMC storage management tools, NetApp management tools, Microsoft SCOM, Oracle Enterprise Manager, etc via a Management Pack. A comprehensive list of available adapters and management packs can be found on VMware's Solution Exchange at http://solutionexchange.vmware.com.

VMware has a vRealize Operations management pack specifically for the collection of performance metrics, configuration values and entity relationships from vCloud Air. You will be working in the vRealize Operations UI for the majority of this module. You will configure an instance of the vCloud Air management pack, explore the metrics and relationships collected by the management pack, view the dashboards that are included with the management pack as well as those included for vSphere and, finally, you will create a new dashboard to view information from both the vSphere and the vCloud Air environments.

This lab will take approximately 45 minutes to complete.

The Lab Layout

As a reminder from the lab introduction, this lab consists of two "locations" - the local data center vSphere environment managed by vCenter vcsa-01a.corp.local and the off-site vCloud Air cloud managed via the web portal at https://portal.vchs-int.vmware.com. Also as a reminder, since these labs are self-contained pods without network access, you will not be connecting to the actual vCloud Air service in the lab. While we have done our best to maintain the full functionality and robustness of the live vCloud Air service it is possible that you will run into issues that are related to us having scaled the service down to fit in a lab pod.

Configure the vCloud Air Management Pack in vRealize Operations Manager

vRealize Operations Manager interfaces with a multitude of monitoring and management tools via integration connectors called Management Packs. These management packs can include the ability to retrieve performance metrics, configuration values and relationship information as well as a set of pre-built dashboards specific to the information being retrieved.

The vCloud Air Management Pack is designed to bring relationship and performance information about vCloud Air clouds, data centers, and virtual machines into vRealize Operations Manager.

Log in to the vRealize Operations Manager User Interface

Use the Google Chrome shortcut on the desktop to launch the browser

The Google Chrome browser home page should launch the vR Ops login page. If not, click the bookmark or enter the following URL in the address bar: https://vrops.corp.local

Enter the following credentials and click the Login button

User name: admin

Password: VMware1!

Navigate to the Solutions Page

Management Packs are managed in the "Solutions" area of the Administration menu.

Click the Administration icon.

Note that Solutions is the first item in the Administration page and is highlighted.

Select the VCHSAdapter Solution

Click the Configure button

Add an Instance of the vCloud Air Management Pack (MP for VCHS)

Click the + icon to add a new instance of the management pack

Enter the Required Information

Display Name is a name of your choosing. It will identify this specific instance of the management pack in case you were to add additional vCloud Air management packs for other clouds that you subscribe to. Type "vCHS MP".

Click the triangle next to Advanced Settings to expand the section

VCHS Server is the server portion of the URL you use to connect to your vCloud Air cloud web interface. The default value in the field is correct for real-world applications of the management pack. For this lab, however, the server name is portal.vchs-int.vmware.com.

Auto Discovery indicates whether or not you want the management pack to discover all resources in the vCloud Air cloud. If you leave this selection as 'false' you would need to perform a manual discovery every time you wanted to poll the cloud for new resources and potentially add them into vCenter Operations Manager for monitoring. In this case, choose 'true' so the management pack will automatically and continually find new resources as they are provisioned in your vCloud Air cloud

The remaining fields are related to SSL certificates. Since we are using self-signed certificates in the lab leave the default values.

Click the Add link to assign a credential set to this management pack instance.

Add a Credential Set to the Management Pack Instance

Enter the credentials that will be used by the management pack to connect with the vCloud Air management API.

Credential name: vCHS credentials (This can by any name you choose. It is used to distinguish this particular credential set from any others that might exist)

User Name: hol@vmware.com (The user name that you use to log into the vCloud Air web portal)

Passwrod: VMware1# (Note that this password differs from the standard password used in the lab. It ends with a hash symbol instead of an exclamation point)

Click the OK button to save the credentials

Test Then Cancel the Adapter Configuration

Click the Test Connection button to verify your configuration. If the test is not successful check all entries including the credentials for accuracy

When the test is successful, click the Close button. Do not click the Save Settings button. An adapter instance was already configured in the lab environment in order to have some historical information available when you look at metrics later in this module. [Note: due to the low screen resolution in the lab, you will need to click in one of the fields and then repeatedly press the Tab key on your keyboard until you see the Close button]

In the resulting dialog box, confirm that you do not want to save the configuration

The Management Pack Configuration is Complete

By default, the vCloud Air management pack is set to poll the management API of the service every five minutes. Since the Auto Discovery feature was set to true in the management pack configuration, it will run a discovery of cloud resources on the first scheduled polling cycle and will start displaying metric values on the following and subsequent polling cycles.

View Performance Statistics in the vCloud Air Portal

Some basic configuration values and performance statistics are available in the vCloud Air portal for each virtual machine that is running there.

Log into the vCloud Air Portal

Leave the Google Chrome browser open since you will return to it in the next lesson.

Use the Mozilla Firefox shortcut on the desktop to launch the browser (not the Google Chrome browser that was used in the previous lesson)

Click the 'vCHS Portal' bookmark on the bookmark bar or type in the following URL: https://portal.vchs-int.vmware.com

Enter the following credentials and click the 'Sign in' button

User name: hol@vmware.com

Password: VMware1# (note that this password is different from the standard password used throughout the labs. It ends with a hash symbol instead of an exclamation point)

Navigate to the List of VMs

The Dashboard shows a summary of the total resources allocated to virtual datacenters (VDCs), a count of the total number of VMs provisioned, the total number of public IP addresses allocated and, at the bottom, some specifics about each of the VDCs.

In order to see the list of VMs, click the Virtual Machines tab

Navigate to the VM Details

The Virtual Machines tab lists all of the provisioned VMs in your vCloud Air cloud. Note the names of the VMs that are running in your vCloud Air cloud. To see the details for a given VM,

Click the VM name link

View Current CPU and Memory Usage and Provisioned Disk Size

The Virtual Machine Details screen shows current:

CPU usage and virtual CPU count

Memory usage and memory assigned

Provisioned disk sizes

Navigate to the Monitoring Tab

Click the Monitoring tab

VIew the Monitoring Graphs

The Monitoring tab shows the following historical values for the VM:

CPU Usage (in % and MHz on the different scales)

Memory Usage (in % and GB on the different scales)

Disk Reads

Disk Writes

Note that you can select different time ranges for the metric graphs: Past 24 Hr, 7 Days or 14 Days

Lesson Summary

While the Dashboard and Monitoring tabs provide some good, basic usage and configuration statistics, they are only a subset of the metrics and values that are collected and available via the vCloud Air management API. In the remainder of the lessons in this lab module you will investigate how to configure vRealize Operations Manger to access those additional metrics values and how you can gain additional visibility into the performance of your workloads running both in vCloud Air and on your on-premises vSphere infrastructure.

View the Available Information in the vRealize Operations Environment Overview

In this lesson you will learn a little bit about the vRealize Operations Manager interface.

Browse to the Environment Overview

Back in the Google Chrome browser, you should still be logged in to vR Ops

On the Administration page,

Click Environment Overview

Here you will see a list of all objects currently in this implementation of vRealize Operations. An object is anything that vRealize Operations can collect metrics from. Some examples of types of objects are VMs, hosts, datastores, vCHS clouds, vCHS regions, vCHS VMs, etc.

Filter the Object List

You might want to filter the list of resources displayed in the Environment Overview. You can filter the list using a combination of object kind tags and a text search.

One way to filter the list of resources to show only resources from the vCloud Air Management Pack that you just configured is to:

Expand the list of Adapter Types by clicking the + symbol in front of it

Click MP for VCHS (xx) to filter the view to only show objects that were discovered by that Adapter Kind (the xx value indicates how many objects are in the group)

The resulting list of objects will vary depending on how long it takes you to complete these tasks and how long your specific lab environment has been running. You might see one of two possible lists (in chronological order):

Just a single line showing the adapter instance itself (vCHS MP). When a management pack is first configured it will display only object that is the management pack itself. This indicates that the management pack has not yet finished the process of connecting to the remote source (the vCloud Air monitoring API in this case), querying the remote source for an inventory of resources, and writing those resources to the vRealize Operations database.

Several lines representing the managment pack itself and a list of all discovered objects. Management packs typically are configured to poll the remote source every five minutes so this state should exist within the first 5-10 minutes after the management pack has been configured.

Open a VCHS VM's Object Detail View

The Object Detail view will allow you to see the specific information being collected by vRealize Operations Manager about an object.

Click somewhere on the line showing the cloud-vm-01 object

Click the Show Detail icon (hovering over the icons at the top of the table will show text describing the function of that link in this case the text is "Show Detail"

Navigate to the All Metrics View

The cloud-vm-01 virtual machine object is selected. In order to see some relationship and metric information about the object:

Click the Troubleshooting tab

Click the All Metrics sub-tab

Note that this pane shows relationship information for the selected object. You can double-click other objects in the hierarchy to move focus to them and show their relationship information. When you are done navigating through the hierarchy, return to the cloud-vm-01 object.

Since the screen resolution in the lab is relatively low, click the arrow indicated to collapse the relationship map.

Click the arrow indicated to collapse (minimize) the navigation pane.

View Metric Graphs

In order to have vRealize Operations Manager show historical metric graphs for one or more resource metrics:

Double-click any metric name

The graphs you see will depend on how long your lab instance has been running. If it has only been a few minutes since the pod was provisioned, you might see single data points or very short graph lines.

There are several icons just abpve the Metric Graph panel that allow you to hide/show certain features on the graphs or perform actions like mashing all graphs together or creating a dashboard from the displayed panel or change how things are displayed like the calendar icon that lets you choose from a set of pre-determined time durations or let you pick specific dates and times that you want to focus on.

There are also icons on each individual graph that let you do things like capture an image of the graph, export the data being plotted, change the position of the graph of remove the graph from the Metric Graph panel.

Feel free to explore the functions of all of the icons in the Metric Graph panel and to graph additional metrics from the Metric Selector panel

View the Included vCloud Air Dashboards

When the vCloud Air management pack is installed in vRealize Operations a set of pre-built dashboards are created. These dashboards utilize the metrics that are collected by the management pack via the vCloud Air monitoring API to aid in troubleshooting and performance monitoring of your vCloud Air service from your vCloud Air Cloud down to the vCloud Air Virtual Data Center (VDC) and to the vApp and VM.

Note that while these pre-built dashboards provide a lot of information to help you understand usage and performance of various vCloud Air objects, they are only a start. The dashboards can be modified if desired. You also have the ability to create new dashboards to help you visualize the information you want to see in the way you want to view it. Later in this lab module you will have the opportunity to build a new dashboard from scratch.

Navigate to the Home Page

Click the small arrow to reveal the pane

Click the Home icon

Navigate to the vCloud Air Dashboards

Click the small arrow to hide the pane (due to the low screen resolution in the lab)

Click the arrow next to Dashboard List to expand the list of available dashboards and dashboard groups

Click the check-box next to VCHS in order to display all dashboards in the vCHS/vCloud Air dashboard group

The VCHS VM Performance Dashboard

In the row of active dashboards, click theVCHS VM Performance tab

This dashboard provides a view of the top 25 virtual machines based on different utilization metrics, such as:

CPU Ready %

Memory swap in and out rates

Network packets received and transmitted

On the dashboard you see bar charts that represent the values of the indicated metrics as of the most recent poll of the API. Note the following features:

The title which indicates the metric and unit of measure being displayed in the dashboard widget

The list of objects that the metric is attached to (in this case VCHS Virtual Machine)

The metric value

The name of the object (in this case the VM name)

You can also click any metric value or VM name then click the Object Detail icon to visit the detail page for that object (VM)

The VCHS VM Utilization Dashboard

In the row of active dashboards, click the vCHS VM Utilization tab.

This dashboard provides a view of the top 25 virtual machines based on different performance metrics, such as:

CPU Usage Average %

Memory Usage %

Disk Space Provisioned

Network rate - transmitted and received

Notice that unlike the previous dashboard, this one has been configured with sparkline dashboard widgets that will show a historical trend for any current value in the utilization widget above it. For example:

Click the value for the cloud-vm-01 object in the "Top 25 VMs by Memory Usage(%)" widget.

You will see a metric sparkline showing a recent historical graph line of the metric value.

These metric sparkline widgets could also be added to the previous dashboard if desired. In fact, all of these dashboards can be customized to show different or additional metric values or to display the information in different ways based on what dashboard widgets are used.

The VCHS Data Center Utilization Dashboard

Navigate to the VCHS Data Center Utilization dashboard.

This dashboard provides a view of the top 25 data centers (as opposed to VMs that we have been viewing) based on different utilization metrics, such as:

CPU reservation used

Memory reservation used

Storage capacity provisioned

The VCHS Cloud Utilization Dashboard

Navigate to the VCHS Cloud Utilization dashboard.

This dashboard provides a view of the top 25 clouds based on different utilization metrics, such as:

CPU reservation used

Memory reservation used

Storage capacity provisioned

The VCHS Troubleshooting Dashboard

Navigate to the VCHS Troubleshooting dashboard.

This dashboard provides information about all of the vCHS objects. The information is provided hierarchically such that you can view the relationship between various vCHS objects. When you:

Click on an object in the vCHS Object widget or the vCHS Relationship widget

Corresponding metrics and health information is shown for that object.

The VCHS Heatmaps Dashboard

Click and hold the arrow at the top-right corner of the dashboards to scroll across the dashboard tabs.

Navigate to the VCHS Heatmaps dashboard.

Heat maps are powerful tools to help visualize how a particular measurement/metric compares across an entire environment. With heat maps you can quickly find objects that stand out by comparing the size and/or color or each of the boxes with the other boxes. In this lab, we have a very small environment that isn't doing much so it is hard to show a good example.

This dashboard provides heat maps of the virtual machines in each cloud and data center, based on various usage metrics. When you click on a box in the heat map, a corresponding metric graph is displayed beneath the heat map.

Note that heat map widgets can each have multiple configurations that can be viewed by selecting the desired configuration title from the drop-down menu as indicated.

The VCHS Alerts Dashboard

Navigate to the VCHS Alerts dashboard.

This dashboard provides information about alerts in the system. Selecting an alert will display hierarchy and metrics information for the object about which the alert is generated. The alerts can be viewed hierarchically.

It is not likely that there will by any active alerts for vCloud Air objects in this lab.

Lesson Summary

Remember that these pre-built dashboards are only a start. You have the flexibility to add, delete or modify them. You can also create new dashboards - something that you will get an opportunity to do later in this lab module.

View the Included vSphere Dashboards

vRealize Operations Manager also includes a set of pre-built dashboards for the vSphere environment. These dashboards utilize the metrics that are collected by the vCenter Adapter via the vCenter API to aid in troubleshooting and performance monitoring of the vSphere infrastructure from your virtual Datacenters, Clusters, Hosts, VMs and Datastores.

Note that while these pre-built dashboards provide a lot of information to help you understand usage and performance of various vSphere resources, they are only a start. The dashboards can be modified if desired. You also have the ability to create new dashboards to help you visualize the information you want to see in the way you want to view it.

These vSphere dashboards are analogous to the vCHS dashboards that you explored in the previous lesson. Feel free to view these vSphere dashboards and note that the resources shown in them are the VMs, hosts, clusters and datastores that make up the infrastructure that exists in the local (physical) datacenter in this lab module's scenario.

Navigate to the vSphere Dashboards

Click Dashboard List to display a list of dashboard groups and individual dashboards

Hover over the Sphere Dashboards group to display a list of all dashboards in that group or just click on the check-box to the left of the group to open all of the dashboards in the group.

You will see a list of the vSphere-specific dashboards that are included with vRealize Operations Manager

Create an Application Definition

vRealize Operations gives you the ability to create application definitions (manually or programmatically) in order to group and relate sets of resources. For example, in our lab scenario we have a 3-tier stack running on a total of four virtual machines. We can create an application definition in vRealize Operations that will allow us to model this 3-tier application and to calculate health scores for each of the tiers and for the application overall.

Lab Module Scenario Review

Remember that the scenario we are modeling in this lab includes a 3-tier application that is split running with two VMs in the local data center and two VMs in vCloud Air. For the scenario, the database (vccs-01a.corp.local) and application (vccn-01a.corp.local) servers are running in our local data center on vSphere infrastructure. We have two web servers (cloud-vm-01.corp.local and cloud-vm-02.corp.local) both running in vCloud Air.

In this lesson, you will create a new application definition in vRealize Operations Manager to represent and monitor this 3-tier application.

Browse to the Environment Overview

Click the small arrow to expand the navigation pane (again, this was minimized due to the low screen resolution in the lab)

Click Environment to open the Environment Overview

Create a New Application

Click the Applications tab to show the Applications Overview

Click the + symbol to create a new application

Start With an Application Template

Application templates include pre-defined application tiers for various layouts. As you will see, the templates can be modified after the application shell is created.

Select the Basic n-tier Web App(Network | Web | App | DB) template.

Click OK to create the template.

Name the Application and Remove Unwanted Tiers

Since we don't have any networking resources in this lab environment we will remove the 'Network' tier. However, if you had a vRealize Operations Manager management pack that was pulling in network data, you would probably want keep that tier. Likewise, if you had a management pack pulling in storage data you might want to add a storage tier to the application.

Select the text in the Application name box and overwrite it with the name of the application definition that you are creating: Hybrid Application

Click the Network tier to highlight it

Click the Remove Selected Tier button

Find the Desired Object Type in the List

In order to add resources to the various tiers, you need to first select them in the list pane. You could search for the name of the resource you want in the list pane search box. However, in this case we want to show all vCHS Virtual Machine object types because we know that our web servers are both VMs running in our vCloud Air virtual data center.

Click the + to expand the Object Types list

Select the VCHS Virtual Machine Object Type

Scroll down in the list of resource kinds. NOTE: Do not scroll too far down - you want to stay in the Object Type group.

Click the VCHS Virtual Machine line

Note that all resources of the selected kind are now displayed in the list pane to the right

Add the Web Server VMs to the Web Tier

In order to add both of these servers to the web tier of the application:

Click Web in the tier list to select that tier

Click the Add All Objects To Parent Button

Note the Resources in the Web Tier

Note that the two VCHS Virtual Machines have been added to the Web Tier

Select the Application Tier and Find the Virtual Machine Resources

Click the App tier to select it

Click the Deselect All icon to clear the selected resource kinds below

Click the Virtual Machine resource kind in the list

Note that all Virtual Machine resource kinds from the local vSphere infrastructure are shown in the List panel (depending on the state of the lab module environment there may be additional VMs listed).

Add the Application Server to the App Tier

Click the vccn-01a (application server) and drag it to the 'App' Tier Objects pane

Release the mouse button to add the resource to the tier

Add the Database Server to the DB Tier

Click DB in the Tiers panel

Click the vccs-01a (application server) and drag it to the 'DB' Tier Objects pane

Release the mouse button to add the resource to the tier

Save the Application Definition

You have now created a simple 3-tier application definition in vRealize Operations. Verify that your tiers have the correct number of resources in them.

Click the Save button [Note: due to the low screen resolution in this lab, you will need to click on an object in the list then repeatedly press the Tab key on your keyboard until the Save button appears at the bottom of the screen]

View Your New Application Status

When you first create an application definition, it will be treated by vRealize Operations Manager like any other newly discovered or newly created object. All badges will be grey until after a polling and analytics cycle has completed (typically within five minutes).

View Your Updated Application Status

Wait a few minutes, then:

Click the page refresh icon

Once vRealize Operations Manger processes the next collection and analytics cycle, you should see your application and all components have turned green.

Lesson Summary

In this lesson you created an application definition within vRealize Operations Manager that represents objects from both the local vSphere environment and the vCloud Air public cloud environment. In the next lesson, you will create a dashboard to view some information about your new application.

Create a New Dashboard to View Application Health

Now that you have created an application that is running split between your local data center and vCloud Air, it might be helpful to add a dashboard to vRealize Operations Manager to help you visualize the performance of your application's infrastructure on both platforms as well as some hierarchical relationships. Note that if you had a vRealize Operations management pack in place to pull in operating system, middleware, end-user experience, storage, networking, etc. information you could create a dashboard with a more holistic view of the application and its performance.

This lab module lesson will quickly walk you through the steps to create a working dashboard - one possible dashboard that you might want to have for an application. However, it is beyond the scope of this lab module to go into detail on what the widget options are, design choices, etc. VMware offers a training course that focuses on the advanced capabilities of vRealize Operations Manager such as adapters, customization, and management topics. The course includes sections on how to use adapters, define custom super metrics and customize dashboards. If you are interested in learning more about creating vRealize Operations Manager dashboards that course would be worth investigating.

Navigate to the Home Page

Click the small arrow to expand the navigation pane

Click the Home icon to navigate to the Home page

Add a New Dashboard

Click Actions to the right of the Dashboard List

Click Create Dashboard

Dashboard Configuration

Type the dashboard name: Hybrid Application

Click Widget List to proceed to the next step

Widget List

Find and drag the following widgets to the right pane:

Health Chart

Object Relationship

Metric Picker

Metric Chart

Editing Widgets

Do not click these icons now, just understand what they will do when clicked.

Collapse the widget to just its title bar.

Edit the widget configuration.

Help on the widget - Note that vRealize Operations Manager help is hosted at pubs.vmware.com so you will not be able to see the help since the lab environment is not connected to the internet.

Delete widget from the dashboard

Edit the Health Chart Widget

Click the Edit icon (see previous step) to edit the widget

Widget title: Hybrid Application Health

Self Provider: On

Period Length: Last Hour

Expand Applications (Full Set) group. Then click the Hybrid Application (4) line to select the application.

Expand the Object Types group. Then click Application to filter only on the overall application object.

Click Save

Edit the Object Relationship Widget

Click the Edit icon to edit the widget

Self Provider: On

Search for and then click Hybrid Appli...

Click Save [Note: You will need to repeatedly press the Tab key until you see the Save button]

Continue to Widget Interactions

Click Widget Interactions

Widget Interactions

Once you have added widgets to the dashboard, you can configure interactions between the widgets. For example, on this dashboard if someone clicks on an object in the Object Relationship widget, the Metric Picker widget will display all available metrics for that object. If someone double-clicks one of those metrics the Metric Chart widget will display a historical graph of that metric.

[Note: The order of the widgets in the interactions list may be different from what is shown in this screen shot]

For the Metric Picker widget select Object Relationship from the drop-down list

Re-size the Widgets on Your Dashboard

Now you can re-size the relative heights of the widgets on your dashboard

Click the small arrow to collapse the navigation pane

Hover over the lower edge of the Hybrid Application Health widget until the cursor changes then click and drag to shrink the height of the widget

Hover over the lower edge of the Object Relationship widget until the cursor changes then click and drag to increase the height of the widget

Navigate the Object Relationship Widget

[Note: The position of the objects may be different from what is shown in the screen shot. However, the hierarchy relationships should be the same.]

In the Object Relationship widget, double-click the Web tier to see its relationships

Now single-click the cloud-vm-01 object

Note that the Metric Picker widget now has metric classes for the cloud-vm-01 object

Generate Metric Graphs

To view historical values for any metric (in this case any metric available from the cloud-vm-01 vCloud Air VM), the metric picker can be used in conjunction with the widget interactions that you set up earlier.

Expand the CPU Usage metric group

Double-click the Usage Average (%) metric

Note that a historical graph of the average CPU usage for the cloud-vm-01 object is displayed in the Metric Chart widget

Navigate Up the Relationship Tree

You can navigate up as well as down the Object Relationship widget to see relationships and health information. You navigated down from the Hybrid Application to the Web tier to the cloud-vm-01 vCloud Air virtual machine. Now navigate up a different path to see the vCloud Air hierarchy. Double-click in the widget to navigate:

cloud-vm-01

vApp

Virtual Data Center

Virtual Private Cloud

As you navigate through the tree you will see that some objects have metrics in the Metric Picker widget that can be graphed if desired.

Module Conclusion

This module introduced you to the vCloud Air management pack for vRealize Operations Manager and showed you how to configure the management pack and how you might use vRealize Operations Manager to monitor the performance of your infrastructure running in vCloud Air alongside the components running in your own vSphere environment. You also got a quick look at how you might create a custom dashboard using elements from both data sources in order to get a holistic look at the infrastructure supporting a split or hybrid deployment.

The other modules in this lab cover different aspects of managing your vCloud Air cloud. You can page forward to proceed to the next module on using the vCloud Connector to migrate workloads between your local vSphere environment and the vCloud Hybrid Service or you can click the Table of Contents link under MORE OPTIONS above to jump directly to a specific module.

Module Introduction

VMware vCloud® Connector™ links your internal private cloud with public clouds, so you can manage them as a single hybrid environment and transfer workloads back and forth. It provides a unified View into Cloud Workloads.

Using the same vSphere® client that you use today, you can now view, copy and operate on workloads, including virtual machines, vApps and templates across internal data center and private or public clouds like the VMware vCloud Air. From the workloads view, you can view and manage virtual machines and vApps. From the catalogs view, you can view and manage your templates. Add up to ten public or private clouds to vCloud Connector to maximize your hybrid cloud footprint.

Please note that the VMware vCloud Air environment is simulated in this lab. Behavior and performance are not indicative of the actual customer experience provided in the live vCloud Air environment.

VMware vCloud Connector

This is the vCloud Connector Interface

View and operate on workloads across internal data centers and vCloud Air

In this lab you'll be simulating the copying of a virtual machine from your private cloud to the VMware vCloud Air environment.

LAUNCH VMWARE VCLOUD CONNECTOR

If the vCenter client is open proceed to step 4 . If the vCenter client is not open click on the desktop icon labeled VMware vSphere Client.

In the IP Address / Name field select vcsa-01a; User name is corp\administrator; Password is VMware1![IMPORTANT: Be sure to select the vcsa-01a vCenter Server from the drop-down list in the vSphere Client login dialog]

Now select Login

At the top left of the screen click the Home button.

On the home page, click the vCloud Connector icon in the Solutions and Applications area.

NOTE: If the vCloud Connector icon is not visible the Plug-in may need to be manually enabled. Go to the menu bar and Select Plug-ins / Manage Plug-ins. Highlight vCloud Connector and then right-click and select Enable then proceed.

If you receive a warning. Ignore it and accept the link.

The vCloud Connector Client will launch.

Get Information about a Template, Virtual Machine, or vApp

In the Browser panel, expand the Clouds tree and select the cloud that contains the virtual machine that you want to view.You can expand the hierarchy further and select a virtual data center, organization, folder, or catalog to view only its contents. For clarity we do not have any Templates or vApps in this lab environment.

In the Inventory panel, click Virtual Machines tab to view the virtual machines for that environment.

PREPARE TO MIGRATE A VIRTUAL MACHINE FROM LOCAL vSPHERE TO THE vCLOUD AIR

Click on the Rainpole Local Datacenter Cloud in the left panel.

In the inventory panel click the Virtual Machines tab.

Select by clicking once on the My Local VM. This is a powered down virtual machine in the local vSphere environment.

PREPARE TO MIGRATE A VIRTUAL MACHINE FROM LOCAL vSPHERE TO THE vCLOUD AIR

Ensure My Local VM is selected. You will know this when My Local VM is highlighted in blue. NOTE: The VM must be powered off to transfer. If it is powered on select it, select Actions, and power it off.

Hover the mouse over the Actions menu (the one with the gear icon). This will cause a drop down list to appear with appropriate Virtual Machine actions. Click on the Copy action.

CONFIGURE THE VIRTUAL MACHINE PROPERTIES

From the Cloud drop down ensure the Rainpole vCHS Datacenter Cloud is selected.

In the Name field, enter MySecondVM for the virtual machine name.

In the "Select a folder" area, expand Datacenter Site B and select the Discovered virtual machine folder.

Click the Next button.

SELECT THE VIRTUAL DATA CENTER WHERE THE VIRTUAL MACHINE WILL BE DEPLOYED

Next select the cluster named Cluster Site B.

Click the Next button.

SELECT STORAGE

Select the virtual disk format drop down and choose Thin Provisioned.

Select the last storage option named ds-site-b-nfs03 as your target.

Click Next button to continue.

DEPLOYMENT OPTIONS

Leave the power on option unselected as this VM is simply a shell system used for demonstration purposes.

Click Next to continue.

REVIEW SELECTIONS AND VALIDATE

Review your selections.

When finished reviewing select the Validate button.

PREPARE TO COPY YOUR VM TO VMware vCloud Air

You should receive a successful validation indication. NOTE: In this simulated VMware vCloud Air instance you may receive the following warning: Detected high latency between the nodes. If the connection has high bandwidth, UDT is recommended as the transfer protocol. Otherwise, use HTTPS. Warnings have been raised while validating the copy. We recommend you to fix them before proceeding or copy might fail. You can disregard this message for the lab environment.

Click Finish

SCREENSHOT: MONITOR TASK COMPLETION

You can monitor the task completion status in the Task Window. When the copy completes you should see a "green" check left of the task entry indicating that the copy was successful.

VERIFY THE PRESENCE OF THE VM COPY IN THE vCLOUD AIR DATACENTER

In the Browser pane of the vCloud Connector interface expand the Rainpole vCHS Datacenter hierarchy as well as the Datacenter Site B tree. Select the Discovered virtual machine folder.

Review the information displayed in the Inventory Pane under the Virtual Machines tab. You should see the copied VM entry name listed.

Review the Location of this new VM copy. The location should display Datacenter Site B.

Congratulations! You've completed the copying of a VM from your private cloud to the VMware vCloud Air public cloud. If this lab were connected to the live vCloud Air environment you could now proceed to accessing your vCloud Air Virtual Data Center and managing your newly copied virtual machine. Since vCloud Air is running vSphere like your private cloud environment there is often absolutey no reconfiguration required to power on the virtual machine and beginning utilizing it from your public cloud.

Module Conclusion

Thank you for participating in the VMware 2014 Hands-on Labs. Be sure to visit http://labs.hol.vmware.com/ to continue your lab experience online.

Module Introduction

Most sysadmins are familiar with using PowerShell (and PowerCLI in VMware virtualised environments) to manage the lifecycle of servers and to automate day to day administration. This module will walk through how the new PowerCLI cmdlets for vCloud Air can be used to deploy and delete VMs, manage catalog items and report virtual datacenter statistics.

The first lesson will show you how to connect a PowerCLI session to your vCloud Air Virtual Data Center. Next, you will use PowerCLI to list available vApp Templates and then deploy, start, stop and delete a vApp. The following lesson will walk you through querying basic statistics from your Virtual Data Center, and reporting vApp resource allocations. Finally, you will use a PowerCLI script to rapidly deploy multiple instances of a vApp.

Note: Open the file README.txt file on the Windows desktop and copy and paste the commands into the PowerCLI window to save you from typing them all in.

PowerCLI cmdlets available in vCloud Air

The subset of the VMware vCloud Director cmdlets that are supported by vCloud Air are shown above.

Connecting to vCloud Air using PowerCLI

In this lesson, you will access your vCloud Air Virtual Data Center via PowerCLI.

In the first step you will log in to the vCloud Air portal to find out the vCloud Director API URL. This contains the the vCloud Director server name and organization that you need for the second step, which is to start a PowerCLI session and connect it to your Virtual Data Center.

Log in to the vCloud Air Portal

Use the Mozilla Firefox shortcut on the desktop to launch the browser

Click the vCHS Portal bookmark on the bookmark bar or type in the following URL: https://portal.vchs-int.vmware.com

Enter the following credentials and click the 'Sign in' button

User name: hol@vmware.com

Password: VMware1#

Note: The password is different from the standard password used in other Hands-on Labs. It ends with a hash symbol instead of an exclamation point.

Access the vCloud Director API URL

In the vCloud Air portal, you will navigate to the Virtual Data Center that you will be managing, and then you will access the vCloud Director API URL.

Navigate to the Virtual Data Center that you will be managing

In the vCloud Air dashboard, click on the name of the Virtual Data Center that you will be managing.

The Virtual Data Center Details will be shown in the dashboard.

Access the vCloud Director API URL

Once the Virtual Data Center Details are shown, click on the link for vCloud Director API URL. A popup window displaying the vCloud Director API URL is shown.

Make a note of the URL as we will be using the server name - vcd-01b.vchs-int.vmware.com - and organization name - hol-dc1-vpc1-3 - components of it to connect PowerCLI to the vCloud Air Virtual Data Center.

If you have multiple Virtual Data Centers in your vCloud Air instance, then each of them will have a unique vCloud Director API URL.

Start a VMware vSphere PowerCLI session and connect to the Virtual Data Center

The second task is to start a PowerCLI session and connect it to your Virtual Data Center.

Start VMware vSphere PowerCLI

Click on the VMware vSphere PowerCLI icon on the Windows Task Bar.

A PowerCLI window is shown.

Connect to the Virtual Data Center

To successfully use PowerCLI to talk to the vCloud Air API, we need to instruct PowerCLI to use version 5.1 of the vCloud Director API.

Use the Connect-CIServer cmdlet to specify the server name and vCloud Director organization that you discovered from the vCloud Director API URL (https://vcd-01b.vchs-int.vmware.com:443/cloud/org/hol-dc1-vpc1-3/).

Note: Versions of VMware vSphere PowerCLI prior to version 5.8 aren't compatible with vCloud Air, and require the workaround listed in step 2. If you are using version 5.8 or later, then step 2 should no longer be necessary.

Note: Open the file README.txt file on the Windows desktop and copy and paste the commands into the PowerCLI window to save you from typing them all in.

Notice that the version deployed in this Hands-on Lab is VMware vSphere PowerCLI 5.5 Release 2

In the PowerCLI window, enter the following command to force compatibility with version 5.1 of the API:

Note: The password is different from the standard password used in other Hands-on Labs. It ends with a hash symbol instead of an exclamation point.

Verify that you are connected to the Virtual Data Center

Verify that you have successfully connected to the Virtual Data Center by comparing what you see in your PowerCLI session with the screenshot above.

If you see any red text, review the error message and double check that you have specified the correct server and organization details. Then retry your connection and use the user name and password specified above.

Congratulations! You have connected PowerCLI to your vCloud Air Virtual Data Center. Continue to the next lesson to use PowerCLI to list available vApp Templates and then deploy and power on a vApp.

Lesson Conclusion

In this lesson, you logged in to the vCloud Air portal to find out the vCloud Director API URL for your Virtual Data Center. You then used this information to connect to your Virtual Data Center in a PowerCLI session.

In the following lesson, you will list available vApp Templates in your Virtual Data Center, and then deploy and power on a vApp.

Viewing vApp Templates and deploying VMs in vCloud Air

In this lesson, you will use PowerCLI to list available vApp Templates in your Virtual Data Center, and then you will deploy and start a vApp. You will then switch back to the vCloud Air web UI to verify that the VM has been created successfully. Finally, you will clean your lab up by stopping and deleting the vApp.

List available vApp Templates

Once you have connected your PowerCLI session to your vCloud Air Virtual Data Center, you will use it to query the available vApp Templates.

Note: Open the file README.txt file on the Windows desktop and copy and paste the commands into the PowerCLI window to save you from typing them all in.

Enter the following PowerCLI command:

Get-CIVAppTemplate

You will get a PowerCLI table view of the vApp Templates that are available in your Virtual Data Center. As you can see in the screenshot, the information you get back might not be enough for you to choose which of the available vApp Templates is the correct one that you want to deploy. We will rerun the command, and this time pipe the output to a PowerCLI Select-Object cmdlet (abbreviated as just Select) which will be used to specify a more useful set of columns.

List available vApp Templates (take 2)

Enter the following PowerCLI command:

Get-CIVAppTemplate | select Name, Catalog, Owner

In the response, you can see more relevant information about each available vApp Template: the Catalog in which it is contained, and the Owner.

To view a full list of available properties, you can pipe the output of a command into the PowerCLI Format-List cmdlet (abbreviated here as FL):

Get-CIVAppTemplate | FL

Deploy a vApp

Now that you know which vApp Templates are available in your Virtual Data Center, you can choose one to deploy. As this is a lab environment, most of the vApp Templates are empty shells. While they can be deployed and powered on, they don't contain any operating system. If you want to successfully power on a vApp in this lab, please use the base-sles-01b vApp Template.

Enter the following PowerCLI command to deploy a vApp into your Virtual Data Center. it will be named rainpole-svr-01 and will be based on the base-sles-01b vApp Template.

New-CIVApp -Name rainpole-svr-01 -VAppTemplate base-sles-01b

While the vApp is being deployed, this status banner is overlaid on your PowerCLI session. Wait for the deploy to complete before continuing this lab.

Verify vApp creation

Once the vApp has been successfully deployed, you will see output similar in your PowerCLI window that is similar to the screenshot.

Start a vApp

Once your vApp has been deployed, you can instruct vCloud Air to start it.

Enter the following PowerCLI command to start your vApp

Start-CIVApp rainpole-svr-01

Verify vApp deploy and startup in the vCloud Air Dashboard

Return to your Firefox browser session that you used to discover the vCloud Director API URL.

Click on the Virtual Machines tab in the vCloud Air Dashboard.

Observe that a new VM called base-sles-01b has been created in a vApp named rainpole-svr-01

Stop a vApp

Return to your PowerCLI session, and then stop the vApp that you just started.

Enter the following PowerCLI command to stop the vApp.

Stop-CIVApp rainpole-svr-01

You will be prompted to confirm that you want to perform this action. Check you have specified the correct server on the command line, then hit Enter to accept the default response (Yes).

Delete a vApp

Now we will finish cleaning things up by deleting the vApp.

Enter the following PowerCLI command:

Remove-CIVApp rainpole-svr-01

Again, you will be prompted to confirm that you want to perform this action. Hit Enter to complete the command.

The vApp will now be deleted.

Lesson conclusion

In this lesson, you have used PowerCLI to list available vApp Templates in your Virtual Data Center. You have then chosen a vApp Template, deployed it into your Virtual Data Center and powered it on. You then switched back to the browser to confirm via the vCloud Air portal that the VM had indeed been deployed and powered on. You then used PowerCLI again to power off the vApp, and then delete it.

In the next lesson, you will use PowerCLI to query and report information about your Virtual Data Center.

Viewing vCloud Air Virtual Data Center Statistics

In this lesson you will use PowerCLI to query some basic Virtual Data Center utilization statistics. You will then use PowerCLI to query information about vApps and VMs in your environment.

Query Virtual Data Center statistics using PowerCLI

In vCloud Air, you are allocated a pool of memory, cpu and storage capacity. When you deploy and power on a vApp, you consume resources from this pool. vCloud Air displays this information graphically in the web UI portal. It can also be useful to query this information using a script, for example if you wanted to track available and used capacity over time and write it into a CSV file for later analysis in a spreadsheet.

Note: Open the file README.txt file on the Windows desktop and copy and paste the commands into the PowerCLI window to save you from typing them all in.

To query Virtual Data Center resources, use the Get-OrgVdc cmdlet.

Enter the following PowerCLI command:

Get-OrgVdc

A list of attributes will be displayed that relate to the Virtual Data Center, including the capacity and utilization information that we want to track as part of this example. Use the PowerShell Select and FT cmdlets that we introduced in the previous lesson to generate a summary table that will be displayed on the screen.

Query vApps using PowerCLI

Knowing how much capacity is available, and the total of how much is currently being used is a good start, however it doesn't really help you to understand what is in your cloud and how many resources they are consuming.

For this you can use the Get-CIVApp cmdlet.

Enter the following PowerCLI command:

Get-CIVApp

A list of attributes will be displayed for each deployed vApp in your Virtual Data Center, including capacity information. Use the PowerShell Select cmdlet again so that only the most relevant properties are included.

In this example, you will also use the Export-Csv cmdlet which will export the data into a specified CSV file which can then be opened in a spreadsheet program for analysis. Note that the script in this lab uses the -NoTypeInformation option to the cmdlet (abbreviated here as -NTI) which will instruct PowerShell not to print a redundant line describing the PowerCLI object type at the beginning of the CSV file.

You will also notice a new expression included as part of the Select cmdlet. This adds a new column called "Cloud" to the output of the pipeline, and sets the value to the cloud instance that you are querying. This can be particularly useful if you have multiple Virtual Data Centers across different cloud instances.

UCopy and paste the following commands from the README.txt on the Windows Desktop into your PowerCLI window:

View query results in notepad

Use the following command to review the contents of the CSV file:

notepad $vAppsCSV

Limit the scope of the search by using where-object

Use the PowerShell Where-Object cmdlet (abbreviated here as Where) if you have a large number of vApps in your Virtual Data Center, or even if you just want to get an exact list of vApps that match specific criteria.

In the first example, you will use the -ge operator to only include vApps where the memory allocation is greater than or equal to 256 MB. This should find at least the two sample vApps that should already be present in your Virtual Data Center. Depending upon your progress in previous labs, other vApps may also be displayed.

Enter the following PowerCLI command:

Get-CIVApp -Org $org | Where {$_.MemoryAllocationMB -ge 256}

If you want to see the full details of these vApps (for example, to validate that they do indeed have a MemoryAllocation property that is equal to 256, try appending "| Format-List" (which can be abbreviated as FL) to the end of the command pipeline.

Enter the following PowerCLI command:

Get-CIVApp -Org $org | Where {$_.MemoryAllocationMB -ge 256} | FL

If you want to identify large vApps within your environment, you can of course specify a larger value as part of the Where clause, and use the -gt to only report vApps that are greater than (but not equal to) the value. In the example below, the command will only output VMs with more than 10 GB (or 10240 MB) of memory allocation.

Enter the following PowerCLI command:

Get-CIVApp -Org $org | Where {$_.MemoryAllocationMB -gt 10240}

You may have noticed in the 2nd example in this section that (when you used FL to view all the properties of the vApp), that PowerCLI reports the memory allocation in both MB and GB. This leads to the final example in this step where you specify the MemoryAllocationGB property as part of the Where cmdlet.

Enter the following PowerCLI command:

Get-CIVApp -Org $org | Where {$_.MemoryAllocationGB -gt 10}

Query VMs contained in a vApp

A vApp is a container for VMs. As such you may want to user PowerCLI to query which VMs are contained in a particular vApp. You can do this by piping the output from a Get-CIVApp cmdlet into the Get-CIVM cmdlet.

Enter the following PowerCLI command:

Get-CIVApp -Name cloud-vm-01-VApp | Get-CIVM

Remember that you can use the Select and FL cmdlets that you have used in previous steps to find out more information about the VMs in the vApp. Try that now.

Query Disk Information

In previous steps in this lesson, you have used PowerCLI to find out information about the memory allocation of vApps in your Virtual Data Center. Another attribute about the workloads that are running in your cloud that you may want to query is the allocation of virtual disks to VMs.

By default, this information is not displayed as part of the properties of a VM, although it is included as part of the ExtensionProperties.

Combine the function with the script you used in the previous step to list out the storage allocations for each of the virtual disks in the VM in the cloud-vm-01-VApp vapp.

Get-CIVApp -Name cloud-vm-01-VApp | Get-CIVM | Get-CIVMHardDisk

Using PowerCLI to deploy multiple vApps in vCloud Air

In this lesson you will use PowerCLI to deploy multiple vApps concurrently using the RunAsync cmdlet parameter and Wait-Task cmdlet.

Running tasks asynchronously with RunAsync

In cloud environments you often need to perform operations at scale: for example performing the same repeated operation on tens, hundreds or even thousands of cloud objects. PowerCLI includes features that allow you to execute multiple tasks concurrently to dramatically reduce the elapsed time to implement changes and leverage the scaleability of the management infrastructure.

By default, PowerCLI cmdlets return only after the command has completed. Specifying the RunAsync parameter instructs PowerCLI to invoke the command asynchronously. In this mode, the command returns immediately without waiting for the task to complete. With the RunAsync parameter, the output of the command is a Task object which can be used to track completion of the requested tasks using the Wait-Task cmdlet.

There are limits to the number of concurrent commands that the infrastructure can efficiently process. The approach outlined in this lesson is suitable for simple concurrently at low scale, where the repeated operations need to occur only on 10 or less cloud objects. If you need to scale operations to hundreds or thousands of cloud objects then you will need extend this approach with a queueing mechanism to limit the number of concurrent tasks.

The complete script associated with this lesson is available in the C:\PowerCLI\1483 Mass Deploy.ps1 file in the lab.

Set up the environment and connect to vCloud Air with PowerCLI

As in previous lessons in this module, start up a PowerCLI session, set the API compatibility to 5.1, and then connect to the vCloud Air Virtual Data Center. You can use the following commands as a reference.

Deploy and start multiple vApps concurrently

After setting up the environment and the parameters that will control the execution, the following section of the script uses the RunAsync parameter to the New-CIVApp cmdlet to deploy multiple copies of a vApp Template concurrently.

First, set up an empty array to contain the Task objects that will be the output of the New-CIVApp-RunAsync cmdlet, by entering

$tasks = @()

This is followed by a for loop that will call New-CIVApp repeatedly according to the $totalvApps parameter.

Finally, we append the Task objects returned by the New-CIVApp cmdlet to the $tasks array.

The New-CIVApp cmdlet will return as soon as the task has been initiated by the vCloud Air API and then execution of the script will continue immediately rather than waiting for the deploy task to complete because the RunAsync option has been specified.

Wait for the vApp deploy tasks to complete

In this example, the objective is to deploy multiple vApps concurrently, and once that is complete, then power on the vApps that were deployed.

The Wait-Task cmdlet is used to pause execution of the script until all of the concurrent tasks have completed. In this case, it will return vApp objects which we will collect in the $newvApps variable.

Module Conclusion

In this module you have learned how to connect a PowerCLI session to a vCloud Air Virtual Data Center and then you used PowerCLI to list available vApp Templates and then deploy, start, stop and finally delete a vApp. Next you used PowerCLI to query basic statistics about your Virtual Data Center, and reported vApp resource allocations. Finally, you used a PowerCLI script to rapidly deploy multiple instances of a vApp.

Other PowerCLI related labs

If you are interested in taking additional labs that cover PowerCLI then the following will be of interest to you.

HOL-SDC-1407 is focused on VMware Automation Solutions. Module 1 provides both an introduction to PowerCLI and also new functionality available in the latest releases. Module 2 covers VMware Virtual SAN automation with PowerCLI.

HOL-SDC-1405 covers the IT outcomes of high availability and business continuity. Module 4 covers automating VMware vCenter Site Recovery Manager with PowerCLI.

Accessing the entire vCloud API

Although PowerCLI offers many cmdlets for managing vCloud Air they don't cover the entire functionality of the platform. You can access the complete functionality of the API using the Get-View cmdlet. The objects returned by the cmdlet are known as "Views" and represent an exact copy of the Cloud Air API objects. You can find more information about these objects in the vCloud Air API Reference.

Final words

Thank you for taking this lesson. We hope that you found the presented information helpful and will use PowerCLI in your day-to-day work with vCloud Air. Your opinion is important to us, so please spend a minute to fill out the survey at the end of the lab.

Lab Conclusion

HOL-HBD-1483 - Managing Your Hybrid Cloud - Lab Conclusion

This concludes the "Managing Your Hybrid Cloud" VMware Hands On Lab.

You can find additional labs relating to the vCloud Air service in the "Hybrid Cloud" section of the Hands On Lab Catalog. In addition there are other labs relating to vRealize Automation, vRealize Operations, and dozens of other labs across a broad spectrum of topics.

Conclusion

Thank you for participating in the VMware Hands-on Labs. Be sure to visit http://hol.vmware.com/ to continue your lab experience online.