In my previous post, I introduced the new PowerCLI 6.0 R1 release as it relates to VMware vCloud® Air™, and how PowerCLI champions and vCloud Air customers can both benefit from this release.
At a high level, we introduced the two modules (Cloud and PCloud) that comprise the vCloud Air integration, allowing you to manage vCloud Air from the same console and with the same PowerShell knowledge that you would use to manage your vSphere environment.
As alluded to in Part 1, core VM services is one of the many services that vCloud Air provides and will provide going forward.
vCloud Air delivers VM services in the context of virtual data centers and uses vCloud Director to deliver that capability.
vCloud Director isn’t exclusive to vCloud Air. There are many Enterprise customers that have used vCloud Director to build their private clouds. Also, hundreds of Service Providers that are part of the vCloud Air Network are using vCloud Director to deliver their own IaaS public clouds.
All of these vCloud Director end-points are supported by the PowerCLI 6.0 R1 VMware.VimAutomation.Cloud module and cmdlets included in this module.
In other words, you can use the Connect-CIServer cmdlet to connect to either a private cloud, a generic vCloud Director based public cloud or vCloud Air.
It is also important to notice that the Cloud module includes both cloud administrator and cloud tenant cmdlets, so depending on what you are connecting to, you may be limited to how you login into the end-point and what cmdlets you can use.
Specifically for vCloud Air (and vCloud Air Network), customers can only use the “tenant” related cmdlets since customers do not have cloud admin rights for these vCloud Director based clouds.
The PCloud module, on the other hand, is specific to vCloud Air. It is a “virtual data center locator helper,” so to speak.
vCloud Air is a global cloud service with data centers available in many countries and regions. This technically translates into many different and otherwise standalone vCloud Director instances.
Now imagine you have vCloud Air resources available that are scattered in different regions. How do you know where to login with the Connect-CIServer cmdlet? Enter the PCloud module.
The PCloud module currently has a very limited amount of cmdlets. You can find them out by typing:
C:\PowerCLI> Get-Command -Module VMware.VimAutomation.PCloud
These are the cmdlets available:
CommandType Name ModuleName
———– —- ———-
Cmdlet Connect-PIServer VMware.VimAutomation.PCloud
Cmdlet Disconnect-PIServer VMware.VimAutomation.PCloud
Cmdlet Get-PIDatacenter VMware.VimAutomation.PCloud
As you can see the only meaningful cmdlet, other than those used to connect and disconnect to and from vCloud Air, is the one that enumerates the virtual data centers you have subscribed to.
It is like asking vCloud Air: “Can you please enumerate all of the virtual data centers I have available around the world so that I can connect to them with the standard CIS cmdlets?”
This is exactly what the command we used in post 1 does:
PowerCLI C:\PowerCLI> Get-PIDatacenter M598* | Connect-CIServer
This means “enumerate all virtual data centers that start with M598 and connect to them.”
At this point you have all the richness of the Cloud module at your fingertips. You can use all the (tenant related) cmdlets to consume your virtual data centers.
You can get a list of all cmdlets available by running:
C:\PowerCLI> Get-Command -Module VMware.VimAutomation.Cloud
We are working on documenting in more detail which cmdlets are available to only vCloud Director cloud admins and which cmdlets are available to all users, including vCloud Air and vCloud Air Network customers.
When running the command above you may have noticed that there are a lot of “PI” aliases that have been created to map corresponding “CI” cmdlets. The reason for those aliases is straightforward.
If you are an advanced user and understand the technical discussion above, you will have no problem jumping from one module (and context) to the other. Actually, knowing where the hands off are opens up a lot of interesting advanced use cases (e.g. my PowerCLI script can work unmodified against my private cloud, vCloud Air and/or a vCloud Air Network cloud).
On the other hand, you may just want to have an experience that is a natural continuum when consuming vCloud Air – from the Connect-PIServer all the way to the Get-PIVM– which happens to be an alias of Get-CIVM.
This way you only have one set of cmdlets (“PI”) that allow you to consume vCloud Air from the login all the way to VM management.
In the next chapter we are going to discuss the nuances of vCloud Air OnDemand and vCloud Air subscriptions when consumed in the context of PowerCLI.
For more information about VMware vCloud Air, visit vcloud.vmware.com, and keep an eye on the blog for upcoming tips and best practices for using vCloud Air