How to prepare a VMware Cloud Foundation 3.x cluster for inclusion in a VSAN stretched cluster
search cancel

How to prepare a VMware Cloud Foundation 3.x cluster for inclusion in a VSAN stretched cluster

book

Article ID: 316980

calendar_today

Updated On:

Products

VMware Cloud Foundation

Issue/Introduction

This article provides a python script that runs on the SDDC Manager VM to prepare a cluster for stretched-VSAN. The attached script is referred to in the VMware Cloud Foundation 3.0.x/3.5 Administration Guide and is used to add hosts from either Availability Zone 1 or Availability Zone 2 to an existing stretched-VSAN cluster. For VMware Cloud Foundation 3.5.1, examples of using the sos to prepare the cluster for stretched-VSAN are included in this article.

Environment

VMware Cloud Foundation 3.0.x
VMware Cloud Foundation 3.5.x

Resolution

For VMware Cloud Foundation 3.0.x

  1. Download the attached 59280_vsan-stretch-cluster-3.0.tar file.
  2. Use a file transfer utility to copy the file to the /tmp directory on SDDC Manager VM.
  3. SSH to the SDDC Manager VM as the vcf user.
  4. Extract the contents of the file by issuing the following command:
tar -C /tmp/ -xvf /tmp/59280_vsan-stretch-cluster-3.0.tar
  1. To display the available clusters, issue the following command:
python /tmp/vsan-stretch-cluster/workflow/stretch_vsan.py --show-clusters
 
Note: You will see output similar to the following:
 
Domain name: MGMT
     Cluster name: SDDC-Cluster1
  1. To display the free hosts in the VMware Cloud Foundation inventory, issue the following command:
python /tmp/vsan-stretch-cluster/workflow/stretch_vsan.py --show-free-hosts

Note: You will see output similar to the following:

r2n3.dr13.vmw.corp
r2n4.dr13.vmw.corp
r2n5.dr13.vmw.corp
r2n6.dr13.vmw.corp
  1. Issue a command similar to the following to add free hosts to a particular domain/cluster:
python /tmp/vsan-stretch-cluster/workflow/stretch_vsan.py --stretch-vsan --domain MGMT --cluster SDDC-Cluster1 --hosts r2n3.dr13.vmw.corp r2n4.dr13.vmw.corp  r2n5.dr13.vmw.corp r2n6.dr13.vmw.corp --license 12345-67890-ABCDE-FGHIJ-KLMNO
 
Note: You will see output similar to the following:

Stretch VSAN Triggered. Please monitor it from the Sddc manager UI

 
Notes:
  • Use the domain, cluster and host names that apply to your installation.
  • Use the ESXi license that is applicable to your installation.

 

For VMware Cloud Foundation 3.5.0

  1. Download the attached 59280_vsan-stretch-cluster-3.5.tar file.
  2. Use a file transfer utility to copy the file to the /tmp directory on SDDC Manager VM.
  3. SSH to the SDDC Manager VM as the vcf user.
  4. Extract the contents of the file by issuing the following command:
tar -C /tmp/ -xvf /tmp/59280_vsan-stretch-cluster-3.5.tar
  1. To display the available clusters, issue the following command:
python /tmp/vsan-stretch-cluster/workflow/stretch_vsan.py --show-clusters
 
Note: You will see output similar to the following:
 
Domain name: MGMT
     Cluster name: SDDC-Cluster1
  1. To display the free hosts in the VMware Cloud Foundation inventory, issue the following command:
python /tmp/vsan-stretch-cluster/workflow/stretch_vsan.py --show-free-hosts

Note: You will see output similar to the following:

r2n3.dr13.vmw.corp
r2n4.dr13.vmw.corp
r2n5.dr13.vmw.corp
r2n6.dr13.vmw.corp
  1. Issue a command similar to the following to add free hosts to a particular domain/cluster:
python /tmp/vsan-stretch-cluster/workflow/stretch_vsan.py --stretch-vsan --domain MGMT --cluster SDDC-Cluster1 --hosts r2n3.dr13.vmw.corp r2n4.dr13.vmw.corp  r2n5.dr13.vmw.corp r2n6.dr13.vmw.corp --license 12345-67890-ABCDE-FGHIJ-KLMNO
 
