Tag Archives: vro

Creating new vRA Workloads in a specific AD OU

This week, I’ve had several customers individually approach me with this question – how can they specify the OU which a Windows VM should land in when it’s created via vRA?

This is a great question and a very important operational task to accomplish – OU membership determines so much vital configuration for a Windows machine.

It seems like most of these customers have a tendency to assume they are going to create the VM first, and relocate it to a new OU later. But there’s a much more streamlined way to do it. By binding a workflow to the IaaS BuildingMachine lifecycle stage, you can pre-stage the computer object in AD before it’s even provisioned. That way, when it first adds to the domain it will already be present in the correct OU. This also has the added benefit of ensuring all group policies are inherited right away, rather than requiring additional reboots.

I’ve put together a quick example here that should help you see how to do just this.

To use the example workflow attached above, you must already have your vRO instance registered with vRA and the extensibility customizations installed. We also assume that you have correctly configured the Active Directory plugin, and that the example vRA blueprint you will deploy has a vSphere Customization Specification attached which adds the VM to your AD domain.

First, import the workflow into a vRO folder of your choosing.

Then, browse to it in the workflow tree and select it. On the General tab, you can see there are two Attributes that must be updated for your own envirionment. Enter the AD Domain Name as the value for domainName and select the parent OU you want new OUs to be created in  for ou1. You can see in my example, the domain is lab.virtualwin.org and the Parent OU is Lab Machines.

Configure_Workflow
(Click for larger image)

Next, use the Assign a state change workflow to a blueprint and its virtual machines workflow to attach the new workflow to the BuildingMachine stage of a test blueprint. This workflow is located under root > Library > vCloud Automation Center > Infrastructure Administration > Extensibility in the Workflow tree.

To do this, right-click the workflow and select Start Workflow.

Start_Workflow

Choose BuildingMachine as the stub to enable and choose your IaaS host. Remember that we are assuming your IaaS Plugin is already configured. If you don’t see any hosts in this list, you still need to do that! Click Next.

Select_Stub_and_vRA_Host

Now,  select the blueprint(s) you wish to add this workflow to. In this example the selected blueprint is “Add to OU Test” and click Next.

Select_Blueprints

On the last screen, you will be prompted to select the workflow and some final options. Choose the new workflow you just imported (in this example, it is Create OU and Stage Machine). Be sure to choose Yes for Add vCO workflow inputs as blueprint properties and then click Submit.

Add_vRO_Workflow_Inputs

The workflow will complete. Now, switch to your vRealize Automation console and edit the blueprint which you just attached the workflow to. Select the Properties tab. You will be presented with a list of properties, some of which need to be adjusted. The total list of properties you see may vary from environment to environment. Here, we need to delete the following 4 properties:

  • ExternalWFStubs.BuildingMachine.vCACHost
  • ExternalWFStubs.BuildingMachine.vCACVm
  • ExternalWFStubs.BuildingMachine.vCenterVm
  • ExternalWFStubs.BuildingMachine.virtualMachineEntity

And also edit the one named ExternalWFStubs.BuildingMachine.ouName so that Prompt User is checked.

Blueprint_Custom_Properties_Before

When you’re done, the properties should look more like this:

Blueprint_Custom_Properties_After

Now, let’s make that variable a little more friendly. Open the Property Dictionary from the menu on the left. Click on New Property Definition and fill in the data as follows:

  • Name: ExternalWFStubs.BuildingMachine.ouName
  • Display Name: Create New OU to host new VM
  • Control Type: Textbox
  • Required: Yes

Property_Dictionary

That’s it! Now, if you navigate to your vRA Catalog and request the blueprint you’ve been working on, you should see something similar to this.

Request_New_Item

Click Submit and wait for provisioning to complete. When you’re done, you will see the new machine in your Items tab as usual:

Deployed_Items

But if you check out your Active Directory, you should also see that the new OU you selected was created, and the new machine was created inside it!

AD_Properties

Now, this example workflow is a very quick demonstration of concept. It doesn’t have any error handling (and suffice it to say, should NOT be used in any production environments and is provided without support or warranty of any kind) – but it should show you how a seemingly complex  task like this can be accomplished relatively easily. The logic in the workflow could easily be amended to remove the OU creation step. ASD and vRO Dynamic Types could be leveraged to provide the user a list of OUs to choose from, rather than a free-form textbox. The sky’s the limit when it comes to vRA extensibility!

Today’s spicy orchestration experience was brought to you by the Habanero Mojito at Havana, Walnut Creek. Jon_Kate_Havana

I hope this post has been useful.

Creating new vRA Workloads in a specific AD OU

vRA Live! – Session 2 – Extensibility

Shameless plug here for an upcoming community event that @virtualjad over at www.virtualjad.com will be hosting later this month – vRA Live! – Session 2 – Extensibility

The vRA Live sessions are meant to provide a live and real-time demonstration of the power of vRealize Automation, combined with an expert panel (including yours truly) who will host open discussion and Q&A while the magic happens. They are a lot of fun and incredibly informative.

