Hyperconverged Infrastructure vSAN

VMware Virtual SAN Stretched Cluster Automated Deployments with PowerCLI

VSAN-L2-L3-LogoAs a follow-up to my previous post on the topic of Virtual SAN automation, VMware Virtual SAN Automated Deployments with PowerCLI, I want to continue the Virtual SAN automation theme and share another automated demonstration example.

This time, I want to highlight one of the primary use cases for Virtual SAN with the focus on availability and business continuity. Using PowerCLI, you can quickly perform the deployment and configuration of all of the necessary settings and artifacts required in a virtual infrastructure to configure a Virtual SAN cluster across multiple data centers. In this example, I have chosen one of the most complicated Virtua SAN deployment options from an implementation and maintenance perspective which is a Stretched Cluster between multiple data centers over layer 3 networks.

This type of Virtual SAN deployment is highly dependent on the physical network infrastructure and on the adequate configuration required to allow Virtual SAN communication over Layer 2 networks (Multicast) as well as routed networks (PIM). The preparation and configuration of the physical network infrastructure is typically the responsibility of a dedicated team of network engineers and

This type of Virtual SAN deployment is highly dependent on the physical network infrastructure and on the adequate configuration required to allow Virtual SAN communication over Layer 2 networks (Multicast) as well as routed networks (PIM). The preparation and configuration of the physical network infrastructure is typically the responsibility of a dedicated team of network engineers and therefore it is not something I’m trying to address here with PowerCLI. The assumption is that the physical network infrastructure has been configured and prepared to satisfy the networking requirements for Virtual SAN communication.

VSAN-SC-Logical

The sample code in the PowerCLI script featured here is ready for a vSphere Administrator to use as part of the deployment of a Virtual SAN Stretched Cluster over layer 3 networks. The code in the scripts performs the configuration and setup of all of the necessary vSphere related artifacts to form successfully an 8 node all-flash cluster across multiple sites. There are a couple of Virtual SAN 6.2 configuration functions that aren’t available in the latest release of PowerCLI 6.3 Release 1 and because of that, a couple of features will need to be enabled from the UI, but still with a couple of clicks and minimum complexity.

The great Alan Renouf promised me that missing PowerCLI cmdlets and functions are already in the works and will be added to PowerCLI soon. Beyond this little gap, this sample script can be used in any physical and vSphere infrastructure where the necessary physical network configuration settings for VMware Virtual SAN deployments across layer 3 have been satisfied and successfully implemented.

The following automated functions are performed with PowerCLI:

  • Creation of the virtual datacenter
  • Add the Virtual SAN Witness appliance to the data center and configure the Virtual SAN network IP address
  • Creating a vSphere Cluster and add the hosts to the cluster
  • Create the distributed switch and port groups for each host and network
  • Add host related information such DNS, NTP, VMkernel Interfaces, VLANs
  • Enable the Virtual SAN Network traffic services
  • Add static routes on all hosts and Virtual SAN witness appliance necessary for intra-cluster SOLID-VSAN_logo_logo_colorcommunication
  • Validate host communication and cross network connectivity by pinging the Virtual SAN network interface
  • Claim the flash storage devices based on their model for their respective tiers were provided by Micron and form multiple disk groups per hosts

Once all of those functions are completed all that is left to do is going over the stretched cluster configuration workflow to define the locations, and add Virtual SAN witness to the cluster as the witness failure domain. All done view a few clicks. You will then be ready to begin the creation of virtual machine networks and deploying virtual machines. Before going into test mode or even production, don’t forget to complete the recommended HA and DRS configuration settings.

I used the latest version of PowerCLI which was released last week I recommend getting – PowerCLI 6.3 Release 1. I’ve included a demonstration of the script at work below to see it all working. I recommend watching the video in full screen more to clearly see the actions performed in the script just in case the font on the windows is too small to see.


You can copy the code below and use it as much as you like. I hope everyone finds this useful and for those PowerCLI pros out there feel free to provide comments and improvements. This script is great for all types of proof of concepts with minimal changes required. All you need to know and change is the IP addresses and settings to match the network settings relevant to the infrastructures where deploying Virtual SAN.

To get access to the PowerCLI code visit the link below:

 

 

I would like to thank the folks at Micron for being generous and providing the flash devices for the Virtual SAN infrastructure used for the creation of the demo. Also huge thanks to the one and only Mr. Alan Renouf for always wanting to help and collaborate.

-Enjoy

For future updates on Virtual SAN (VSAN), vSphere Virtual Volumes (vVols) and other Storage and Availability technologies, as well as vSphere Integrated OpenStack (VIO), and Cloud-Native Applications (CNA) be sure to follow me on Twitter: @PunchingClouds.