VMware Hands-on Labs - HOL-1906-04-CHG


Lab Overview - HOL-1906-04-CHG - vRealize Automation Challenge Lab

Lab Guidance


Note: It may take more than 90 minutes to complete this lab. You should expect to only finish 2-3 of the modules during your time.  The modules are independent of each other so you can start at the beginning of any module and proceed from there. You can use the Table of Contents to access any module of your choosing.

The Table of Contents can be accessed in the upper right-hand corner of the Lab Manual.

After spending significant time implementing vRealize Automation, you're now the guru and expected to know everything about the application. However, troubleshooting vRealize Automation can be a little overwhelming - especially if this wasn't covered in the initial documentation or training you followed. Let this lab be your guide into learning how to troubleshoot common issues within the vRealize Automation portal. 

Lab Module List:

Lab Captains:

This lab manual can be downloaded from the Hands-on Labs Document site found here:

http://docs.hol.vmware.com

This lab may be available in other languages.  To set your language preference and have a localized manual deployed with your lab, you may utilize this document to help guide you through the process:

http://docs.hol.vmware.com/announcements/nee-default-language.pdf


 

Location of the Main Console

 

  1. The area in the RED box contains the Main Console.  The Lab Manual is on the tab to the Right of the Main Console.
  2. A particular lab may have additional consoles found on separate tabs in the upper left. You will be directed to open another specific console if needed.
  3. Your lab starts with 90 minutes on the timer.  The lab can not be saved.  All your work must be done during the lab session.  But you can click the EXTEND to increase your time.  If you are at a VMware event, you can extend your lab time twice, for up to 30 minutes.  Each click gives you an additional 15 minutes.  Outside of VMware events, you can extend your lab time up to 9 hours and 30 minutes. Each click gives you an additional hour.

 

 

Alternate Methods of Keyboard Data Entry

During this module, you will input text into the Main Console. Besides directly typing it in, there are two very helpful methods of entering data which make it easier to enter complex data.

 

 

Click and Drag Lab Manual Content Into Console Active Window

You can also click and drag text and Command Line Interface (CLI) commands directly from the Lab Manual into the active window in the Main Console.  

 

 

Accessing the Online International Keyboard

 

You can also use the Online International Keyboard found in the Main Console.

  1. Click on the Keyboard Icon found on the Windows Quick Launch Task Bar.

 

 

Click once in active console window

 

In this example, you will use the Online Keyboard to enter the "@" sign used in email addresses. The "@" sign is Shift-2 on US keyboard layouts.

  1. Click once in the active console window.
  2. Click on the Shift key.

 

 

Click on the @ key

 

  1. Click on the "@ key".

Notice the @ sign entered in the active console window.

 

 

Activation Prompt or Watermark

 

When you first start your lab, you may notice a watermark on the desktop indicating that Windows is not activated.  

One of the major benefits of virtualization is that virtual machines can be moved and run on any platform.  The Hands-on Labs utilizes this benefit and we are able to run the labs out of multiple datacenters.  However, these datacenters may not have identical processors, which triggers a Microsoft activation check through the Internet.

Rest assured, VMware and the Hands-on Labs are in full compliance with Microsoft licensing requirements.  The lab that you are using is a self-contained pod and does not have full access to the Internet, which is required for Windows to verify the activation.  Without full access to the Internet, this automated process fails and you see this watermark.

This cosmetic issue has no effect on your lab.  

 

 

Look at the lower right portion of the screen

 

Please check to see that your lab has finished all the startup routines, and is ready for you to start. If you see anything other than "Ready", please wait a few minutes.  If after 5 minutes you lab has not changed to "Ready", please ask for assistance.

 

Module 1 - Introduction to Troubleshooting vRealize Automation (15 min)

Overview of vRealize Automation Challenge Lab


First day on the job as a cloud administrator? No problem. Start here.

This vRealize Automation Challenge asks you to put on your thinking cap to save the day! Each module places you in a different fictional scenario to fix common vRealize Automation administrative and integration problems. Have you ever had an entitlement issue with users? How about a mysterious request that is not functioning properly? In this lab, you will learn to solve these and more.

As you walk into a tall glass building, you glance at your watch: 9:00 a.m. It's the beginning of another workday at one of the most desirable businesses in the year 2096: Rainpole Enterprise Inc.

Rainpole Enterprise Inc. is a global IT services company that offers various IT services to organizations across the globe. They've recently adopted VMware's Software Defined Datacenter approach to modernizing their datacenter. This is inline with their vision of transforming the way they run their businesses. Any of their customers can now request any service that is provided by Rainpole Enterprise Inc. through their self-service portal like an App Store. But Rainpole Enterprise Inc. technology isn't magic. No, its datacenter, in the gleaming building you just entered, is powered by vRealize Automation.

As the largest and most trusted global IT services company, Rainpole Enterprise Inc.'s highest priorities are the reliability and stability of its operations. That responsibility rests on the shoulders of both you and your colleagues.

The following modules will test your mettle in order to keep the services operations running smoothly. This lab is best suited for those with some vRealize Automation experience, or who have already taken labs such as HOL-1921-01: vRealize Automation 7 Getting Started or HOL-1921-02: vRealize Automation 7 Advanced Topics. This lab includes over two hours of content, so you might not be able to complete it all in one sitting. Because the vRealize Automation Challenge lab requires troubleshooting, your completion time could vary. 

We recommend that you start with Module 1 and then proceed to the rest of the modules. But if you are feeling rather confident today, you can skip right ahead to modules that interest you more.


Troubleshooting tools available


 

On the desktop, click on the Chrome browser desktop shortcut. The browser should open to the vRealize Automation portal. If not, locate the bookmark vRealize Automation. Click on it.


 

Login to vRealize Automation

 

Fill in the login form with the following details:

  1. Username: cloudadmin
  2. Password: VMware1!
  3. Click Sign in button

Note: The user cloudadmin has been assigned with vRealize Automation roles of Infrastructure and Tenant administrator. This grants them access to the Infrastructure tab, which allows the user to look at troubleshooting information like logs and events details. For more information on vRealize Automation roles, feel free to read up more here. (Opens in a new window)

Note: Also, the domain that will be used for this lab is corp.local. You should not need to change the domain selection unless prompted to do so.

 

 

Viewing Recent Events

 

To be able to view a list of recent activities on vRealize Automation:

  1. Click the Infrastructure tab
  2. Click Recent Events
  3. You will be presented with a list of recent events that have occurred

NOTE: This view will provide information to aid in investigating the root cause of an issue. The logs displayed here are limited to IaaS-related activities. In some cases, no data will be available as you start this lab.

 

 

Locating Logs View

 

Sometimes, you might need to view detailed information from the logs. You can do so by navigating to the log details:

  1. Click on Monitoring

NOTE: You will access this menu by clicking on Infrastructure > Monitoring (as shown from the previous step). Similar to the Recent Events view, and the logs displayed here are limited to normal logs and audit logs from IaaS (.NET) components only. 

 

 

Access the Logs View

 

To access the logs view:

  1. Click on Log
  2. You will be presented with detailed log information (What you see from your lab might differ from the screen capture shown)

NOTE: You can use this view to retrieve more detailed information which can help you troubleshoot IaaS provisioning issues.

 

 

Open the Log Insight Web Page

 

Another great tool that you can use is vRealize Log Insight with vRealize Automation Content Pack. This lab has already been configured to send all vRealize Automation and vRealize Orchestrator logs to vRealize Log Insight.

If you already have Chrome open, you can launch into vRealize Log Insight by opening another browser tab, or open a new browser window, then locate the bookmark vRealize Log Insight, and click to open it.

Additional Info: The vRealize Automation 7.3 content pack for Log Insight provides you with important information across all components of your vRealize Automation 7.4 environment. This includes a consolidated summary of log events across all vRealize Automation components of the environment such as vRealize Automation VA, vRealize Automation IaaS components, and VMware Identity Manager (vIDM).

 

 

Login to vRealize Log Insight

 

Fill in the login form with the following details:

  1. Username: admin
  2. Password: VMware1!
  3. Click Login button

 

 

Locating vRealize Automation Content Dashboards

 

In order to look at the vRealize Automation Content Dashboard:

  1. Click on VMware - vRA 7.3 on the left-hand menu

Additional Info: You can see both VMware - Orchestrator - 7.0.1+ and VMware - vRA 7.3 content packs which are available to use for troubleshooting.

 

 

Accessing vRealize Automation Content Dashboards

 

You can use the tabs along the left side to deep dive into dashboards that can help you identify and troubleshoot problems.

  1. Click on the General - Overview dashboard
  2. The dashboard will be populated automatically for the time range selected at the top of the Dashboards page
  3. Select the down arrow next to the default time range of Latest 5 minutes of data and select Latest hour of data

 

 

Querying Log Insight for specific vRealize Automation log entries

 

You can also leverage the Interactive Analytics feature to search for specific log entries that you want to discover for more information.

  1. Click on Interactive Analytics on the top of the right page
  2. Click + ADD FILTER to create your own search queries or filters
  3. Log Insight will present the log details based on your queries or filters
  4. In the left-hand text field, you can search for a specific string value, not just fields. (i.e., you can use open text search to search for "error" or "404")

 

 

vRealize Content Dashboards Explained

 

Click on Dashboards to return to the Dashboards tab.

On the left-hand menu, each content dashboard will provide more detailed information on a specific vRealize Automation component.

 

 

vRA Content Dashboard: General Problems

 

The General - Problems Content Pack will present dashboards detailing the most common problems within a vRealize Automation environment.

  1. Click General - Problems on the left-hand menu of the Dashboards tab.
  2. Scroll to the bottom.
  3. Predefined Alert Queries have been created that will allow you to click and run against the environment to look for potential issues. Depending on how your environment is configured, some of these alerts may not be valuable for you. For those that are, it would be recommended for you to create Log Insight alerts so that you could be notified when there are issues within the environment. More information on how to create custom alerts in Log Insight can be found here.
  4. Provisioning Failure Queries are additional predefined dashboard filters based on common known issues collected by VMware.
  5. Mousing over each filter under both Alert Queries and Provisioning Failure Queries will reveal an informational dialog window indicated by the "i" icon. (Not visible in graphic)
  6. Selecting the information dialog will show you tasks or knowledge base articles for these common problems. These steps can be followed to resolve issues that may be identified within your environment. (Not visible in graphic)

 