Be sure to register in advance over at Jad’s blog (http://www.virtualjad.com/2015/04/vra-live-session-2-extensibility.html) – and we’ll see you there!

#vralive

Extending vRealize Operations Actions with the vRealize Orchestrator Solution and Workflow Package

When vRealize Operations Management 6.0 was released, VMware increased the flexibility afforded to administrators by adding the concepts of symptoms, recommendations and actions to the product. As you might expect, symptoms are thresholds or characteristics that define when a problem may have occurred or additional guidance may be needed. Recommendations are a customizable way to define what that additional guidance might be – and actions allow you to automate and carry out that guidance.

Since then, one of the most frequent questions from my customers has been “When will we be able to use vRealize Orchestrator for these?”

I’m pleased to report that VMware has now enabled that capability via the vRealize Orchestrator Solution and Workflow Package for vRealize Operations. This package is available at the VMware Solution Exchange right now, and the purpose of this post is to guide you through the installation and configuration of it. The package adds many frequently-requested workflows, including:

  • Decommission a Host
  • Place a Host into Maintenance Mode
  • Perform a Power Off or Reboot on a Host
  • Manage VM or VM Group Snapshots
  • Migrate a VM or VM Group
  • Power Off, Power On or Reboot a VM or VM Group
  • Reconfigure a VM or VM Group (CPU and Memory settings)
  • Upgrade the VMware Tools for a VM or VM Group

Clicking the links above will bring you to the Solution Exchange portal where you can read more about and download the package. Click the blue “Try” button to initiate the download.

VSX_Download_vRealize_Orchestrator_Solution_and_Workflows_for_vRealize_Operations

Once you have downloaded and extracted the ZIP file, it’s time to start the installation. The first thing you’ll want to do is ensure that both your vRealize Orchestrator and vRealize Operations Manager are registered to the same vCenter instance. This can be done by comparing the data shown in the two screenshots below.

Validate_vRealize_Operations_vCenter_Connection

Validate _vRealize_Orchestrator_vCenter_Connection

As you can see above, both systems are taking to the same vCenter. We’re ready to begin!

First, you will need to import the Workflow package into your vRealize Orchestrator instance. Start by logging in to the Orchestrator Client.

Log_Into_vRealize_Orchestrator

Ensure that your client view is set to Administer

Switch_to_Administrator_View

Then, click on the Import Package button in the upper left of the right-hand panel.

Import_vRealize_Orchestrator_Package

Select the Remediation Actions Package (default filename is com.vmware.vrops.remediationactionsall-v15.package) and select Open

Select_Package_to_Import

You will be prompted to verify the software signature. Continue by selecting Import

Accept_Package_Signature

vRealize Orchestrator will then present you with a list of all of the new and changed elements that this package import will affect. No changes here are necessary, simply continue by clicking Import Selected Elements

Import_vRealize_Orchestrator_Package_Elements

Once the import completes, you will be able to view the new workflows. Click the Workflows tab to verify that there’s a whole bunch of new vRealize Operations Manager goodness present.

View_Imported_Workflows

You can also verify that the new workflows are present by switching back to the Run view, clicking the Workflows tab and expanding the new vRealize Operations Manager folder. You can see I already have a ton of great workflows by my friends Eric at Cloud Relevant and Sid at Daily Hypervisor in here.

Switch_to_Run_View_and_View_New_Workflows

That’s it for the vRealize Orchestrator side of things. Now you will need to switch over to your vRealize Operations Manager portal. Log in as a user with appropriate rights to add/update solutions. An admin user will work nicely.

Click on the Administration button, followed by the Solutions section. Then, click the Green + to add a new solution.

Import_New_vRealize_Operations_Solution

Select the solution file using the Browse button and click Upload. Once the upload completes and the PAK file has been verified, click Next to proceed with the installation.

Select_Solution_PAK

Accept the EULA and click Next again. Wait for the installation to complete, then select Finish

Complete_Solution_Installation

You can now verify that your new solution is installed by locating the vRealize Orchestrator Actions Adapter in the solutions list. Note that you may have to scroll down to find it, if you have several solutions installed. You may also notice that the adapter instance is not yet configured. Let’s tackle that next!

Verify_New_Solution_is_Installed

To configure the adapter instance, ensure that the vRealize Orchestrator Actions Adapter is still selected, then click the Gears icon at the top, next to the Green + we clicked a few steps back.

Give your new adapter a name, and enter the IP or hostname of your vRealize Orchestrator instance. Be sure to use the same Orchestrator instance as we verified at the beginning of this process. Click the Green + to add credentials for the instance.

Configure_New_vRealize_Operations_Solution

Enter your credentials and click OK

Add_New_Credential

Next, click Test Connection. You may be presented with a certificate warning – click OK if you trust the certificate, and then your test should be successful!

Accept_vRealize_Orchestrator_Certificate

Solution_Test_Successful

Save your new adapter by clicking Save Settings and finally Close the configuration dialog.

That’s it for the installation! You can verify that the new actions are present by clicking on the Content tab inside vRealize Operations and selecting Actions from the list on the left. If all went well, you should see the 8 new actions present. These can now be combined with symptoms and recommendations to unlock many new possibilities for remediation inside your environment.

View_New_Available_Actions
(Click for larger image)

Since it’s not even 9am yet, today’s post will be brought to you by the Zesty Bacon Bloody Mary from the Boon Fly Cafe in Napa, CA. This exceptional libation combines top-shelf Vodka with Boon Fly’s own special spice blend, a celery salt rim and a massive slab of applewood smoked bacon to top it all off. Paired with Boon Fly’s fresh made donuts, it’s the best breakfast in the valley. Bloody Marys also have the (dubious?) honor of being the drink that’s OK to have first thing in the morning. After all, you’re not an alcoholic, you’re just a little tired.

Bacon_Bloody_Mary_Boon_Fly_Cafe

I hope this guide has proved useful and that you have a chance to head out to Boon Fly and try their delicious concoctions.