Category Archives: vCOps

Working with maintenance mode in vROPs via PowerCLI

A while back I was contacted by someone who knew that PowerCLI now worked with vRealize Operations (vROPS) and knew it covered the entire API but was unsure how to get to the point where they could achieve what they wanted.

Before I go into what they were doing I highly recommend that if you are interested in learning what is available via VROPs and PowerCLI you check out the following awesome posts by John Dias

And specifically check out this post which tells you the more advanced feature of being able to access the entire API and create your own functions.

So, the story around this script was that this person was heavily using vROPs in their environment to monitor and troubleshoot their VMware infrastructure, they had it highly tuned but also used PowerCLI to automate some maintenance and updates of the infrastructure, the problem was that every time they performed these tasks they would get automated alerts from vROPs to tell them that things were down or not behaving correctly.

This while expected was clearly a pain as we all know that unwanted email from a monitoring system can get tedious and eventually ignored to the detriment of something important being missed.

Continue reading

PowerCLI 6.0 R2 – The most advanced version VMware has ever made

imageThis week VMware released a new version of PowerCLI and this release is the most advanced version ever made.  As the Product Manager for PowerCLI I am particularly proud of this release as we not only add core functionality to the vSphere cmdlets allowing access to report, manage and automate even more of the core infrastructure but yet again we introduce a number of new features allowing PowerCLI to reach even further into the SDDC and automate and integrate more products.

I always like to ask people what they want to see from PowerCLI next and for a long time now people have been talking to me about vROPs and telling me their use cases of being able to use the rich dataset and analytics provided by vROPs to make decisions and take further action with PowerCLI, something as simple as monitoring a web server to know when it is under duress and provision many more based on these statics all the way to being able to take action on storage systems by monitoring the workload over time.  The use cases are endless and now achievable by the latest version of PowerCLI.  More on this to come in a future post but lets just say I am excited to see what the awesome PowerCLI community does here.

There is so much to talk about in this release, I wanted to give you an overview in this post and then dive deeper into some of the key features in the future.

What’s New?

More Module Enhancements

The community made it clear that we had to move to modules, and whilst we are still getting there, in this release we made even more module enhancements, both to the core distribution model of PowerCLI cmdlets and also converting more of our code base from snapins to modules. In this version the License snap-in has been converted to a PowerShell module. In the new release the PowerCLI Modules have also been moved to the System PSModulePath allowing all users of a machine to access them once installed.

vROPS Support

As briefly mentioned above, a new module and cmdlets have been added to this release to allow access to vRealize Operations, access to the entire public API is available from the $global:DefaultOMServers variable using the ExtensionData property and full cmdlets have been included for the most used features, this gives us a good mix of fully functional easy to use cmdlets and yet the access for advanced users to be able to access the entire API through the ExtensionData property to create their own functions to expose anything to automate vROPs.  The following cmdlets were added for using with vROPs:

  • Connection: Connect-OMServer , Disconnect-OMServer
  • Alerts: Get-OMAlert, Get-OMAlertDefinition, Get-OMAlertSubType, Get-OMAlertType, Set-OMAlert
  • Recommendations: Get-OMRecommendation
  • Resources: Get-OMResource
  • Statistics: Get-OMStat, Get-OMStatKey
  • User Management: Get-OMUser

Update Manager

PowerCLI for Update Manager has always been available as a separate downloadable installer but it was hard to work with, you needed to work out which version of Update Manager you had installed on the server and install the exact version of PowerCLI cmdlets to work with it, this was obviously a pain when using multiple versions of vCenter or when trying to manage them from one machine.  In this version PowerCLI for vSphere Update Manager is no longer a separate downloadable component or installer and is now included in the core PowerCLI installer, it is selected by default during the PowerCLI install wizard which allows for simpler and quicker deployment and management of VMware products through PowerCLI. Enhancements have also been made to ensure a better backwards compatibility experience of this module and now supports versions of vSphere Update Manager all they back to 5.5.

vCloud Air

In the previous release we introduced PowerCLI for vCloud Air, allowing you to connect to your dedicated resources you have purchased and transfer your automation skillset into the cloud.  In this release you can now also connect to and manage vCloud Air On-Demand (vCA) instances with the –VCA parameter added to the Connect-PIServer and the new Get-PIComputeInstance cmdlet to list all available compute instances. Existing cmdlets for managing vCloud Director and vCloud Air can be used to work with vCloud Air On-Demand where applicable. Additional to these enhancements a new cmdlet has been added to make it easier and enhance the ability to work with OrgVDC Networks called Get-OrgVdcNetwork.

ESXi Host Hardware

