Skip to main content
Pure Technical Services

Storage Management | Azure VMware Solution and Pure CBS

Currently viewing public documentation. Please login to access the full scope of documentation.

Azure Run Command Storage Management Overview

AVS is a fully-managed VMware service provided by Azure to its customers.  AVS users are given access to the cloudadmin@vsphere.local account which has sufficient privileges for general vCenter and virtual machine daily operations management.  This login does not include some of the broader administrative rights.  To account for this, AVS uses a framework called Run Command to allow end-users to run certain administrative actions against their AVS cluster.  At its core, Run Command is a collection of PowerShell cmdlets which is how we will accomplish initial AVS cluster configuration to use iSCSI, enable AVS host management, create and attach CBS volumes and manage CBS datastore operations within the AVS cluster or AVS clusters.

The remainder of the article provides detailed descriptions and examples of the various Run Commands operations available for AVS and CBS.  

Please see the following article on how to deploy and setup Run Commands for use with AVS and CBS.  The steps outlined in the linked article need to be completed before storage can be provisioned to AVS via CBS.

Optional and Useful PowerShell Commands

With the framework to manage AVS in place, we move to initializing AVS for connectivity to CBS and provisioning and connecting storage to it via Cloud Block Store.  At this step we assume that there is an active PowerShell session in either the Pure Storage OVA or the Azure VM.  Upon logging into the Pure Storage VMware Cloud Manager, the integration can be launched by entering the purepwsh command.

A connection to CBS can be optionally established as a variable during each unique PowerShell session to execute joint AVS and CBS commands.  These sessions may optionally be created prior to running any of specific setup and management commands as shown in the below examples, so you do not need to continually login to CBS for execution.

The first command shown below, Set-PowerCLIConfiguration can optionally be used to Ignore SSL if it is not a requirement or in use for your AVS instance.  Next, we show an example of how a CBS session can be set as a variable.

#Optionally ignore certificates
PS > Set-PowerCLIConfiguration -InvalidCertificateAction:Ignore 

#Establish Connection to Pure CBS
PS > $CBSConnection = Connect-Pfa2Array -Endpoint "yourCBSControllerIPAddress" -Credential (Get-Credential) -IgnoreCertificateError
PowerShell credential request
Enter your credentials.
User: pureuser
Password for user pureuser: ********

Initializing AVS and CBS iSCSI Connectivity

The following command needs to be run to initialize your AVS cluster for use with Cloud Block Store.  Note that it must be run against each individual cluster inside of a given Azure VMware Solution item.  So for example, if you have an AVS instance that contains 2 unique clusters, you need to run the following command two times (once for each cluster), specifying the cluster you want to execute against.  

Build-PCBSCluser enables the software iSCSi adapter on the AVS cluster hosts, applies Pure Storage best practices, adds a host object and its unique iSCSI IQN to Cloud Block Store and lastly creates a host group comprised of the AVS ESXi hosts in a given cluster.  The command can be re-run against a cluster to account for any host changes or updates as well.

Note that some command arguments shown below, such as -ClusterName are case-sensitive.

The table below provides more detailed information about each PowerShell command, as well as other scenarios for their usage.

Function Name

Function Action

Invoked when

Example

Build-PCBSCluster

  • Enable SW iSCSI on AVS ESXi hosts. 

  • Apply Pure Storage iSCSI best practices.  

  • Create host objects with IQNs on CBS. 

  • Create host group with host objects on CBS.

  • New AVS instance created.

  • New ESXi host added or removed to existing AVS cluster.

  • New cluster added to existing AVS instance.

Sample command with Minimum Required Arguments:

Build-PCBSCluster -ClusterName "myCluster" -AVSCloudName "myAVSCloudName" -AVSResourceGroup "myAVSResourceGroup"

Additional Optional Arguments:

-PureCloudBlockStoreConnection $CBSConnection

If you have multiple CBS connections in your PowerShell session you may pass this variable to select the CBS connection you want to use.

-AzureSubscriptionID "myAzureSubscriptionID"

If left out, this command will use the default/active Azure Subscription ID.  If you wish to specify a specific Azure subscription, use this parameter.

