Home > Blogs > VMware PowerCLI Blog


What’s New for the VMware Cloud on AWS Module

PowerCLI’s 11.5 was a big release for several reasons. One of those reasons is due to the introduction of some new cmdlets for use with the VMware Cloud on AWS service! These cmdlets are all high-level, which allows us to interact with our SDDCs in a much easier fashion than before.

The new cmdlets in the VMC module are:

  • Get-VmcSddc
  • Set-VmcSddc
  • New-VmcSddc
  • Remove-VmcSddc
  • Add-VmcSddcHost
  • Remove-VmcSddcHost
  • Get-AwsAccount
  • Get-AwsVpcSubnet

Let’s walk through how to use these within your own VMware Cloud on AWS Organization, as we manage each part of an SDDC’s lifecycle.

Creating New 1 Host SDDC

The first cmdlet we’ll walkthrough using is the one which creates a new SDDC, New-VmcSddc. This cmdlet requires fairly minimal information such as SDDC name, AWS region, and how many hosts the SDDC should have. We also have the ability to specify the management subnet CIDR as a parameter too, but that parameter is optional.

One big item of note, at the time of the PowerCLI 11.5 release, it can only provision one host SDDCs without an AWS account being linked. We do plan to improve the cmdlet in a future release to support all SDDC deployment configurations.

Here’s an example of creating a VMware Cloud on AWS single host SDDC where we don’t link an AWS account:

Example: Creating a new 1-host SDDC

Creating New 3-Host SDDC

We can also create a standard, 3 host or larger, SDDC which requires an AWS account be linked. There are two new cmdlets which simplifies this process from more than 10 lines of code down to 2 lines.

The first thing we’ll need to obtain, the AWS account we’ll be using. That information can be found with the following command:

Example: listing out an AWS account

We’ll store that output in a variable and move on to the next step, which is to pick out our desired AWS VPC Subnet. We can use a single cmdlet to do this, however we will need to reference the AWS Account and which region the VPC should reside.

We can find the available VPC subnets with the following command:

Example: List available AWS VPC subnets

At this point, we have all the information needed to create our SDDC. With some minimal updates to the command from the previous section, we can create a new 3 host SDDC, have it linked to our AWS account, and using our requested VPC subnet with the following code:

Example: New SDDC - 3 Hosts

Viewing SDDC Information

We’ve created two SDDCs in the prior sections, now it’s time to find out what information about each of these SDDCs are available. The Get-VmcSddc cmdlet will turn several lines of API interaction into a single line.

We can find out some basic information about our newly created SDDCs with the following command:

Example: List SDDCs

The above shows some great high-level information. However, if you’ve seen the API response, there’s a lot more information available to us. We can find some additional information about a particular SDDC by piping that command to Format-List. An example:

Example: Detailed SDDC View

The above examples shows some important information, such as AWS region, how many hosts the SDDC has, what version the SDDC is on, and even the URL to reach the vCenter server. One thing you may notice is missing though, ExtensionData! This property, and all the information it provides us, is something that is not available at this point in time. We hope to add it in a future release.

In the meantime, you can take the information provided here and simplify the process to retrieve the rest of the properties which make up the SDDC object from the API level. An example to do that is as follows:

Example: Retrieving all the SDDC information from the API

Host Capacity Management

One of the amazing parts about a service such as VMware Cloud on AWS is that we can add and remove ESXi hosts to our SDDC in a matter of minutes! We now have two cmdlets to make the management of our ESXi hosts as simple as a one-liner.

We can add a single new host to our SDDC with the following command:

Example: Add a new host to the SDDC

Similarly, we can also remove a single host from our SDDC with the following command:

Example: Removing a host from a SDDC

In the above examples you’ll also notice the flexibility to several different methods of input for each command, whether that be variables or even using a pipeline.

Removing SDDCs

Completing the lifecycle management of an SDDC is the removal of our created SDDC. Much like the prior create and retrieve cmdlets, we also have a cmdlet to delete an SDDC.

We can now remove our SDDC with the following command:

Example: Remove SDDC

More Updates

There are a couple other cmdlets worth discussing when it comes to using PowerCLI with VMware Cloud on AWS. One of the more popular requests was to rename an SDDC. This was recently enabled through the API and PowerCLI can also make this change in a high-level cmdlet.

We can update the name of our SDDC with the following command:

Example: Update the name of an SDDC

An existing cmdlet was also updated to help us out when it comes to retrieving, and even reporting, on tasks within our Organization. Get-Task now supports these VMC based tasks. If you’ve had a change to view the tasks for any given Organization, unlike vSphere tasks, they are available for quite a long time so the output could be unexpectedly longer than expected.

We can retrieve the tasks of our Organization with the following command:

Example: Retrieve tasks

Each of these tasks are objects, so we can take one of those tasks and expand the available properties with Format-List by using the following command:

Example: List additional properties of a task

Summary

The release of PowerCLI 11.5 added a ton of functionality when it comes to VMware Cloud on AWS. We can manage the entire lifecycle of an SDDC with high-level cmdlet. We can also pull task-based information from an existing cmdlet!

Update to the latest version of PowerCLI with the following command:
Example: Update to PowerCLI 11.5.0

Let us know in the comments what cmdlets we should be adding next!

This entry was posted in VMware Cloud on AWS and tagged , , , on by .
Kyle Ruddy

About Kyle Ruddy

Kyle Ruddy is a Senior Technical Marketing Architect working for VMware R&D in the Cloud Platform Business Unit. Kyle currently focuses on vSphere and VMware Cloud on AWS automation and the associated automation frameworks including all things API, CLI, and SDK. Kyle is also a Microsoft MVP and long-term vExpert whom can be found blogging on VMware blogs, http://blogs.vmware.com/vSphere and http://blogs.vmware.com/PowerCLI, and his personal blog, https://www.kmruddy.com. His Twitter: @kmruddy

One thought on “What’s New for the VMware Cloud on AWS Module

  1. mcafee.com/activate

    I am very thankfull to you for sharing this fantastic article , I appereciate your work .

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

*