Module 2 - Administration Troubleshooting (30 min)

Introduction


Let's get your feet wet.

The lessons contained within this module cover basic administration of the vRealize Automation Portal. These are common tasks that you may encounter as you continue your journey with vRealize Automation.


Resolving Missing vCenter Templates When Designing Blueprints


The server team has created a new linux virtual machine (temp-base-linux-cli). It has been uploaded, and converted into a virtual machine template in the vSphere environment. Unfortunately, the Infrastructure Architect cannot seem to locate the template to add it to the CentOS-base blueprint.


 

Login to the vRealize Automation Portal

 

If you don't already have a browser window open, open a Google Chrome browser and click on the vRealize Automation bookmark.  Log into the vRealize Automation Portal as the Infrastructure Architect with the following credentials:

  1. User ID: cloudadmin
  2. Password: VMware1!
  3. Click Sign In

 

 

Create a template - Pt 1

 

Within vRealize Automation, navigate to Blueprints.

  1. Click Design
  2. Click Blueprints
  3. Click + New to create a New Template

 

 

Blueprint Details

 

Enter the following details:

  1. Name: CentOS-Template
  2. Description: Create a Blueprint Using a vCenter Template
  3. Click OK

 

 

Create a template - Pt 2 - The blueprint canvas

 

  1. Drag a vSphere (vCenter) Machine object onto the Design Canvas

 

 

vSphere vCenter Machine Object Details

 

  1. Click on the vSphere__vCenter__Machine_1 virtual machine object that you added to the blueprint canvas.
  2. Click Build Information on the detail for the virtual machine
  3. Change the Action to Clone from the dropdown list
  4. Next to Clone from: click the ... Button

 

 

Select Template

 

You will notice there are no templates

  1. Click Cancel, then select Save and Finish to close the blueprint (These two final steps are not shown)

 

 

Validation Error

 

  1. You will get an error. Familiarize yourself with the dialog and select Continue.

 

 

Create a template - Pt 3 - Save as draft

 

  1. Note the blueprint CentOS-Template rests in a Draft status

 

 

Log into vCenter

 

  1. Open another browser tab, and select RegionA > RegionA vCenter from the favorites bar. This will open a link to the vcsa-01a.corp.local web client.
  2. Enter User name: corp\administrator
  3. Enter Password: VMware1!
  4. Click Login

 

 

Validate the Template

 

Validate that the virtual machine template (temp-base-linux-cli) is on the ESX host (esx-03a.corp.local).

  1. Select the VMs and Templates view
  2. Locate the temp-base-linux-cli template in the RegionA01 cluster and select it
  3. Click the Summary tab
  4. Note the Host information which displays which host the template resides on

 

 

Corrective Action

 

For this challenge:

Unbeknown to the server team, they placed the template on a host that is not part of the resource cluster being consumed by vRealize Automation. This is why the vRealize Automation portal did not see the template in the blueprints view. The template must be placed or belong to a host in a compute resource that is a part of a vRealize Automation reservation. We need to move the template to the location where vRealize Automation can observe it.

This issue can occur when templates are placed in resource locations not managed by vRealize Automation. It can also occur if a data collection has not yet been performed.

 

 

Solution

 

  1. Select the Hosts and Clusters view

The new template (temp-base-linux-cli) was added to ESX host (esx-03a.corp.local). However, notice how this host is not a member of the resource cluster (RegionA01-COMP01). This resource cluster is currently being consumed by existing vRealize Automation reservations.

You will need to:

To resolve, you must first start within vCenter:

  1. Move (drag and drop) the ESX host (esx-03a.corp.local) into the resource cluster (RegionA01-COMP01).
  2. When prompted, accept the defaults and click OK.

Host esx-03a.corp.local is currently in maintenance mode. It will need to be taken out of maintenance mode for this task.

NOTE: For other modules within the HOL-1906 Lab, a couple of configurations were preset. Changes to these configurations will need to be made. These changes will not damage or alter those labs or this one.

1) Host esx-03a.corp.local is currently in maintenance mode for a vROPs demonstration.

2) RegionA01-COMP01 has been configured for vSAN for another module within this lab. The addition of host esx-03a.corp.local to this resource cluster will generate vSAN errors for the cluster and for host esx-01a.corp.local. This is to be expected and will not cause problems with either lab. Do not be alarmed.

 

 

Perform Data Collection

 

Once the host has been migrated to the cluster, as the Fabric Administrator (cloudadmin) perform the following steps within the vRealize Automation Portal:

  1. Return to the browser tab where vRA was running.
  2. If it is necessary to log into vRealize Automation again, log in with User name: cloudadmin and Password: VMware1!
  3. Click on Infrastructure -> Compute Resources -> Compute Resources
  4. Mouse over the RegionA01-COMP01 Compute Resources arrow (not observed in the screen capture), and perform a Data Collection.

 

 

Data Collection Details

 

  1. Select Request Now under the Inventory Section.
  2. Select Refresh to check the status of the Inventory collection, until it shows Succeed. (This may take approximately 5 minutes)
  3. Click OK.

 

 

Edit Blueprint

 

The following steps to navigate back to selecting the blueprint is not shown in the screenshot

When the Data Collection has been completed (this may take approx. 5 minutes), navigate to Blueprints

  1. Navigate to the Design tab, then click Blueprints
  2. Edit the CentOS-Template blueprint
  3. Click on the vSphere__vCenter__Machine_1 virtual machine object within the blueprint canvas
  4. Select Build Information
  5. Near the Clone from:, select the ... button to browse for the template
  6. Select the new template temp-base-linux-cli
  7. Click OK

The following steps are not shown in the screenshot

 

 

Add the new Blueprint to the Catalog

 

  1. Navigate to the Administration tab. Then select the Catalog Management menu, then Catalog Items.
  2. Locate the CentOS-Template blueprint and click Configure.

 

 

Catalog Item Details

 

Scroll to the bottom of the catalog item.

  1. In the Service dropdown menu, select Infrastructure
  2. Click OK

 

 

 

Service Catalog

 

The new catalog item can be validated by logging out and logging back in as the Development Manager (devmgr) and requesting a new virtual machine from the catalog item CentOS-Template.

 

 

Conclusion

Any vRealize Automation user that is entitled to the CentOS-Template catalog item should now be allowed to request a newly provisioned virtual machine using the new virtual machine template.

This lesson was designed to test your ability to consume, update, and manage blueprint resources within vRealize Automation.

Please log out of the vRealize Automation Portal for the next lesson.

 

What To Do When a User Cannot Create Blueprints


A new project has been announced, and the Development Manager is going to need the ability to create XaaS and Software blueprints. The Development Manager needs to create blueprints for the Development Business Group. However, the Development Manager cannot access the Blueprint canvas.


 

Login to the vRealize Automation Portal

 

Log into the vRealize Automation Portal as the Development Manager with the credentials:

 

For this challenge:

Notice that the Design tab is missing. This can occur because the Development Manager has not been given the appropriate Roles.  

 

 

Solution

 

Log out of the vRealize Automation Portal and log back in as the Cloud Administrator with the credentials:

  1. Click Administration -> Users & Groups -> Directory Users and Groups
  2. Search for the devmgr (not shown)
  3. Select the Development Manager user to edit the profile (not shown)
  4. Under Add Roles To This User, locate Infrastructure Architect and XaaS Architect and select them.

The following steps are not shown:

  1. Click Finish to save these role privileges to the Development Manager.
  2. Log out and log back in as the Development Manager.
    • Development Manager User Name: devmgr
    • Password: VMware1!
    • Domain: corp.local
  3. The Development Manager now has the ability to create blueprints and service blueprints.

 

 

Conclusion

By default, the Business Group roles - Business Group Manager, Support User, and User Roles - do not have the privileges needed to build or create Blueprints. This lesson demonstrates how to provide the privilege of creating Blueprints for the Development Manager.

 

What To Do When New Users Cannot Be Added or Synced


New team members have been hired and brought in to work with the Development Business Group. Unfortunately, the Development Manager cannot find them to add them to the Business Group as Support Users. This means the new team and its' members can not access the vRA environment.


 

Active Directory Users were pre-created

 

The Active Directory administrator has notified you that he has created three new users and placed them in an AD Security Group called Rebels.

For this challenge, the users and their respective accounts have already been created.

Users were created in OU=RainPole, DC=Corp, DC=Local

The AD Security Group ("Rebels") was pre-created in OU=Users,DC=Corp,DC=Local.

 

 

Login to the vRealize Automation Portal

 

Open a new tab and launch the vRealize Automation Portal link from the favorite bookmarks bar.

NOTE: If you are already logged into the vRealize Automation portal as a different user, ensure to log out, and re-log in as the Development Manager.

  1. Username: devmgr
  2. Password: VMware1!
  3. Click Sign In

 

 

Attempt to add new users to Business Group

 

Browse to the Business Group

  1. Select the Administration tab.
  2. Choose the Users & Groups menu.

 

 

Explore a Business Group

 

  1. Choose the Business Groups menu.
  2. Select the Development Business Group.

 

 

Business Group Details

 

  1. Click the Members tab.
  2. In the Support User role field, enter one of the new user accounts (e.g., hsolo).
  3. Click on the magnifying glass to search for the user.

 

 

Search for a user or group

 

 

You will notice that the users and AD Security Group cannot be found by the dialog box No data to display.

If the user accounts cannot be found, then the Development Manager will not be able to assign the new users to a business group or role within vRealize Automation.

Click Cancel and log out (not shown)

 

 

Corrective Action

 

The Identity Manager was configured to search for users within a specific OU. In this challenge scenario, that is the Users OU within Active Directory (OU=Users,DC=Corp,DC=Local). Unfortunately, our users were created within the RainPole OU. Because of this, the Identity source in vRA cannot locate the new users. To fix this, we need to add the users OU to the Identity Source Configuration.

Add the Users OU to the Identity Source:

  1. Log out and log back in as the Tenant Administrator (cloudadmin).
    • Tenant Administrator: cloudadmin
    • Password: VMware1!
    • Domain: corp.local
  2. Navigate to the Administration tab.
  3. Select Directories Management from the menu on the left.
  4. Click Directories on that same menu.
  5. Choose the corp.local directory.

 

 