AVS Host Lifecycle Management

An important component of any AVS deployment centers around ESXi host lifecycle management.  A given AVS host will be replaced automatically if it encounters a hardware failure or undergoes a planned ESXi version upgrade.  Furthermore, AVS administrators have the ability to scale up or scale down an existing AVS cluster or create a net new AVS cluster inside of an existing AVS instance.  Once the AVS host population is updated for whatever reason, the Build-PCBSCluster command needs to be executed against the cluster so that the software iSCSI adapter can be enabled and CBS array can be updated with the appropriate host IQNs. 


AVS host lifecycle management can be completely automated by leveraging the Deploy-PCBSMonitor PowerShell function.  This function utilizes native Azure components to poll a specific AVS cluster (or a set of clusters inside of the same AVS instance) and when it detects a host-level change, it will automatically kick off the Build-PCBSCluster command to update AVS and CBS to the latest configuration.  This command will create a new Azure Resource Group and populate it with the various components shown in the below screenshot. 

Note that some command arguments shown below, such as -ClusterName are case-sensitive.

Function Name Function Action Invoked When Example
Deploy-PCBSAVSMonitor This function deploys a new Azure Resource Group that contains all of the components needed to poll an AVS instance for automated AVS host lifecycle management.

This is deployed once per AVS instance.  It will poll for updates to any AVS cluster inside of the AVS instance so long as the cluster has had the build-pcbscluster command executed against it.

 

Deploy-PCBSAVSMonitor -AVSCloudName "my-avs" -AVSResourceGroup "avs-resourcegroup" -MonitorResourceGroup "NewResourceGroup" -MonitorResourceGroupRegion "westus2" -vNetName "avs-vnet" -VNetResourceGroup "vnet-resourcegroup" -vNEtSubnetAddress "192.168.10.0/29" -PureCloudBlockStoreEndpoint "192.168.1.10" -PureCloudBlockStoreCredential (Get-Credential)

The Deploy-PCBSAVSMonitor command requires a few important arguments for deployment.  Those arguments specific usage are expanded upon below:

AVSCloudName:  This is the AVS SDDC name as it appears in the Azure Portal.

AVSResourceGroup:  This is the Azure Resource Group that AVS has been deployed into.

MonitorResourceGroup:  This is the name for the new Azure Resource Group that will be created for the AVS polling Azure components.

MonitorResourceGroupRegion:  This is the region that the Azure Monitor Resource Group and its components will be deployed into.  It is recommended that this region is the same region as the AVS instance.

vNETName:  This is the name of the Azure vNET that CBS is utilizing and that AVS has an ExpressRoute connection with.

vNETResourceGroup:  This is the Resource Group that contains the Azure vNET that CBS is utilizing and that AVS has an ExpressRoute connection with.

vNETSubnetAddress:  This is a net new CIDR block that the Azure polling function will utilize.  It must be an unutilized part of the IP address space of the Azure vNET that CBS is utilizing. The subnet only requires a few IP addresses so it should be a minimum /29 network block.

MonitorIntervalinMinute:  The user can optionally specify what polling interval that want the monitoring function to query their AVS instance for changes between 10 and 60 minutes.  The default value is 10 minutes if left blank.

The specific function of each component for the polling function is broken out in the below screenshot:

polling1.png

  1. App Service Plan:  An App Service plan defines a set of compute resources for a web app or Azure Function to run.  For this use case, the App Service Plan it used for the Azure Function App.  The App Service Plan utilizes the economical B1 App Service plan SKU, which normally costs around $50 USD per month.
  2. Application Insights:  This Azure component collects metrics and telemetry data about the Azure function app, and is used for troubleshooting should any issues arise.  Furthermore, it provides live metrics and availability and usage metrics for the Function App and App Service plan.
  3. Function App:  This Azure function polls the AVS vCenter instance for host changes over a user-specified interval of time. If no interval is specified, then it defaults to polling the AVS vCenter every ten minutes.  If a host change is detected inside of a cluster initialized to use AVS with CBS, the Build-PCBSCluster run command is executed via the FunctionApp so that the updated host makeup of the cluster can be used with Cloud Block Store.
  4. Key Vault:  This stores Cloud Block Store array credentials that are registered against the polling infrastructure.
  5. Storage Account:  The storage account is used to store Azure monitor logs that are utilized by the Application Insights component.