Note: You will see output similar to the following:

Stretch VSAN Triggered. Please monitor it from the Sddc manager UI

 
Notes:
  • Use the domain, cluster and host names that apply to your installation.
  • Use the ESXi license that is applicable to your installation.
  1. Issue a command similar to the following to reconfigure the NSX Controllers for a particular domain/cluster:
python /tmp/vsan-stretch-cluster/workflow/reconfigure-nsxcontrollers.py --reconfigure-nsxcontrollers --domain MGMT --cluster SDDC-Cluster1

Note: You will see output similar to the following:

Reconfigure Nsx Controllers Triggered. Please monitor it from the Sddc manager UI

 
Notes:
  • Use the domain, cluster and host names that apply to your installation.
  • The reconfigure-nsxcontrollers.py script also accepts the --show-clusters switch, similar to the stretch_vsan.py script.
 

For VMware Cloud Foundation 3.5.1

In VMware Cloud Foundation 3.5.1, preparing a cluster for inclusion in a VSAN stretched cluster is done via the /opt/vmware/sddc-support/sos command. The following specific switches are relevant to the stretched cluster configuration:
 
vSAN Stretched Cluster:
  --show-clusters Show all domains and clusters
  --show-free-hosts Shows list of all free hosts
  --stretch-vsan Creates json payload for stretch Vsan and call stretch
                        vsan to be called with --sc-domain --sc-cluster --sc-hosts
                        --esxi-license-key
  --reconfigure-nsxcontrollers
                        Get Cluster info for NSX Controllers reconfiguration
                        and trigger the reconfiguration workflow for given
                        --sc-domain --sc-cluster
  --sc-domain SCDOMAIN Use this domain for vsan stretch
  --sc-cluster SCCLUSTER
                        Use this cluster for vsan stretch
  --sc-hosts SCHOSTS [SCHOSTS ...]
                        Use these hosts for vsan stretch
  --esxi-license-key ESXILICENSEKEY
                        Provide esx license key

The following are usage examples of some of the needed VSAN stretched cluster switches to the sos command:

Show Free Hosts:
 
/opt/vmware/sddc-support/sos --show-free-hosts
Welcome to Supportability and Serviceability(SoS) utility!
Logs : /var/log/vmware/vcf/sddc-support/stretchCluster-2018-12-05-07-29-55-64592
Stretch Cluster operation log : /var/log/vmware/vcf/sddc-support/stretchCluster-2018-12-05-07-29-55-64592/sos.log
Starting vSAN stretched cluster operations..

Free Hosts:
esxi-8.vrack.vsphere.local

Show Clusters:
 
/opt/vmware/sddc-support/sos --show-clusters
Welcome to Supportability and Serviceability(SoS) utility!
Logs : /var/log/vmware/vcf/sddc-support/stretchCluster-2018-12-04-11-03-37-36350
Stretch Cluster operation log : /var/log/vmware/vcf/sddc-support/stretchCluster-2018-12-04-11-03-37-36350/sos.log
Starting vSAN stretched cluster configuration workflow..

Domain name: MGMT
        Cluster name: SDDC-Cluster1

Stretch VSAN cluster:
 
/opt/vmware/sddc-support/sos --stretch-vsan --sc-domain MGMT --sc-cluster SDDC-Cluster1 --esxi-license-key 12345-67890-ABCDE-FGHIJ-KLMNO --sc-hosts esxi-8.vrack.vsphere.local

Welcome to Supportability and Serviceability(SoS) utility!
Logs : /var/log/vmware/vcf/sddc-support/stretchCluster-2018-12-05-07-42-12-65441
Stretch Cluster operation log : /var/log/vmware/vcf/sddc-support/stretchCluster-2018-12-05-07-42-12-65441/sos.log
Starting vSAN stretched cluster operations..
Stretch VSAN Triggered. Please monitor it from the Sddc manager UI
 
 


Attachments

59280_vsan-stretch-cluster-3.0.tar get_app
59280_vsan-stretch-cluster-3.5.tar get_app