Check the Base DN

 

Once the Active Directory settings are shown, scroll down. Take note that the Base DN field is the starting point for where vRealize Automation will search for users. However, instead of changing the Base DN, we will add the OU Location in the Active Directory settings.

 

 

Edit the Directory Settings

 

Scroll back up to the top of the Active Directory settings. Click on Sync Settings.

 

 

Edit the Groups Configuration

 

  1. Click on Groups.
  2. Ensure that Sync nested group members is checked.
  3. Select the + on the right.
  4. In the Specify the groups DNs field, enter the OU for the location of the AD Security Group Rebels (CN=users,DC=corp,DC=local).
  5. Click Find Groups.

 

 

Enter the Group DN

 

  1. Do not check Select All. Choosing this option will select all groups within the Users OU. This may not be necessary in your environment as it may sync groups that may not be needed.
  2. Instead click the button to Select specific groups within the OU.

 

 

List of AD Groups

 

Scroll down and select the Rebels security group in the list.

Click Save (not shown)

 

 

Group Configuration

 

You can now see that the Rebels Security Group has been mapped to the Identity Source.

  1. Click Save & Sync. Then choose to Sync Directory (not shown)

NOTE: You may observe a waning about missing groups. It is ok to ignore this warning.

The vRealize Automation Identity Manager will start to sync the users and groups with Active Directory, which will allow vRealize Automation to see the new users that were created.

 

 

Validate Active Directory account

 

As the Tenant Administrator, you can validate that vRealize Automation can now see the new users by performing a search in the Directory Users & Groups.

To perform the search, do the following:

  1. Click back on the Administration menu item on the left hand menu.
  2. Select Users & Groups from the same menu.  Then choose Directory Users and Groups in the same menu once more. (not shown)

 

 

Search for AD User Account

 

  1. In the top right-hand corner, enter the user account of one of the new users, and hit enter to perform a search.
  2. For this scenario, we can search for hsolo, lskywalker, and lorgana and see each account discovered.

At this point, the Development Manager can log back into the vRealize Automation environment and add the new users to the Development Business Group.

 

 

Conclusion

This lesson was designed to demonstrate how the vRealize Identity Manager syncs with the Active Directory Identity Source.

As we have demonstrated, if the Base DN is mapped to a specific OU for users, it will ignore security groups within that OU unless the groups are specified in the groups settings. An alternative solution would have been to add the Rainpole OU to the Users Settings within the Active Directory settings.

Before proceeding to the next lesson, log out of the vRealize Automation Portal.

 

Collecting log bundles for support


Uh-Oh. Unfortunately, you ran into an issue and needed to call Global Support Services (GSS). It happens to us all. GSS has requested a log bundle for further troubleshooting into your issue. However, after uploading the logs to GSS, they informed you that the log bundle was missing logs from the IaaS Server.


 

Launch the Module 4a startup script

 

For this lesson, we have to prepare the lab environment to demonstrate the issue. Minimize the browser to expose the desktop.

  1. Open the Scripts folder located on the Control Center Desktop.
  2. Right click the file labeled "Start Module 4a" and select to Run with Powershell.
  3. When the powershell script displays Module 4a is ready, close the powershell window.

 

 

Login to the vRealize Automation Virtual Appliance Management Interface (VAMI)

 