Once the polling infrastructure has been created, there are additional PowerShell commands that can be executed against it.  Notably, if there are multiple CBS arrays attached to a single AVS instance, those arrays can also be added to the polling infrastructure so that AVS host updates can occur across all CBS arrays attached to the AVS instance.

Function Name Function Action Invoked When Example
Add-PCBSAVSMonitorArray Adds an additional CBS instance to an existing polling infrastructure for AVS. An additional CBS instance or instances are to be used with an AVS deployment.
Add-PCBSAVSMonitorArray -MonitorResourceGroup myMonitorGroup -PureCloudBlockStoreEndpoint myArray -PureCloudBlockStoreCredential (Get-Credential)
Get-PCBSAVSMonitorArray Lists the CBS arrays that are registered against an AVS polling infrastructure. You want to know what CBS arrays are or are not currently registered against an AVS monitoring instance.
Get-PCBSAVSMonitorArray -MonitorResourceGroup myMonitor
Remove-PCBSAVSMonitorArray Removes a CBS array from an AVS monitoring instance. A CBS array needs to be removed from the AVS polling infrastructure.  If executed, no further AVS host changes will be updated on the CBS array specified.
Remove-PCBSAVSMonitorArray -MonitorResourceGroup myMonitorGroup -PureCloudBlockStoreEndpoint myArray
Remove-PCBSAVSMonitor Removes the resource group that contains the AVS polling infrastructure. The polling infrastructure Azure Resource Group that contains all of the components for automatic lifecycle management for AVS hosts needs to be removed.
Remove-PCBSAVSMonitor -MonitorResourceGroup "myAVSMonitorResourceGroup"

Creating and Managing CBS Storage with AVS

When AVS and CBS are in an operational state, additional commands are available to customers to create new as well as manage their existing VMFS datastores.  The next table shows each of these available functions in detail.

Note that some command arguments shown below, such as -ClusterName are case-sensitive.

Function Name

Function Action

Invoked When:

Example:

New-PCBSVmfsDatastore
  • Creates a new VMFS volume of specified size on CBS and attaches the volume to the specified CBS host group.

  • Formats and mounts the CBS VMFS volume against the specified AVS cluster with VMFS 6.

  • A new VMFS volume is required.

Sample command with Minimum Required Arguments:

New-PCBSVmfsDatastore -ClusterName "myCluster" -DatastoreName "VMFSDatastoreName" -Size 4GB -AVSCloudName "myAVSCloudName" -AVSResourceGroup "myAVSResourceGroup"

Additional Optional Arguments:

-PureCloudBlockStoreConnection $CBSConnection

If you have multiple CBS connections in your PowerShell session you may pass this variable to select the CBS connection you want to use.

-AzureSubscriptionID "myAzureSubscriptionID"

If left out, this command will use the default/active Azure Subscription ID.  If you wish to specify a specific Azure subscription, use this parameter.

Restore-PCBSVmfsDatastore

  1. Running this command with the -VolumeSnapshotName flag will cause a new volume to be copied from a snapshot on the CBS array.  The new volume will then be mounted to the AVS cluster. 

  2. Running this command with the -VolumeName command will make a new VMFS volume based on the existing VMFS volume name specified.  The new VMFS volume will then be mounted to the AVS cluster.

  3. Running this command with the -ProtectionGroupSnapshotName command will enumerate over all the volume snapshots of the protection group, create new volume, then mount them to the AVS cluster. If the volume snapshot does not support VMFS it will be skipped. 

  4. Running this command with the -PodName command will enumerate over all the volume in the pod, then resignature and mount them to AVS cluster. If the volume does not support VMFS it will be skipped.  

  1. A new AVS VMFS volume needs to be created from an existing snapshot such as a replicated snapshot from an on-premises FlashArray.

  2. An additional copy of a VMFS volume needs to be created and utilized in AVS.

  3. New volume(s) needs to be created from the protection group snapshots. Protection group can be local or remote.

  4. A AVS VMFS volume needs to be created from the replicated target pod volume. Note: Pod needs to be promoted before running this command. 