This feature was asked for in the PowerCLI Communities, this is just one of the places we monitor to work out what our future releases look like.  New cmdlets have been added to work with ESXi host hardware, these cmdlets give the ability to interrogate your ESXi hosts and provide core system and hardware information.

Two new cmdlets have been added to work with this area:

  • Get-VMHostHardware lists host information
  • Get-VMHostPCIDevice lists all PCI Devices

Storage

Over the last number of releases we keep making enhancements to the storage cmdlets, with VSAN, IO Filters and now a number of enhancements have been made to the storage module introducing new cmdlets for working with VMware vSphere® API for Storage Awareness (VASA), NFS 4.1 and updated vSphere API for IO Filtering (VAIO) cmdlets.

The following new additional cmdlets are now available:

  • New VASA Cmdlets : New-VasaProvider, Remove-VasaProvider, Get-VasaProvider and Get-VasaStorageArray
  • New NFS Cmdlets: New-NfsUser, Remove-NfsUser, Get-NfsUser and Set-NfsUser
  • Added VAIO filters Cmdlet: Set-VAIOFilter

A pet peeve of mine and others

In previous versions of PowerCLI when you started the interactive shell it would always start PowerCLI in the directory where we installed the components, as I watched people use PowerCLI I would see them run a CD\ to get back to the root of the C: or they would use it from the install directory and often their commands would line wrap making it slightly harder to read, a small but hugely beneficial change was made in this release, the PowerCLI starting directory has now been changed from the full install path of PowerCLI to the root of the installation drive.

Business as usual

As usual updates have been made for PowerCLI to support the latest versions of the software it works with, in this case Site Recovery Manager (SRM) was updated to 6.1 and additional functionality has been added to discover SRM servers when they are deployed in a “shared recovery model” and support has been added for the vCloud Director 8.0 features which are provided by the backwards compatibility agreement of the VCD API.  All this and many more bug fixes and speed enhancements.

What an awesome release!

Installing vCloud Adapter for vCenter Operations Manager

I had to go through the installation of the vCloud Adapter into vCenter Operations Manager today and although the steps are in the doc I couldn’t get it to work, I ended up following Kendrick Coleman’s post here, although this worked I was later informed there was a much easier way to do this.

Randy Keener who works for DevOps at VMware showed me how to do it the correct (and easier) way, as I was going through this again so I thought I would take some screen shots to make things easier for anyone else who is unable to follow documentation like me !

What’s needed

  • vCloud Director 1.5.0 or later
  • vCloud Director administrator account credentials of the System organization
  • vCloud Adapter – Download the adapter installation TGZ file anonymously from ftp://ftp.integrien.com/

 

Installing the adapter

Go to the vCOps admin page:  http://vcopsip/admin and go to the update tab

TinyGrab Screen Shot 13-08-2012 16.35.43

Click the browse button and navigate to the folder where you have extracted the adapter files from the original TGZ, select the .pak file.

TinyGrab Screen Shot 13-08-2012 16.36.12

Click the Update button and click OK to confirm the update

TinyGrab Screen Shot 13-08-2012 16.36.33

The adapter file will be uploaded to your vCOps setup.

TinyGrab Screen Shot 13-08-2012 16.36.43

Read (yeah ok then) and accept the EULA and click OK.

TinyGrab Screen Shot 13-08-2012 16.37.24

Confirm the update by clicking OK.

TinyGrab Screen Shot 13-08-2012 16.37.35

The installation will begin…

TinyGrab Screen Shot 13-08-2012 16.37.54

Once completed you will see the update status on the screen.

TinyGrab Screen Shot 13-08-2012 16.41.56

Now go to the custom web page: https://vcopsip/vcops-custom/

TinyGrab Screen Shot 13-08-2012 16.42.37

Once logged in click the Admin menu and then support

Screen Shot 2012-08-13 at 16.47.33

You will be presented with the Support page

TinyGrab Screen Shot 13-08-2012 16.48.53

Click the Info tab and press the smallest button in the world, I missed this button so many times !

image

Click yes to start the describe process.

TinyGrab Screen Shot 13-08-2012 16.49.47

A confirmation box will appear.

TinyGrab Screen Shot 13-08-2012 16.49.55

After a couple of seconds you should see our adapter in the list of adapters available.

image

 

Configuring the adapter

You should now be able to follow along with the vCOps adapter PDF which was part of the TGZ file from page 17, setting up the adapter is fairly straight forward.

Creating a custom Dashboard

As the installation doesn’t create any dashboards for you I highly recommend visiting Clint’s site and reading his great post which shows how to setup a custom Dashboard here: http://velemental.com/2012/04/12/tutorial-building-custom-dashboards-in-vcops/