Open the chrome browser and enter the URL (http://vra-01a.corp.local:5480) for the vRealize Automation VAMI.

The below is a list of credentials that can be used for this lab.

 

 

Validate the Log Bundle

 

Request a log bundle.

  1. Navigate to the Cluster tab.
  2. Click on Create Support Bundle to download a log bundle.
  3. Click OK if prompted.

NOTE: It may take several minutes before the log bundle is available.

 

 

Download Log Bundle

 

Click on the Download log bundle link to download the Collected bundles.

 

 

Expand and view the compressed file contents

 

Using Windows File Explorer, navigate to the Downloads folder and extract the log bundle.

Once extracted, open the Environment.html file.

 

 

Log bundle details

 

The Environment.html file will show you the status of the Log Bundle. The red banner over the IAAS server indicates that the logs were not collected.

 

 

Challenge!

For this challenge:

This scenario is uncommon, but happens. It can occur when new virtual machines are added for IaaS components, such as IaaS Web, Manager, Proxy, or DEM Agents. Many times, the vRealize Management Agent is not installed, gets removed, or curious Administrators stop the service. The vRealize Management agent is what vRealize Automation uses to communicate with all components, to verify health and status, among other tasks.

 

 

Corrective Action

 

In this example, without connectivity, IaaS components will not have their logs collected. The connection that is needed for the logs to be collected is the VMware vCloud Automation Center Management Agent service. The service must be installed and running.

Solution:

  1. Using the Remote Desktop shortcut (iaas-01a.rdp) on the desktop, remote into the IaaS Server.
  2. In the IaaS Server, press Win+R on the keyboard to open the Run window. Type in services.msc and hit Enter to launch the Services Control Panel.
  3. Locate the service: VMware vCloud Automation Center Management Agent.
  4. Select the service and click Start.

 

 

Log bundle details

 

Once the service has started, reattempt to Collect a Log Bundle from the vRealize Automation VAMI. You should be able to retrieve a clean log bundle like the one displayed. This time the log bundle generation will be much quicker.

 

 

Conclusion

The Management agent is used for vRealize Automation to communicate between each of the components within the environment. This is demonstrated primarily during the initial installation of vRealize Automation. By stopping the Management Agent or by uninstalling it, the vRealize Automation VAMI will no longer be able to communicate to each of the other vRealize Automation components to collect logs when they are needed.

 

Module 3 - Troubleshoot Provisioning (45 min)

Introduction


It's inevitable: virtual machine provisioning will fail for various reasons. Many times, we see virtual machine provision failures occur due to developing new blueprints and workflows, incomplete configuration upon growth and scale-out, a simple fat-finger, or miscommunication between the IT Department and coworkers. 

It happens, but it's not the end of the world. 

Use this module to learn how to troubleshoot virtual machine provision failures.


Troubleshooting Failed VM Provisioning Due To Network Misconfiguration


You receive notice from the Development User (devuser) that, after a new network (VM Network) was added, he cannot seem to provision VMs to it. He rants to the Development Manager that "vRA is down!" It is up to you to figure out what has gone wrong.


 

Log in to the vRealize Automation Portal

 

Before we begin to look into this scenario, we need to recreate the Development User's issue.

First, Log into the Portal as the Development User (devuser).

  1. Username: devuser
  2. Password: VMware1!
  3. Click Sign In

 

 

Request a CentOS-II Virtual Machine

 

  1. Navigate to the Catalog tab
  2. Request a virtual machine from the CentOS-II Blueprint.

 

 

Request Details

 

Accept the defaults, click Submit.

 

 

Validate failed provision

 

  1. Navigate to the Requests tab.
  2. Observe that the Request has Failed.

Your troubleshooting investigation begins now.

The below is a list of credentials that can be used for this lab.

 

 

Scenario Description

For this challenge:

This scenario demonstrates a failed virtual machine provisioning due to network misconfiguration within the environment.

While it is possible that some troubleshooting steps may not be required, we would like to demonstrate how you can use the vRealize Suite to assist in discovering root cause.

 

 

Provisioning User View

 

When troubleshooting virtual machine provisioning, you should always start with the request tab. It is quite possible that your error may be displayed and inform you why the action request failed.

  1. Click on the Request number (#2) to open the details of the request. (NOTE: Your request number may be different from the example in this lab.)

 

 

Request Details

 

The details of the provision will be displayed.

  1. On the left, locate the Status of the request. It should display: Failed.
  2. Beneath this status, click on View Details.

 

 

Error Message

 

A new window will display with the error of why the task failed. In the details of this provision task; we see the error that caused the provision to fail: "Error requesting machine. No reservation available that has all specified network profiles: VM Network assigned to any network paths."

Obviously, there is a misconfiguration here. The error indicates a reservation may not have the network assigned to it.

 

 

Tenant Administrator View

The Development User was right to come to you. As the Tenant Administrator who also happens to be the IaaS administrator and Infrastructure Architect roles, you have the ability to look at the Reservation Configuration as well as the Blueprint Configuration.

 

 

Infrastructure Logs

 

Let's see how this would look to the IaaS Administrator.

Log out and log back in as the Tenant Administrator (cloudadmin).

  1. Navigate to Infrastructure > Monitoring > Log
  2. You will see the error message again in the IaaS Logs.

 

 

Investigate with Log Insight

 

Launch a new browser tab, and click vRealize Log Insight on the Favorites bar to open Log Insight.

Log in with credentials:

 

 

Log Insight Catalog Requests

 

Using the vRealize Automation Content Pack for vRealize Log Insight, we can quickly view the status of our virtual machine provisions.

  1. On the menu tree on the left, locate VMware - vRA 7.3 (not visible in the graphic because of the pop-up), click > next to it to expand the menu, and then select General - Problems. As you see in the example, under the widget vRA error events by error message, there is an error. If you mouse over the blue circle, the error message appears.
  2. Let's keep looking. Change the timeframe from Latest 5 minutes of data to Latest hour of data.
  3. Click on vRA - Catalog Requests from the menu tree.

 

 

vRA - Catalog Requests

 

In the graphic above, take note of the following:

  1. Change the time view to be Latest hour of data.
  2. Under the widget Catalog requests with context per user, notice the username of the requestor.
  3. Also notice there is a key listing the Request numbers.

 

 

Catalog Requests With Context Per User

 

  1. Click on the blue bar for the Request ID that failed (Request #2)
  2. Select Interactive Analytics.

 

 

Fetch the Context ID

 

The Interactive Analytics displays. While there is a lot of content on this page, we want to focus on the first event listed.  

 

 

Context ID

 

  1. Locate the context= string within the entry. This field is a unique 8-character string that gets generated at the time of request and is propagated throughout all of vRA/vRO and allows us to show the full request from end to end during provisioning.
  2. Copy the context string (the 8 characters within the quotes).
  3. Return to the Dashboard.

 

 

Filter Catalog Requests by Context ID

 

  1. In the filters located at the top, paste the context string in the Context Filter.
  2. Click Refresh.

 

 

Context ID Filtered Dashboards

 

With the Context Filter in place, the content on the page has now been isolated specifically to this Provision Request.

  1. Scroll down and locate the Components that failed to Provision widget.

 

 

Components that failed to provision details

 

  1. Click the blue bar and select Interactive Analytics.

 

 

Interactive Analytics

 

The entry listed, should reflect in greater detail the same error message that was given from the provisioning Requests detail.

  1. Return to the vRealize Automation portal.

 

 

Corrective Action

 

Our tools and logs point us to the fact that we have an issue with the VM Network network profile configuration within a reservation.

Let's take look at the network profile.

  1. Navigate to Infrastructure > Reservations > Network Profiles.

The network profile for VM Network is configured and was set up as an External Network type.

 

 

Validate the Reservation

 

  1. Select the Reservations menu on the left.
  2. Click on the Development Provisioning to look at its' configuration.

 

 

Reservation Details

 

  1. Select the Network tab.
  2. Under the Network Profile column, the Network Profile for VM Network is not mapped.

This is why the virtual machine provision failed. The VM Network profile is not mapped to a network portgroup within the Reservation.

Cancel out of the Reservation Details to avoid making changes to the Reservation.

 

 

Root Cause

Did you think it was that easy?

The Request detail error message specified the VM Network Network Profile specifically. So what is specifically asking for the VM Network? Since the Network Profile was not mapped within the reservation, the blueprint should have never known about the network.

Let's look at the CentOS-II blueprint.

 

 

Edit the Blueprint

 

  1. Click on Design > Blueprints.
  2. Select the CentOS-II blueprint to edit.

 

 

Blueprint Canvas

 

Since there is no network specifically attached to the blueprint, the blueprint would have defaulted to the Network Profiles attached to the reservation. However, we have already looked and the Reservation did not have the VM Network attached.

Could there be something within the virtual machine object?

  1. Select the CentOS virtual machine object.

 

 

Blueprint Details - Custom Properties

 

If we take a look at the virtual machine Component Properties, we find there is a Property Group attached to the VM.

  1. Click the Properties tab.
  2. Under Property Groups, highlight the Provision-Secnario-1 property group.
  3. Select View Properties to display the custom properties within.

 

 

Custom Property Details

 

The custom properties show that the blueprint specifically overrides the network profile configured by using the custom property: VirtualMachine.Network0.NetworkProfileName.

This is the root cause of why the virtual machine provision failed.

  1. Click Close to return to the Property Groups tab.
  2. In the Property Groups tab, highlight the Provision-Scenario-1 property group.
  3. Select Remove to remove the property group from the blueprint.
  4. Click Save and Finish.

 

 

Attempt another provision

 

Log out and log back in as the Development User (devuser) to request a virtual machine from the CentOS-II blueprint again. This time the VM should deploy properly.

 

 

Conclusion

This exercise was meant to demonstrate how, using the vRealize Automation portal and Log Insight, one can troubleshoot why a virtual machine provisioning request failed, and where to look to determine the root cause.

 

Troubleshooting Failed VM Provisioning Due To Reservation Misconfiguration


A new CentOS blueprint has been updated (CentOS-III), you have communicated the change to the business groups and have requested the Development team to start provisioning. Unfortunately, when the Development Manager attempted to deploy the new VM into the Development Sandbox from the service catalog, it failed.


 

Login to the vRealize Automation Portal

 

If not already logged into the vRealize Automation Portal launch the link from the favorite bookmarks bar and log in as the Development Manager.

 

 

Request Validation

 

  1. Navigate to the Catalog tab and request a new virtual machine from the CentOS-III blueprint.

 

 

Request Details

 

Notice there is a required item on the blueprint.

  1. Select the virtual machine object CentOS.

 

 

Request Details - Required Item

 

The required property is a dropdown menu for Reservation Location.

  1. Select the Development Sandbox from the Reservation Location menu.
  2. Click Submit.

 

 

View Failed Status

 

Recall the previous lession. View the details of the request to attempt to determine the cause of the problem.

  1. Navigate to the Requests tab and observe that the request has failed.
  2. Click on the Request number (#4) to view the details. (Your request number may be different than the one in the picture.)

NOTE: The request may take several minutes before returning a Failed status.  

 

 

View Request Details

 

Ensure to read the entire contents of the error message.

  1. Under the Status section, click on View Details

 

 

Failed Status Details

 

You can read the full details of why the request failed

 

 

View error within Log Insight

 

It is possible to utilize Log Insight to investigate this error.

  1. Change the time filter from Latest 5 minutes of data to Latest hour of data
  2. Select the VMware - vRA 7.3 custom dashboards. (Hidden by the message in the screengrab)
  3. Choose General - Problems.
  4. Hover over the vRA error events by error message and you can see the error why the provisioning request failed.

 

 

Corrective Action

For this challenge:

This scenario occurs when resources are consumed and reservations run out of available resources. There are countless ways one can run out of resources. We could play a pretty long game trying to one-up each other in naming them all.

The positive takeaway from this is that vRealize Automation did exactly what it is supposed to do. When a request came in, the portal checked to see if there were available resources, and when it identified the new addition required more resources than available, it prevented the provision from continuing.

 

 

Solution

 

There will likely be times when the Business Group Reservations will run out of resources. When this occurs, the Fabric Administrator will need to add additional compute resources to the reservation and resize it. For this scenario, we need to expand the storage reservation to resolve the Development Manager's issue.

  1. Log out of vRealize Automation.
  2. Log into vRealize Automation as the Fabric Administrator using Username: cloudadmin and Password: VMware1!.
  3. Click Infrastructure -> Reservations -> Reservations
  4. Select and edit the Development Sandbox reservation (pictured above).

 

 

Reservation Details

 

  1. Choose the Resources tab.
  2. Click the pencil icon next to the RegionA01... datastore and change the storage reservation to 50GB. Click OK.
  3. Change the Memory Reservation to 13GB.
  4. Click OK to save the reservation change.

 

 

Attempt to provision

 

  1. Log out and log back in as the Development Manager.
    • Username: devmgr
    • Password: VMware1!
  2. Reattempt to deploy the CentOS-III Catalog Item. Remember to select the Development Sandbox Reservation.
  3. The provision should be successful.

 

 

Conclusion

This lesson demonstrates the responsibilities of the Fabric Administrator, and what can happen when a reservation runs out of capacity.  

 

 

Lab Housekeeping

Before you continue on with this lab, please destroy any virtual machines that may be provisioned. Unfortunately, there is a strict limitation on the amount of workloads that can accumulate during this lab.

 

 

Destroy provisioned virtual machines

 

  1. Click on Items.
  2. Set Owned by: to Development.

 

 

Deployments View

 

NOTE: Do not destroy the deployment container for dev-000.

  1. Expand the Deployment Container Names to see the virtual machine names. Highlight the Container Name.
  2. From the Actions menu, select Destroy.

Ensure to log out before continuing onto the next lesson.

 

Troubleshooting Failed VM Provisioning Due To IP Address Misconfiguration


Recently, you setup an isolated network for the Development Business Group to address one of their needs. After a virtual machine deployment, the Development User has informed you that he can no longer provision virtual machines in the new Limited External Network space.


 

Log into the vRealize Automation portal

 

Log into the vRealize Automation Portal as the Development User (devuser).

The below is a list of credentials that can be used for this lab.

 

 

Provision Virtual Machine

 

We need to recreate the Development User's scenario to understand what is occurring.

  1. Navigate to the Catalog tab.
  2. Using the CentOS-III catalog item, request a virtual machine.

 

 

Request Details

 

  1. The catalog item has a required item that needs to be completed. Select the CentOS virtual machine object.

 

 

Reservation Location

 

  1. Select the Limited External Network in Reservation Location dropdown menu.
  2. Click Submit.

 

 

Provision Request Status

 

  1. Navigate to the Requests tab to view the status of the provisioning request.
  2. The Virtual Machine should complete successfully. In our example above (Request #8), the virtual machine deployed successfully. (Your request number may be different.)
  3. Once the deployment has completed, request another CentOS-III virtual machine repeating the same steps.
  4. Again, select the Limited External Network for the Reservation Location.
  5. Click Submit.

 

 

Failed Request

 

  1. This time, the virtual machine provision request (Request #9) failed. (Your request number may be different from the picture.)
  2. Take note of the Request Number, as you will need this number later. Our example is #9.
  3. Open the failed request to view the details.

NOTE: It may take a few minutes before the provision request returns a Failed status.

 

 

Request Details

 

  1. Under the Status area, select View Details.

 

 

Error Message

 

The error that is provided states that we have exhausted the IP addresses in the network profile.

For this challenge:

This scenario is common among many brownfield deployments, as well as deployments where subnets are shared between many different types of workloads - virtual and physical. In these common configurations, subnets are sliced up and can be quickly exhausted when provisioning with vRealize Automation.

 

 

Validate with Log Insight

 

As we have seen in previous lessons, Log Insight can be used as well to monitor, investigate, ad troubleshoot the virtual machine provisioning. Once again, log into vRealize Log Insight if you are not already logged in.

  1. Navigate to the VMware - vRA 7.3 menu
  2. Then select vRA - Catalog Requests menu from the menu tree
  3. Change the time from Latest 5 minutes of data to Latest hour of data

 

 

Catalog Requests Details

 

In the Catalog requests with context per user, you can see the most recent virtual machine provision requests. We want to trace Request #9 from our example. (If your Request number was different, use that number instead.)

  1. Click on the pink bar representing Request #9 and select Interactive Analytics.

It is possible that the color of the bar representing your request number may not be the same color as our example. You can use the key on the right hand side to match your request number to its color.  

 

 

Fetch the Context ID

 

  1. Locate the context ID string at context=. Copy this string and head back to the Dashboard.

 

 

Filter using the Context ID

 

  1. Paste the Context ID in the Context field.
  2. Click Refresh.

 

 

Queries to use by Context String

 

The dashboard displays all content exclusively to Request #9.

  1. Locate the Queries to use by Context string widget.
  2. Select the predefined query Count by vRA Component of events for Context string.

 

 

Interactive Analytics

 

Modify this query by adding another filter.

  1. Click Add Filter.
  2. Fill in the name: priority
  3. Select contains
  4. Enter the word: error
  5. Click the magnifying glass to Search
  6. The error will be displayed on the first line.

 

 

Corrective Action

 

Return to the vRealize Automation portal. Log out and log back in as the IaaS Administrator (cloudadmin).

  1. Navigate to Infrastructure > Reservations > Network Profiles.
  2. Locate the Limited External Network Profile.
  3. Select it, and click the Pencil/Edit to edit the configuration.

 

 

Network Profile Details

 

Click the Network Ranges tab along the top.

In this configuration, you can view the detail of the IP Addresses that were allocated for this IP range. Our lab had only allocated one IP Address in the range, and when we requested the second VM, it was already exhausted and failed.

In a live Network Range, the IP Range will be locked preventing user mishaps from occurring that may cause potential network disruption to virtual machines. Therefore, you will see that the Pencil/Edit option is greyed out. If no IP addresses were consumed within the range, it could be edited allowing additional IP addresses into the range.

 

 

Add a new IP Range

 

In our example, we will add an additional IP range to the Network Profile.

 

 

Attempt a new provision

 

This new IP range will allow the Development User to provision new virtual machines into the Limited External Network once more. Log out and back in as the Development User (devuser) and request a new CentOS-III virtual machine.

 

T-Shirt Challenge


Virtual machine T-Shirt sizes are all the rage! Everyone seems to want one. As the Infrastructure Architect, you have constructed a new T-Shirt catalog item for consumption. Unfortunately, the Development User (devuser) is confused by the new changes and requires some assistance in better understanding how to fully utilize the new catalog item.


 

Log into the vRealize Automation portal

 

Log into the portal as the Infrastructure Architect (cloudadmin).

 

 

Component Profile Configuration

 

T-Shirt sizing is performed by configuring Component Profiles and attaching them to a blueprint. Deployers can use the Size and Image component profiles on a blueprint to select pre-defined value sets. The Size and Image component profiles, and their specified value sets, map to a logical  grouping such as Small, Medium, and Large. By using these settings, you can reduce the number of blueprints that  you need to maintain.

For this scenario, the Component Profile configurations have already been performed and attached tp the CentOS - T-Shirt blueprint.

You can view the settings for the Component Profiles by going to Administration > Property Dictionary > Component Profiles.

The VMware documentation center provides information on configuring the Component Profiles for Operating System Images, and Sizes.

These links can provide more information:  (Opens in a new window)
Configure Component Profile Size Settings for Catalog Deployments

Configure Component Profile Images Settings for Catalog Deployments

 

 

Blueprint Configuration

 

Let's view the configuration of the blueprint to observe how the component profiles are being utilized.

  1. Navigate to the Design tab, then select Blueprints.
  2. Select the CentOS - T-Shirt blueprint to view the details.

 

 

Blueprint Canvas

 

  1. Click on the CentOS virtual machine object configuration.
  2. Locate the Profiles tab and select it.

The Component Profiles have already been attached to the CentOS - T-Shirt with the Image and Sizing preset. The default size is set to Small.

 

 

Request a T-Shirt

Log out and log back in as the Development User (devuser).

 

  1. Navigate to the Catalog tab and request a CentOS - T-Shirt.

 

 

Request Details

 

  1. Select the CentOS virtual machine object.
  2. The Operating System defaults to CentOS as it is defined in the Blueprint.
  3. The Size defaults to Small.
  4. Click Submit.

NOTE: You can view the sizing configurations (CPU, Mem, Storage) of the VM when you pull the dropdown menu down. Due to the limited resources within the Lab, please do not attempt to deploy large size VMs.

 

 

View the T-Shirt

 

  1. Click on Items to view the deployed virtual machine.
  2. Click on the virtual machine (dev-006). (The virtual machine name may be different for your lab.)

 

 

Reconfigure the T-Shirt

 

The details of the virtual machine is shown in this new window.

  1. On the Actions menu, locate and select Reconfigure.

 

 

Stretch (resize) the T-Shirt

 

  1. In the Reconfigure request, modify the CPU from 1 to 2.
  2. Alter the Memory from 1024 to 1536.
  3. Click Submit.

 

 

Request Status

 

  1. Navigate to the Requests tab to view the status of the reconfigure action.

 

 

Item Details

 

The reconfigure operation will kick off and resize the virtual machine. As you saw, the reconfigure does not provide a set "T-shirt size" as in the new request.

This is to allow users and administrators to grow some virtual machines as needed gradually versus allocated resources that may not be needed based on the "Shirt Size".

There are some limitations to T-Shirt sizing that you should familiarize yourself with. If you try to resize the virtual machine to a size greater than the Largest setting, it will fail. Additionally, if you edit the Component Profile Size ValueSets, the changes will retroactively work on already deployed virtual machines.

 

Module 4 - Extensibility Troubleshooting (30 min)

Introduction


This module will challenge you on common issues faced when working on integrating vRealize Automation and vRealize Orchestrator.


 

Look at the lower right portion of the screen

 

Please check to see that your lab is finished all the startup routines and is ready for you to start. If you see anything other than "Ready", please wait a few minutes.  If after 5 minutes you lab has not changed to "Ready", please ask for assistance.

 

What to do when workflows are seen running multiple times instead of just once


You are sitting in your office, reading vRealize Automation - Life Cycle Extensibility (opens in a new window), when you decide to double check on a recent enhancement done by your extended team of Integration Engineers. You want to make sure that they are in line with best practices.


 

Launch vRealize Orchestrator Client

 

To launch vRealize Orchestrator:

  1. Locate the vRealize Orchestrator Client shortcut on your Main Console desktop
  2. Double click or hit Enter to launch it

 

 

Login to vRealize Orchestrator

 

To login to vRealize Orchestrator:

  1. Ensure that the Host name is vra-01a.corp.local:443
  2. User name: administrator@vsphere.local
  3. Password: VMware1!
  4. Click Login

 

 

Switching to Design mode in vRealize Orchestrator

 

Once vRealize Orchestrator client has been successfully launched, you need to switch to Design mode:

  1. Click on the dropdown list and select Design

 

 

Exploring vRealize Orchestrator workflow

 

Rainpole's team of integration engineers have built a workflow that will add a computer account into your organization's Active Directory Organizational Unit after a virtual machine request has been made through vRealize Automation. To find out more about how the workflow operates:

  1. Expand the HOL-1906-04 folder
  2. Click on the workflow Add a computer in an OU
  3. Click on Schema to show details on the execution steps in the workflow

Note: Do not close or exit from the vRealize Orchestrator Client, just minimize it from the desktop.

 

 

Open Chrome Browser from Windows Quick Launch Task Bar

 

  1. Click on the Chrome Icon on the Windows Quick Launch Task Bar.

 

 

Launch vRealize Automation

 

Click on the vRealize Automation bookmark

 

 

Log into vRealize Automation

 

Note: If you are logged in as another user, log out.

  1. User Name: cloudadmin
  2. Password: VMware1!
  3. Click on Sign in button

 

 

Accessing Administration options

 

  1. Click on the Administration tab
  2. Select Events

 

 

Accessing subscriptions created

 

  1. Click on Subscriptions
  2. Click on the description text beside the Add a computer in an OU subscription
  3. Click Publish

Note: This step activates the workflow subscription that will invoke the vRealize Orchestrator workflow Add a computer in an OU which you previously saw in the vRealize Orchestrator client.

 

 

Login to vRealize Automation as Dev User

 

Note: Log out of vRealize Automation as cloudadmin first before proceeding to login as devuser.

  1. User Name: devuser
  2. Password: VMware1!
  3. Click on Sign in button

 

 

Select catalog item

 

  1. Click on Catalog tab
  2. Request for a Windows Server 2012 catalog item

 

 

Submit a Request

 

  1. Click on Windows2012
  2. Then select Submit

 

 

Viewing the workflow run in vRealize Orchestrator

 

Note: Return to the vRO Client within your web browser.

  1. Expand the workflow Add a computer in an OU to view the workflow execution history.

NOTE: It may take a few moments before the errors start to generate.

 

 

Challenge!

For this challenge:

The vRealize Automation Event Broker Service works to trigger vRealize Orchestrator Workflows at various stages of the provisioning lifecycle.

We should investigate to determine why the workflow continues to run multiple times, instead of just once. This will require us to fix the issue so that the Add a computer in an OU workflow is only invoked once during a the VMPSMasterWorkflow32.BuildingMachine state PRE phase for a vRealize Automation request for a Virtual Machine.

 

 

Investigate with Log Insight

 

Launch a new browser tab, and click vRealize Log Insight on the Favorites bar to open Log Insight.

Log in with credentials:

 

 

Use the vRA Content Pack in Log Insight to view the error

 

The vRA Content Pack in Log Insight provides easy views and access into Event Broker log events, errors, and logs. Log Insight can be launched from the Log Insight bookmark at the top of the browser.

  1. Click Dashboards.
  2. Click VMware - vRA 7.3
  3. Select the vRA - Event Broker dashboard.

 

 

IaaS Lifecycle States

 

Scroll through the page to see the various dashboards. Locate the one above, Event Broker - IaaS Lifecycle States.

  1. View detailed Interactive Analytics by clicking on any of the colored blocks within the dashboard.

 

 

vRA - Event Broker Interactive Analytics

 

The Interactive Analytics provides a detailed view into the Event Broker Logs. The log shows that the workflow is being called during every stage of the provisioning lifecycle.

 

 

Solution

 

Many times, when setting up subscription events, workflows do not run or behave as they should if the below parameters have not been met:

  1. Subscription events do not have conditions setup
  2. Conditions defined are not correctly configured
  3. Workflows that was developed has errors

 

 

Workflow Subscription Conditions

 

To solve this challenge:

  1. Logout and login to vRealize Automation as cloudadmin (Password: VMware1!)
  2. Click on Administration -> Events -> Subscriptions
  3. Edit Add a computer in an OU subscription
  4. Click Next
  5. Select Run based on conditions
  6. Select All of the following to match against ALL conditions in the subscription
  7. Select Data -> Lifecycle state -> Lifecycle state name from the menu
  8. Select Equals as the Operator
  9. In the 3rd dropdown, select Constant -> VMPSMasterWorkflow32.BuildingMachine
  10. Click Add Expression to add another expression
  11. Select Data -> Machine -> Machine type
  12. Select Equals as the Operator
  13. For the value, choose Constant -> Virtual Machine
  14. Click Add Expression to add one more expression
  15. Select Data -> Lifecycle state -> State phase
  16. Select Equals as the Operator
  17. For the value, choose Constant -> PRE
  18. Click Finish

You can now login to vRealize Automation as devuser and request for the Windows Server 2012 catalog item, and the workflow should only be invoked once during the pre-stage of BuildingMachine.

NOTE: The VM request may fail due to lack of resources. This is an expected behavior. The existing VM request may finish successfully (if you were fast enough).

 

 

Review

 

Now that we have completed your first vRealize Automation Challenge on Extensibility. Let's take a moment to review what we have done here.

In vRealize Automation 7, we introduced Event Broker, an event-driven extensibility engine which provides UI-driven options for lifecycle automation. Event broker and a library of existing workflows and partner-provided plug-ins on the VMware Solutions Exchange help VMware accelerate the process of integrating multi-vendor tools into your vRealize Automation blueprints.

In this challenge, you were tasked to look into how we can automatically add a provisioned VM into an Active Directory Organizational Unit (OU). We had the workflow that was built in vRealize Orchestrator and setup an event broker subscription in vRealize Automation to trigger the workflow during the appropriate lifecycle state of the machine request.

However, based on the behavior of how this event triggered, it seems that the workflow was executed at every state of the machine lifecycle. The screen capture shows where to define conditions that trigger workflows at the correct lifecycle state. This allows us to filter events even further, e.g., subscribing to events only from a certain part of the lifecycle or only for a certain type of object. The original subscription's conditions were setup to run for all events during a machine provisioning state, which explains why the workflow was being executed multiple times.

In order for us to properly define workflow subscriptions, we need to provide conditions to filter events.

 

 

Conclusion

 

To correct this mistake, we defined a few conditions:

  1. We setup a filter to only subscribe to events that are at the Building Machine state. This helps to ensure that the workflow is only triggered at the correct lifecycle state
  2. Once we defined which state on which this subscription is listening, we defined whether to execute workflows during the PRE or POST stage of the lifecycle state
  3. Lastly, we provided the object type on which this subscription is listening, which in this case, is a a Virtual Machine.

With these conditions setup in the subscription, the workflow will only be triggered during the PRE stage of the Building Machine phase and only on Virtual Machine objects.

 

 

Congratulations!

Your new knowledge of how to setup Lifecycle extensibility in vRealize Automation will come in handy when you have such similar requirements in the future.

Onwards and upwards! Are you ready for more extensibility challenge?

 

 

Lab Housekeeping

Before you continue on with this lab, please destroy any virtual machines that may be provisioned. Unfortunately, there is a strict limitation on the amount of workloads that can accumulate during this lab.

 

 

Destroy provisioned virtual machines

 

  1. Click on Items.
  2. Set Owned by: to Me.

 

 

Deployment Containers

 

  1. Expand the Deployment Container Names to see the virtual machine names. Highlight the Container Name.
  2. From the Actions menu, select Destroy.

Ensure to log out before continuing onto the next lesson.

NOTE: Do not destroy the deployment container for dev-000.

 

Troubleshooting workflows that are not being triggered when they are supposed to


Just when you are about to take a breather from the previous challenge, you receive a complaint that a newly integrated workflow, which allows users to change a machine's admin/root password during the request submission, is not working! It is up to you now, to save the day with this new challenge!


 

Launch vRealize Orchestrator Client

 

Note: If you still have your vRealize Orchestrator Client minimized on your desktop, please restore the window and you may proceed to the next step here. Otherwise, please follow the instructions as shown.

To launch vRealize Orchestrator:

  1. Locate the vRealize Orchestrator Client shortcut on your Main Console desktop
  2. Double click or hit Enter to launch it

 

 

Login to vRealize Orchestrator

 

To login to vRealize Orchestrator:

  1. Ensure that the Host name is vra-01a.corp.local:443
  2. User name: administrator@vsphere.local
  3. Password: VMware1!
  4. Click Login

 

 

Switching to Design mode in vRealize Orchestrator

 

Once vRealize Orchestrator client has been successfully launched, you need to switch to Design mode:

  1. Click on the dropdown list and select Design

 

 

Exploring vRealize Orchestrator workflow

 

One of your integration engineers have built a workflow that will allow the user to change the admin/root password when they are submitting a request through vRealize Automation. To find out more about how the workflow operates:

  1. Expand the HOL-1906-04 folder
  2. Click on the workflow Change admin password
  3. Click on Schema to show details on the execution steps in the workflow

Note: Do not close or exit from the vRealize Orchestrator Client, just minimize it from the desktop.

 

 

Open Chrome Browser from Windows Quick Launch Task Bar

 

Note: If you already have Chrome launched, and logged into vRealize Automation, you may skip this step and proceed by clicking here.

  1. Click on the Chrome Icon on the Windows Quick Launch Task Bar.

 

 

Launch vRealize Automation

 

Click on the vRealize Automation bookmark

 

 

Log into vRealize Automation

 

Note: If you are not logged in as cloudadmin user, please Log out of vRealize Automation first before proceeding to login as cloudadmin. If you are already logged in as cloudadmin user, please proceed to next step.

  1. User Name: cloudadmin
  2. Password: VMware1!
  3. Click on Sign in button

 

 

Accessing Administration options

 

  1. Click on the Administration tab
  2. Click on Events

 

 

Accessing subscriptions created

 

  1. Click on Subscriptions
  2. Click on the description text besides the Set Admin Password subscription
  3. Click Publish

Note: This step activates the workflow subscription that will invoke the vRealize Orchestrator workflow Change admin password which you previously saw in the vRealize Orchestrator client.

 

 

Login to vRealize Automation as Dev User

 

NOTE: Log out of vRealize Automation as cloudadmin first before proceeding to login as devuser.

  1. User Name: devuser
  2. Password: VMware1!
  3. Click on Sign in button

 

 

Select catalog item

 

  1. Click on Catalog tab
  2. Request for a CentOS - Provision catalog item

 

 

Submit a Request

 

  1. Click on the CentOS virtual machine object as it has a provisioning requirement.
  2. Change the admin password (e.g., VMware2!)
  3. Click Submit

 

 

Monitoring the progress of request

 

You can monitor the progress of your request:

  1. Click on Requests
  2. Wait for your request to update its Status from In Progress to Successful. (Your request number may be different to the screengrab.)
  3. You can hit the Refresh button to get an update of the status

This usually takes 2-5 minutes to complete.

 

 

Workflow Execution in vRealize Orchestrator

 

  1. Expand the workflow Change admin password to view the workflow execution history.

Note: Observe. Even though a few minutes have past, the workflow execution for the request never shows up.

 

 

Challenge!

For this challenge:

We will identify why the workflow did not run at all even though an event subscription has been created.

The Change admin password workflow is designed to be invoked during the VMPSMasterWorkflow32.MachineProvisioned phase for a vRealize Automation request for a Virtual Machine. This workflow should be triggered during the POST state phase of VMPSMasterWorkflow32.MachineProvisioned.

 

 

Solution

 

Many a times, when setting up subscription events, workflows do not run or behave as they should if the below parameters are not met:

  1. Subscription events do not have conditions setup
  2. Conditions defined are not correctly configured
  3. Workflows that was developed has errors

 

 

Workflow Subscription Conditions

 

To solve this challenge:

  1. Log out of vRealize Automation as devuser (Password: VMware1!)
  2. Login to vRealize Automation as cloudadmin
  3. Click on Adminstration -> Events -> Subscriptions
  4. Edit Set Admin Password subscription
  5. Click Next
  6. Find the last condition Data -> Machine -> Machine type
  7. For the value, change to Constant -> Virtual Machine
  8. Click Finish

You can now login to vRealize Automation as devuser and request the CentOS - Provision catalog item, and the workflow will be invoked during the post-stage of MachineProvisioned.

 

 

Review

 

Let's take a minute to review how the Event Broker subscription was setup before you attempted to fix it.

Based on the subscription that was setup (as shown in the screen capture), the conditions that were defined will only trigger the subscription when:

  1. The request is in the Machine Provisioned state
  2. It is in the POST stage of the Machine Provisioned state
  3. It will only be triggered if the object type is a Cloud Machine

The first 2 conditions are defined correctly, however the type of object that we want to filter this event against is incorrect. This should be set as Virtual Machine object type, instead of Cloud Machine. This is the reason why, when we requested the catalog item CentOS - Provision catalog item, the event was not even triggered.

 

 

Good job!

You deserve a pat on the shoulder for making it this far into the challenge! You are now much more confident in setting up event subscription conditions or filters to accurately trigger workflows during the proper lifecycle state of a machine request.

Good job!

 

Assigning a new workflow as an action that could be triggered by user


One of your clients has requested a custom resource action that allows them to migrate their virtual machines from one ESXi host to another. Your integration engineer has implemented a custom workflow in vRealize Orchestrator to accomplish this task, and it’s up to you to make this action available to your vRealize Automation users.


 

Launch vRealize Orchestrator Client

 

NOTE: If you still have your vRealize Orchestrator Client minimized on your desktop, please restore the window and you may proceed to the next step here. Otherwise, please follow the instructions as shown.

To launch vRealize Orchestrator:

  1. Locate the vRealize Orchestrator Client shortcut on your Main Console desktop
  2. Double click or hit Enter to launch it

 

 

Login to vRealize Orchestrator

 

To login to vRealize Orchestrator:

  1. Ensure that the Host name is vra-01a.corp.local:443
  2. User name: administrator@vsphere.local
  3. Password: VMware1!
  4. Click Login

 

 

Switching to Design mode in vRealize Orchestrator

 

Once vRealize Orchestrator client has been successfully launched, you need to switch to Design mode:

  1. Click on the dropdown list and select Design

 

 

Exploring vRealize Orchestrator workflow

 

One of your integration engineers have built a workflow that will vmotion a virtual machine via between ESXi hosts. To find out more about how the workflow operates:

  1. Expand the HOL-1906-04 folder
  2. Click on the workflow Migrate virtual machine
  3. Click on Schema to show details on the execution steps in the workflow

Note: Do not close or exit from the vRealize Orchestrator Client, just minimize it from the desktop.

 

 

Adding a custom action into vRealize Automation

 

Notice in the Actions List, the new resource action is missing.

This can be viewed by navigating to Items > Deployment > Machines and viewing the details of any of the items in the list. This example shows the details of dev-009. (The virtual machines in your list, may be different than the sample.)

 

 

Corrective Action

For this challenge:

Your users want a resource that allows them to migrate their virtual machines from one host to another. Your integration engineers have already built a workflow, Migrate virtual machine, to provide this functionality.

It is up to you, now, to make this functionality available to your users.

We need to map the Migrate virtual machine workflow to a resource action in vRealize Automation. We then need to entitle this resource action to the "Development Services" entitlements in vRealize Automation.

Let's see how we do this.

 

 

Solution

 

To solve this challenge:

  1. Login to vRealize Automation as cloudadmin (Password: VMware1!)
  2. Navigate to Design -> XaaS -> Resource Actions
  3. Click on New to create a new resource action

 

 

Create a Resource Action

 

  1. Select Orchestrator -> HOL-1906-04 -> Migrate virtual machine
  2. Click Next
  3. Leave everything as default and click Next (not visible).

 

 

Hide Catalog Request Information Page

 

Ensure Hide catalog request information page is checked and click Next

Leave the form as default and click Finish (You can modify the form if you know what you are doing). (This step is not visible.)

 

 

Publish the Resource Action

 

Click Publish to publish your newly created resource action Migrate virtual machine

 

 

Edit the Entitlements

 

Navigate to Administration -> Catalog Management -> Entitlement

  1. Edit the Development Services entitlement
  2. Click Next (not visible)

 

 

Add the new Resource Action

 

  1. Select the Items & Approvals tab.
  2. Click on the plus icon next to Entitled Actions

 

 

Add Migrate virtual machine Action

 

  1. In the Name search field, type in Migrate virtual machine (optional).
  2. Check the box next to Migrate virtual machine
  3. Click OK
  4. Click Finish (Not visible)

 

 

Validate the new Day 2 Action

 

You can log into vRealize Automation as devuser, browse to any Machines under Items, and you will be able to see a new resource action Migrate virtual machine. Try it!

 

Ensuring that the provisioning process stops when an event broker error occurs


You have just implemented a workflow where a user's request for a virtual machine would have its snapshot taken as a post provisioning task. The actual workflow was created by the integration engineers, while you were responsible for integrating that workflow into vRealize Automation using Event Broker.

Just as you are about to sit back and relax for the day, another user runs up to you saying his machine which he requested from vRealize Automation, has no snapshots! You immediately get to work and investigate a root cause.

After reading more on vRealize Automation 7's Event Broker functionality here and here, you decide to fix it on your own.


 

Launch vRealize Orchestrator Client

 

Note: If you still have your vRealize Orchestrator Client minimized on your desktop, please restore the window and you may proceed to the next step here. Else please follow the instructions as shown.

To launch vRealize Orchestrator:

  1. Locate the vRealize Orchestrator Client shortcut on your Main Console desktop
  2. Double click or hit Enter to launch it

 

 

Login to vRealize Orchestrator

 

To login to vRealize Orchestrator:

  1. Ensure that the Host name is vra-01a.corp.local:443
  2. User name: administrator@vsphere.local
  3. Password: VMware1!
  4. Click Login

 

 

Switching to Design mode in vRealize Orchestrator

 

Once vRealize Orchestrator client has been successfully launched, you need to switch to Design mode:

  1. Click on the dropdown list and select Design

 

 

Exploring vRealize Orchestrator workflow

 

One of your integration engineers has built a workflow that automatically takes a snapshot of a virtual machine after it has been provisioned by vRealize Automation. To find out more about what the workflow operates:

  1. Expand the HOL-1906-04 folder
  2. Click on the workflow Create a snapshot
  3. Click on Schema to show details on the execution steps in the workflow

NOTE: Do not close or exit from the vRealize Orchestrator Client, just minimize it from the desktop.

 

 

Open Chrome Browser from Windows Quick Launch Task Bar

 

NOTE: If you already have Chrome launched, and logged into vRealize Automation, you may skip this step and proceed by clicking here.

  1. Click on the Chrome Icon on the Windows Quick Launch Task Bar.

 

 

Launch vRealize Automation

 

Click on the vRealize Automation bookmark

 

 

Log into vRealize Automation

 

NOTE: If you are logged in as devuser user, please Log out of vRealize Automation first before proceeding to login as cloudadmin. If you are already logged in as cloudadmin user, please proceed to next step.

  1. User Name: cloudadmin
  2. Password: VMware1!
  3. Click on Sign in button

 

 

Viewing Administration options

 

  1. Click on the Administration tab
  2. Click on Events

 

 

Viewing Subscriptions

 

  1. Click on Subscriptions
  2. Click on the description text beside the Create a post provisioning snapshot subscription
  3. Click Publish
  4. Make sure that the Status of the subscription is marked as Published and NOT Draft (not visible).

Note: This step activates the workflow subscription that will invoke the vRealize Orchestrator workflow Create a snapshot which you previously saw in the vRealize Orchestrator client.

 

 

Login to vRealize Automation as Dev User

 

NOTE: Log out of vRealize Automation as cloudadmin first before proceeding to login as devuser.

  1. User Name: devuser
  2. Password: VMware1!
  3. Click on Sign in button

 

 

Select catalog item

 

  1. Click on Catalog tab
  2. Request a CentOS - Provision catalog item

 

 

Submit a Request

 

  1. Click on CentOS virtual machine object as it has a requirement for provisioning.
  2. Set admin password to VMware1!
  3. Click Submit

 

 

Monitoring the progress of request

 

You can monitor the progress of your request:

  1. Click on Requests
  2. Wait for your request to update its Status from In Progress to Successful or Failed. (Your Request number may be different than the one pictured.)
  3. You can hit the Refresh button to get an update of the status

This usually takes several minutes to complete.

 

 

Viewing Items

 

  1. Click on Items
  2. Click on Deployments
  3. Expand the deployment as shown to reveal components
  4. Click on the machine name to view details

 

 

Viewing Machine Details

 

  1. Click on Snapshots

You see that there is no snapshot available. Why would that be? Let's have a look at the workflow run from vRealize Orchestrator.

 

 

Viewing the workflow run in vRealize Orchestrator

 

Note: Please restore your vRealize Orchestrator window if it was minimized previously.

  1. Expand the workflow Create a snapshot to view the workflow execution history
  2. Click on the execution details to find out if the workflow ran successfully or failed

Note: This should not happen. If the workflow failed, the provisioning task should have also failed. vRealize Automation marked the provisioning as Successful.

 

 

Investigate with Log Insight

 

Launch a new browser tab, and click vRealize Log Insight on the Favorites bar to open Log Insight.

Log in with credentials:

 

 

View the Workflow using the vRA Content Pack in Log Insight

 

The workflow request can be viewed within the Event Broker Dashboard in Log Insight. Open the Log Insight portal in a new tab from the link in the browser's Bookmark Favorites.

  1. Click on Dashboards
  2. Click VMware - vRA 7.3
  3. Select the vRA - Event Broker dashboard.
  4. Select the down arrow next to default time range of Latest 5 minutes of data and change this to Latest hour of data.

 

 

vRO workflow runs over time

 

Scroll down to find the vRO workflow runs over time and click the Interactive Analytics icon to enter the Interactive Analytics.

 

 

View the Workflow using the vRA Content Pack in Log Insight

 

The logs show that the Create a snapshot workflow failed.

 

 

Corrective Action

For this challenge:

We need to investigate and determine why the provisioning task completed even though the Create a snapshot workflow failed

To fix the issue, we want to configure provisioning to fail if the workflow Create a snapshot fails.

 

 

Solution - Let's investigate the subscription

 

Before we go into the actual solution, let's have a look at how the subscription was setup again.

  1. Log out of vRealize Automation as devuser
  2. Login to vRealize Automation as cloudadmin (Password: VMware1!)
  3. Navigate to Adminstration -> Events -> Subscriptions
  4. Click on Create a post provisioning snapshot

 

 

Solution - Blocking Task

 

  1. Click on Details
  2. It seems like this subscription was not flagged as a Blocking task

You might be wondering: "What does Blocking mean?"

In some scenarios, we need to influence the provisioning process depending on the output of the workflow that is being triggered. To do this, we introduce the concept of blocking subscriptions. In a typical subscription without blocking enabled, events are delivered asynchronously. We often refer to this as a "fire and forget" mode of delivery. This means that, once a workflow has fired an event, it continues to run and does not keep track of whether the event was picked up successfully, or if something needed to happen to the workflow.

Blocking subscriptions are different in that they actually pause the the current workflow until they have been fully processed. This allows feedback to be sent to the workflow like throwing an exception during error. Since our workflow here is suppose to cause the provisioning to fail if the vRealize Orchestrator workflow fails, blocking subscriptions will allow us to do just that!

Click Cancel to close the subscription.

 

 

Solution - Unpublished the current subscription

 

At this point, we need to fix the subscription by creating a new one. First we have to unpublish the existing subscription.

  1. Click on the description text besides the Create a post provisioning snapshot subscription
  2. Click Unpublish

 

 

Solution - Create a new subscription

 

Once you have unpublished Create a post provisioning snapshot

  1. Click New

Unfortunately, the blocking task option flag cannot be changed on an existing vRealize Automation subscription. Therefore, a new subscription must be created.

 

 

Solution - Define Event Topic

 

  1. Click Machine provisioning
  2. Click Next

 

 

Solution - Lifecycle State Conditions

 

  1. Select Run based on conditions
  2. Select All of the following to match against ALL conditions in the subscription
  3. Select Data -> Lifecycle state -> Lifecycle state name from the menu
  4. Select Equals as the Operator
  5. Select Constant -> VMPSMasterWorkflow32.MachineProvisioned
  6. Click Add Expression to add another expression
  1. Select Data -> Lifecycle state -> State phase
  2. If you are not able to see State Phase to be selected, you need to click on the horizontal scrollbar to see the vertical scrollbar
  3. Select Equals as the Operator
  4. For the value, choose Constant -> PRE
  5. Afterwards, Click Add Expression to add another expression
  1. Select Data -> Machine -> Machine type
  2. Select Equals as the Operator
  3. For the value, choose Constant -> Virtual Machine
  4. Click Next

 

 

Solution - Select a workflow

 

  1. Under Select a Workflow, choose Orchestrator -> HOL-1906-04 -> Create a snapshot workflow
  2. Click Next

 

 

Solution - Subscription Details

 

  1. Name your new subscription (can be any name you like)
  2. Check Blocking
  3. Type in 1 for Priority
  4. Click Finish

Note: Priority allows you to define the order in which blocking subscriptions run. If an event topic has multiple blocking workflow subscriptions with the same priority, the subscriptions are then processed in alphabetical order based on the subscription name. You can also specify a Timeout value to determine how long should a workflow be running before it fails.

 

 

Solution - Publish the subscription

 

  1. Click on the description text beside the Draft version of Create a snapshot.
  2. Click Publish

You can now request for a new catalog item, and if the workflow fails, the provisioning will be marked as failed too.

For more information about blocking subscriptions, you can read in details here. (Opens in a new window)

 

 

Solution - Request for a new catalog item

 

Log out as cloudadmin and log in as devuser (Password: VMware1!) to request for a new catalog item.

  1. Click on Catalog
  2. Click Request for CentOS - Provision

 

 

Solution - Fill in request details

 

  1. Click on CentOS virtual machine object
  2. Fill in admin password (e.g. VMware2!)
  3. Click Submit

 

 

Solution - Check Request progress

 

You can monitor the progress of your request:

  1. Click on Requests
  2. Wait for your request to update its Status from In Progress to Failed
  3. You can hit the Refresh button to get an update of the status

This usually takes 2-5 minutes to complete.

NOTE: The provisioning will still fail. This is expected (and we will learn why in the next lesson). What we want to see when the workflow fails is that the provisioning fails also.

Note: Take note of the Request number, it will be needed in the next lesson.

 

 

Solution - Verifying vRO workflow

 

You can now maximize or restore your vRealize Orchestrator client to check on the workflow run progress too.

You should see that the vRealize Orchestrator workflow (Create a snapshot) has failed.

 

 

Solution - Verifying vRA provisioning status

 

You can restore your Chrome browser and vRealize Automation tab (Ensure you are logged in as devuser)

  1. You will see that the provisioning request will Fail
  2. You have the option to click on the request number to view the error exception that has been passed from vRealize Orchestrator, to vRealize Automation.

 

 

Review

Now that you have solved this challenge, let us review what we have accomplish so far.

We have learned that we need to define a subscription as a blocking task if we want the provisioning process to wait for the completion of an Orchestrator workflow before proceeding. Event Broker allows the triggering of a blocking task, which can pause a given workflow to hand information off to or wait for a response from an external system. Based on the response, Event Broker can determine how to proceed with the provisioning request.

In this challenge, we needed a way to stop the provisioning request, should the vRealize Orchestrator workflow fail to take a snapshot of the VM. By setting up a blocking task subscription, Event Broker will now wait for the outcome of the vRealize Orchestrator workflow before deciding to proceed with or fail the provisioning request.

 

 

Lab Housekeeping

Before you continue on with this lab, please destroy any virtual machines that may be provisioned. Unfortunately, there is a strict limitation on the amount of workloads that can accumulate during this lab.

 

 

Destroy provisioned virtual machines

 

  1. Click on Items.
  2. Set Owned by: to Me.

 

 

Deployment Details

 

  1. Expand the Deployment Container Names to see the virtual machine names. Highlight the Container Name.
  2. From the Actions menu, select Destroy.

Ensure to log out before continuing onto the next lesson.

NOTE: Do not destroy the deployment container for dev-000.

 

 

Congratulations!

You have now successfully used Event Broker to enhance lifecycle automation with vRealize Automation for multiple scenarios. Hopefully this challenge will inspire you with more ideas to apply to your vRealize Automation projects.

Here are some additional reading on Event Broker that you may find useful:

 

 

Conclusion

Another round of congratulations goes out to you! As a vRA Administrator, you have been very successful maneuvering through the various scenarios and applying the appropriate solutions.

 

Post provisioning task extensibility


Alright, you've solved the previous challenge and now your event broker subscriptions are working properly. However, there's still something wrong with the workflow. The integration engineer that built the workflow, unfortunately, is on vacation and you should probably wait for him to come back and fix it.

However, your boss is pressuring you to get this fixed as soon as you can since you are the VMware expert within Rainpole Enterprise Inc. And without a doubt, you are going to take a look at the problem.

NOTE: Do not attempt this challenge if you have not completed "Ensuring that the provisioning process is not stopping when an event broker error occurs" challenge.


 

Launch vRealize Orchestrator Client

 

Note: If you still have your vRealize Orchestrator Client minimized on your desktop, please restore the window and you may proceed to the next step here. Otherwise, please follow the instructions as shown.

To launch vRealize Orchestrator:

  1. Locate the vRealize Orchestrator Client shortcut on your Main Console desktop
  2. Double click or hit Enter to launch it

 

 

Login to vRealize Orchestrator

 

To login to vRealize Orchestrator:

  1. Ensure that the Host name is vra-01a.corp.local:443
  2. User name: administrator@vsphere.local
  3. Password: VMware1!
  4. Click Login

 

 

Switching to Design mode in vRealize Orchestrator

 

Once vRealize Orchestrator client has been successfully launched, you need to switch to Design mode:

  1. Click on the dropdown list and select Design

 

 

Exploring vRealize Orchestrator workflow

 

You know from the previous challenge that the workflow does not work properly, so you need to investigate what went wrong:

  1. Expand the HOL-1906-04 folder
  2. Expand Create a snapshot
  3. Click on the latest workflow execution to view its details
  4. Click on the Logs tab to show the error log of the workflow execution

 

 

Corrective Action

For this challenge:

This scenario happens frequently. You're developing a workflow and it fails. You have to troubleshoot to identify what went wrong with the workflow so you can correct it.

In this challenge, the workflow needs to be fixed so that a snapshot will be taken for the virtual machine after the machine has been provisioned in vRealize Automation.

 

 

Investigate with Log Insight

 

Launch a new browser tab, and click vRealize Log Insight on the Favorites bar to open Log Insight.

Log in with credentials:

 

 

View the workflow in Log Insight

 

As we've seen with previous troubleshooting, we can start to investigate the logs using Log Insight.

  1. Click on VMware - vRA 7.3
  2. Navigate to the vRA - Catalog Requests content pack dashboards.
  3. For this example, I had to create a custom time frame, changing the Latest 5 minutes of data to the Latest Hour of Data.
  4. We can see our Request (#21) that we made from the last lesson. (Your request number may differ from this example. If you made note of the request number from the last challenge, this number should match.)

 

 

Catalog Requests with Context per user

 

  1. Click the blue bar, and select Interactive Analytics.

 

 

Fetch the Context ID

 

  1. In the log entry of the Interactive Analytics we want to locate the context ID string for the request. It is represented by the field: context=.
    Highlight and copy this unique eight character string.
  2. Click on Dashboards located at the top of the screen (not visible in this screen grab).

 

 

Filter the Search using the Context ID

 

  1. Paste the Context ID String in the Context field.
  2. Click Refresh.

This will isolate all logs for this dashboard to this specific provision request.

 

 

vRA - Event Broker Dashboard

 

  1. Because the problem we are troubleshooting involves a workflow, we need to gather the workflow ID.
  2. Select the vRA - Event Broker content dashboard.

 

 

vRO Workflow runs over time

 

  1. Scroll down to the vRO workflow runs over time widget.
  2. Select the failed workflow and click on the Interactive Analytics.

 

 

Interactive Analytics

 

This dashboard view will show each workflow, which can display the results of whether it completed or failed.

  1. Locate the entry for the Create a snapshot workflow.

 

 

Fetch the Workflow ID

 

  1. Find the workflow token. It is listed as wfid= followed by a random character string. Copy this string.
  2. Navigate back to Dashboards > vRA - Catalog Requests.

Note: This workflow token ID will help us identify the details pertaining to our failed workflow attempt.

 

 

Return to the Catalog Requests Dashboard

 

  1. Find the Queries to use by Context String
  2. Locate the query called Count by vRA Component of events for Context string and select it.
  3. This will open the Interactive Analytics.

 

 

Filter the Interactive Analytics with the Workflow ID

 

  1. In the filters list, Add Filter.
  2. In the name, enter wfid.
  3. Select contains
  4. In the value field, paste the workflow token ID you just copied.
  5. Click the magnifying glass to search.

 

 

Event Results

 

The results that will be returned are the log details from the workflow token ID. From reviewing these logs, we can see that the variable attribute vcVM is empty. This tells us that we may have a variable that is not being passed properly.

 

 

Solution

 

In this particular challenge, it seems that when we are getting the virtual machine object from vRealize Automation using a scriptable task, we failed to pass this object to the next workflow task, which requires an input type of VC:VirtualMachine in order to create a snapshot.

 

 

Use the vRO Workflow Designer to edit the Create a Snapshot workflow

 

To solve this challenge:

  1. Login to vRealize Orchestrator as administrator@corp.local (not visible).
  2. Switch to Design Mode
  3. Navigate to Orchestrator -> HOL-1906-04 -> Create a snapshot
  4. Edit the workflow by clicking the pencil icon.

 

 

Browse the Schema

 

  1. Click on Schema
  2. Click on the Scriptable task
  3. Click on Visual Binding

 

 

Visual Binding Details

 

As we can see in the Visual Binding, the vcVM variable is not mapped out to the Out Attributes. If it were, the dashed line would show a solid connection representing the mapped attributes.

  1. Drag vcVM from Scriptable task to vcVM of Out Attributes (see above)
  2. Click Save and Close

 

 

Good Coding Practice

 

  1. Click Increase Version

You may now login as devuser to request for a new virtual machine and the workflow should now be able to take a proper snapshot once the machine have been provisioned.

You might think about workflow version history similar to a VM's snapshots. Once you take it, you can use it to revert your workflow to a previous, and hopefully a working, version of it. It also allows you to compare the differences between versions.

Further reading on good coding practice can be found here.

 

 

Congratulations!

You have successfully completed all challenges within the vRealize Automation Challenge Lab.

Thank you for participating in the VMware Hands-on Labs.

Be sure to visit http://hol.vmware.com/ to continue your lab experience online.
Lab SKU: HOL-1906-04-CHG

 

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.

Lab SKU: HOL-1906-04-CHG

Version: 20181104-123201