Sample Command 1 with minimum required arguments:

Restore-PCBSVmfsDatastore -ClusterName "myCluster" -VolumeSnapshotName "myCBSSnapshotName" -AVSCloudName "myAVSCloudName" -AVSResourceGroup "myAVSResourceGroup"

Sample Command 2 with minimum required arguments:

Restore-PCBSVmfsDatastore -ClusterName "myCluster" -VolumeName "myCBSVolumeName" -AVSCloudName "myAVSCloudName" -AVSResourceGroup "myAVSResourceGroup"

Sample Command 3 with minimum required arguments:

Restore-PCBSVmfsDatastore -ClusterName "myCluster" -ProtectionGroupSnapshotName "myCBSPGName" -AVSCloudName "myAVSCloudName" -AVSResourceGroup "myAVSResourceGroup"

Sample Command 4 with minimum required arguments:

Restore-PCBSVmfsDatastore -ClusterName "myCluster" -PodName "myCBSPodName" -AVSCloudName "myAVSCloudName" -AVSResourceGroup "myAVSResourceGroup"

Additional Optional Arguments:

-DatastoreName "myVMFSName"

If the parameter is not specified, a generated name will be used. Example: "snap-######-<original volume/snapshot name on CBS>"

-PureCloudBlockStoreConnection $CBSConnection

If you have multiple CBS connections in your PowerShell session you may pass this variable to select the CBS connection you want to use.

-AzureSubscriptionID "myAzureSubscriptionID"

If left out, this command will use the default/active Azure Subscription ID.  If you wish to specify a specific Azure subscription, use this parameter.

Set-PCBSVmfsCapacity

  • Increases the size of an existing CBS VMFS datastore

  • Additional space is needed on an existing CBS VMFS datastore.

Sample command with minimum requirements:

Set-PCBSVmfsCapacity -ClusterName "mycluster" -DatastoreName "myDatastore" -Size 5GB -AVSCloudName "myAVSCloudName" -AVSResourceGroup "myAVSResourceGroup"

Additional Optional Arguments:

-PureCloudBlockStoreConnection $CBSConnection

If you have multiple CBS connections in your PowerShell session you may pass this variable to select the CBS connection you want to use.

-AzureSubscriptionID "myAzureSubscriptionID"

If left out, this command will use the default/active Azure Subscription ID.  If you wish to specify a specific Azure subscription, use this parameter.

Remove-PCBSVmfsDatastore
  • Dismounts and removes an existing CBS VMFS datastore from AVS.

  • Removes the volume from the CBS host group and deletes the volume in CBS.

  • A CBS VMFS datastore needs to be removed.
Remove-PCBSVmfsDatastore  -ClusterName "mycluster" -DatastoreName "myDatastore -AVSCloudName "myAVSCloudName" -AVSResourceGroup "myAVSResourceGroup"

 

Additional Optional Arguments:

-PureCloudBlockStoreConnection $CBSConnection

If you have multiple CBS connections in your PowerShell session you may pass this variable to select the CBS connection you want to use.

-AzureSubscriptionID "myAzureSubscriptionID"

If left out, this command will use the default/active Azure Subscription ID.  If you wish to specify a specific Azure subscription, use this parameter.

The below technical demo video shows how a few of the above commands can be used to initialize an AVS cluster, create a new VMFS datastore and restore a replicated snapshot from an on-premises FlashArray.

Deploying the Pure Storage VM Analytics Collector

VM Analytics is a feature offered in Pure1 that shows a full-stack mapping of key storage performance metrics from the AVS cluster and Pure Cloud Block Store.  It is highly recommended to install and utilize this function as it provides an intuitive user-interface to easily see at what layer a potential performance bottleneck originates from.

Deployment of the VM Analytics Collector is more or less identical to the VMware Cloud Manager OVA shown in this guide.  However, a separate OVA appliance instance must be deployed for the VM Analytics Collector functionality to be enabled.

Please see the following guide for detailed instructions on deployment, setup and usage.