Preparing for a vVol VMware Cloud Foundation Workload Domain with PowerShell

The recent release of VMware Cloud Foundation (version 4.1) added support for Virtual Volumes as a principle storage option via either iSCSI or Fibre Channel. See some more information on that here:

vVols, please report to the Principal’s Office! VCF 4.1 and vVols!

When you deploy a new workload domain in VCF, a new vCenter gets deployed and along with that a new cluster with hosts, and all of the various related pieces (NSX etc.). Before you can deploy a WD, you must have of course hosts–and ESXi needs to be installed on these hosts. Depending on what storage option you choose, there are a few requirements for these hosts besides just having ESXi.

All hosts must have at least two physical NICs, and have SSH enabled.

For FC with VMFS:

  • One VMFS datastore must be created and provisioned to all hosts

For FC with vVols:

  • Register the VASA provider with SDDC Manager
  • Present one protocol endpoint to all hosts

For iSCSI with vVols:

  • Register the VASA provider with SDDC Manager
  • Present one protocol endpoint to all hosts
  • Enable iSCSI adapter
  • Add array target iSCSI IQNs to all of the desired hosts.

So you can manually do all of this, we have it documented below:

How To: VMware Cloud Foundation with VMFS on FC as Principal Storage

How To: Deploy VCF Workload Domains with vVols and iSCSI as Principal Storage

How To: Deploy VCF Workload Domains with vVols and FC as Principal Storage 

But how do you automate it? Well PowerShell is a great option and I have made it easier for Pure Storage customers. First off, there is a VCF PowerShell module called PowerVCF:

https://github.com/PowerVCF/PowerVCF

We also have a Pure/VMware module:

https://github.com/PureStorage-OpenConnect/PureStorage.FlashArray.VMware/

In the Pure module, there is a new sub-module called PureStorage.FlashArray.VMware.VCF that uses PowerVCF to automate all of this in a Pure/VCF environment. So install both PowerVCF and PureStorage.FlashArray.VMware via Install-Module in PowerShell. The links above give more detail on installation.

In the VCF module we offer three new cmdlets:

Initialize-PfaVcfVasaProvider

This does basically everything. For a demo, check it out:

Use Get-Help for details and examples:

This does a few things depending on what you enter:

For FC with VMFS:

  1. Connects to each ESXi host directly
  2. Enables SSH
  3. Gets the FC WWNs and create a FlashArray host object for each ESXi server if not already there–if a host is already there it is skipped
  4. Creates a host group and adds all of the specified hosts to it
  5. Creates a volume and connects it to the host group
  6. Rescans the hosts and creates a VMFS on it
  7. Validates the host configurations with SDDC Manager
  8. Commissions the hosts with SDDC Manager

For FC with vVols:

  1. Connects to each ESXi host directly
  2. Enables SSH
  3. Gets the FC WWNs and create a FlashArray host object for each ESXi server if not already there–if a host is already there it is skipped
  4. Creates a host group and adds all of the specified hosts to it
  5. Creates a protocol endpoint and connects it to the host group
  6. Rescans the hosts
  7. Validates the host configurations with SDDC Manager
  8. Commissions the hosts with SDDC Manager

For iSCSI with vVols:

  1. Connects to each ESXi host directly
  2. Enables SSH
  3. Enables the iSCSI adapter (if not done already)
  4. Adds the FlashArray IQN targets to the adapter and configures our iSCSI best practices
  5. Gets the iSCSI IQN and creates a FlashArray host object for each ESXi server if not already there–if a host is already there it is skipped
  6. Creates a host group and adds all of the specified hosts to it
  7. Creates a protocol endpoint and connects it to the host group
  8. Rescans the hosts
  9. Validates the host configurations with SDDC Manager
  10. Commissions the hosts with SDDC Manager

The cmdlet takes in a few things.

For VMFS:

  1. Host FQDNs. Pass in a list of host FQDNs that have ESXi installed
  2. Host credential: Pass in a username/password that is valid for those hosts
  3. FlashArray FQDN. Pass in the FQDN of the desired FlashArray for the VMFS
  4. FlashArray credentials (storage admin or higher)
  5. Datastore Name: Choose a name for the VMFS
  6. Datastore size: In GB or TB.
  7. Network pool: SDDC manager must know what network pool to use to assign vMotion addresses. The cmdlet will validate your input is a valid pool and has the right IP Pool type.

For vVols:

  1. Host FQDNs. Pass in a list of host FQDNs that have ESXi installed
  2. Host credential: Pass in a username/password that is valid for those hosts
  3. FlashArray FQDN. Pass in the FQDN of the desired FlashArray for vVols
  4. FlashArray credentials (storage admin or higher)
  5. Network pool: SDDC manager must know what network pool to use to assign vMotion addresses. If iSCSI, the network pool must have both a vMotion IP Pool and an iSCSI pool. The cmdlet will validate your input is a valid pool and has the right IP Pool types (iSCSI and vMotion).
  6. [Optional] Protocol: iSCSI or FC. If your array only has one protocol you do not need to pass this in. If it has more than one, you will need to specify one or the other.

Get-PfaVcfVasaProvider

This cmdlet returns all registered VASA providers in SDDC Manager. In SDDC Manager, under Administration > Storage Settings you can see the available VASA Providers:

To retrieve this in PowerShell, first connect to SDDC Manager with Request-VCFToken, then run the cmdlet:

Request-VCFToken -fqdn vcsa-sddc-1.puretec.purestorage.com -username [email protected] -password ***********
Get-PfaVcfVasaProvider

New-PfaVcfVasaProvider

The next cmdlet allows you to add a new VASA provider like provided in the GUI:

So connect to SDDC Manager (if you haven’t already) and run New-PfaVcfVasaProvider:

Request-VCFToken -fqdn vcsa-sddc-1.puretec.purestorage.com -username [email protected] -password ********
New-PfaVcfVasaProvider -ArrayAddress sn1-x70-b10-21.puretec.purestorage.com -ArrayCredential (get-credential)

The cmdlet will return the registration information. You can of course use Get-PfaVcfVasaProvider to retrieve it or see it in the SDDC Manager UI:

2 Replies to “Preparing for a vVol VMware Cloud Foundation Workload Domain with PowerShell”

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.