• Stars
    star
    236
  • Rank 170,480 (Top 4 %)
  • Language
    PowerShell
  • Created almost 8 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

vSphere Automated Lab Deployment for vSphere 6.x (6.0, 6.5 & 6.7)

vSphere Automated Lab Deployment

Table of Contents

Description

Automated deployment of a fully functional vSphere 6.x environment that includes a set of Nested ESXi Virtual Appliance(s) configured w/vSAN as well as a vCenter Server Appliance (VCSA) using PowerCLI. For information, you can refer to this blog post here for more details.

Changelog

  • 11/22/16

    • Automatically handle Nested ESXi on vSAN
  • 01/20/17

    • Resolved "Another task in progress" thanks to Jason M
  • 02/12/17

    • Support for deploying to VC Target
    • Support for enabling SSH on VCSA
    • Added option to auto-create vApp Container for VMs
    • Added pre-check for required files
  • 02/17/17

    • Added missing dvFilter param to eth1 (missing in Nested ESXi OVA)
  • 02/21/17

    • Support for deploying NSX 6.3 & registering with vCenter Server
    • Support for updating Nested ESXi VM to ESXi 6.5a (required for NSX 6.3)
    • Support for VDS + VXLAN VMkernel configuration (required for NSX 6.3)
    • Support for "Private" Portgroup on eth1 for Nested ESXi VM used for VXLAN traffic (required for NSX 6.3)
    • Support for both Virtual & Distributed Portgroup on $VMNetwork
    • Support for adding ESXi hosts into VC using DNS name (disabled by default)
    • Added CPU/MEM/Storage resource requirements in confirmation screen
  • 05/08/17

    • Support for patching ESXi using VMware Online repo thanks to Matt Lichstein for contribution
    • Added fix to test ESXi endpoint before trying to patch
  • 04/18/18

    • Added support for vCenter Server 6.7, some of the JSON params have changed for consistency purposes which needed to be updated
    • Added support for new Nested ESXi 6.7 Virtual Appliance (will need to download that first)
    • vMotion is now enabled by default on vmk0 for all Nested ESXi hosts
  • 02/10/2020

    • Added support for deploying basic vSphere environment (ESXi VM + VCSA) into VMware Cloud on AWS (Nested vSAN not supported)

Requirements

Supported Deployments

The scripts support deploying both a vSphere 6.x environment and there are two types of deployments for each:

  • Standard - All VMs are deployed directly to the physical ESXi host
  • Self Managed - Only the Nested ESXi VMs are deployed to physical ESXi host. The VCSA is then bootstrapped onto the first Nested ESXi VM

Here is a quick diagram to help illustrate the two deployment scenarios. The pESXi in gray is what you already have deployed which must be running at least ESXi 6.0 Update 2. The rest of the boxes is what the scripts will deploy. In the "Standard" deployment, three Nested ESXi VMs will be deployed to the pESXi host and configured with vSAN. The VCSA will also be deployed directly to the pESXi host and the vCenter Server will be configured to add the three Nested ESXi VMs into its inventory. This is a pretty straight forward and basic deployment, it should not surprise anyone. The "Self Managed" deployment is simliar, however the biggest difference is that rather than the VCSA being deployed directly to the pESXi host like the "Standard" deployment, it will actually be running within the Nested ESXi VM. The way that this deployment scenario works is that we will still deploy three Nested ESXi VM onto the pESXi host, however, the first Nested ESXi VM will be selected as a "Bootstrap" node which we will then construct a single-node vSAN to then deploy the VCSA. Once the vCenter Server is setup, we will then add the remainder Nested ESXi VMs into its inventory.

Scripts

Script Function Script Download
vSphere 6.5 Standard Deployment vsphere-6.5-standard-lab-deployment.ps1
vSphere 6.0u2 Standard Deployment vsphere-6.0-standard-lab-deployment.ps1
vSphere 6.5 Self Managed Deployment vsphere-6.5-self-manage-lab-deployment.ps1
vSphere 6.0u2 Self Managed Deployment vsphere-6.0-self-manage-lab-deployment.ps1
vSphere 6.7 Standard Managed Deployment vsphere-6.7-standard-lab-deployment.ps1

Configuration

This section describes the location of the files required for deployment. The first two are mandatory for the basic deployment. For advanced deployments such as NSX 6.3, you will need to download additional files and below are examples of what is required.

$NestedESXiApplianceOVA = 'C:\Users\Administrator\Desktop\VMC-Customer0\Nested_ESXi6.7u3_Appliance_Template_v1.ova'
$VCSAInstallerPath = 'C:\Users\Administrator\Desktop\VMC-Customer0\VMware-VCSA-all-6.7.0-15132721'
$NSXOVA =  "C:\Users\primp\Desktop\VMware-NSX-Manager-6.3.0-5007049.ova"
$ESXi65aOfflineBundle = "C:\Users\primp\Desktop\ESXi650-201701001\vmw-ESXi-6.5.0-metadata.zip"

This section describes the credentials to your physical ESXi server or vCenter Server in which the vSphere lab environment will be deployed to:

$VIServer = "himalaya.primp-industries.com"
$VIUsername = "root"
$VIPassword = "vmware123"

This section describes whether your deployment environment (destination) will be an ESXi host, vCenter Server or VMware Cloud on AWS. You will need to specify either ESXI, VCENTER or VMC keyword:

$DeploymentTarget = "ESXI"

This section defines the number of Nested ESXi VMs to deploy along with their associated IP Address(s). The names are merely the display name of the VMs when deployed. At a minimum, you should deploy at least three hosts, but you can always add additional hosts and the script will automatically take care of provisioning them correctly.

$NestedESXiHostnameToIPs = @{
    "vesxi67-1" = "192.168.1.51"
    "vesxi67-2" = "192.168.1.52"
    "vesxi67-3" = "192.168.1.53"
}

This section describes the resources allocated to each of the Nested ESXi VM(s). Depending on the deployment type, you may need to increase the resources. For Memory and Disk configuration, the unit is in GB.

$NestedESXivCPU = "2"
$NestedESXivMEM = "6"
$NestedESXiCachingvDisk = "4"
$NestedESXiCapacityvDisk = "8"

This section describes the VCSA deployment configuration such as the VCSA deployment size, Networking & SSO configurations. If you have ever used the VCSA CLI Installer, these options should look familiar.

$VCSADeploymentSize = "tiny"
$VCSADisplayName = "vcenter67-1"
$VCSAIPAddress = "192.168.1.50"
$VCSAHostname = "vcenter67-1.vmware.corp" #Change to IP if you don't have valid DNS
$VCSAPrefix = "24"
$VCSASSODomainName = "vsphere.local"
$VCSASSOPassword = "VMware1!"
$VCSARootPassword = "VMware1!"
$VCSASSHEnable = "true"

This section describes the location as well as the generic networking settings applied to BOTH the Nested ESXi VM and VCSA.

$VirtualSwitchType = "VDS" # VSS or VDS
$VMNetwork = "sddc-cgw-network-1"
$VMDatastore = "WorkloadDatastore"
$VMNetmask = "255.255.255.0"
$VMGateway = "192.168.1.1"
$VMDNS = "192.168.1.100"
$VMNTP = "pool.ntp.org"
$VMPassword = "VMware1!"
$VMDomain = "vmware.corp"
$VMSyslog = "192.168.1.200"

# Applicable to Nested ESXi only
$VMSSH = "true"
$VMVMFS = "false"

# Applicable to VC Deployment Target only
$VMCluster = "Cluster-1"

# Defaults for VMC
$VMDatacenter = "SDDC-Datacenter"
$VMFolder = "Workloads"
$VMResourcePool = "Compute-ResourcePool"

This section describes the configuration of the new vCenter Server from the deployed VCSA.

$NewVCDatacenterName = "Datacenter"
$NewVCVSANClusterName = "vSphere-Cluster"

This section describes the NSX configuration if you choose to deploy which will require you to set $DeployNSX property to 1 and fill out all fields.

$DeployNSX = 0
$NSXvCPU = "2" # Reconfigure NSX vCPU
$NSXvMEM = "8" # Reconfigure NSX vMEM (GB)
$NSXDisplayName = "nsx63-1"
$NSXHostname = "nsx63-1.primp-industries.com"
$NSXIPAddress = "172.30.0.250"
$NSXNetmask = "255.255.255.0"
$NSXGateway = "172.30.0.1"
$NSXSSHEnable = "true"
$NSXCEIPEnable = "false"
$NSXUIPassword = "VMw@re123!"
$NSXCLIPassword = "VMw@re123!"

This section describes the VDS and VXLAN configurations which is required for NSX deployment. The only mandatory field here is $PrivateVXLANVMnetwork which is a private portgroup that must already exists which will be used to connect the second network adapter of the Nested ESXi VM for VXLAN traffic. You do not need a routable portgroup and the other properties can be left as default or you can modify them if you wish.

# VDS / VXLAN Configurations
$PrivateVXLANVMNetwork = "dv-private-network" # Existing Portgroup
$VDSName = "VDS-6.5"
$VXLANDVPortgroup = "VXLAN"
$VXLANSubnet = "172.16.66."
$VXLANNetmask = "255.255.255.0"

This section describes some advanced options for the deployment. Th first setting adds the ESXi hosts into vCenter Server using DNS names (must have both forward/reverse DNS working in your environment). The second option will upgrade the Nested ESXi 6.5 VMs to ESXi 6.5a which is required if you are deploying NSX 6.3 or if you just want to run the latest version of ESXi, you can also enable this. Both of these settings are disabled by default

# Set to 1 only if you have DNS (forward/reverse) for ESXi hostnames
$addHostByDnsName = 0
# Upgrade vESXi hosts to 6.5a
$upgradeESXiTo65a = 0

Once you have saved your changes, you can now run the PowerCLI script as you normally would.

Logging

There is additional verbose logging that outputs as a log file in your current working directory either vsphere60-lab-deployment.log or vsphere65-lab-deployment.log depending on the deployment you have selected.

Verification

Once you have saved all your changes, you can then run the script. You will be provided with a summary of what will be deployed and you can verify that everything is correct before attempting the deployment. Below is a screenshot on what this would look like:

Sample Executions

Here is an example of running a vSphere 6.5 "Standard" deployment including NSX 6.3:

Here is an example of running a vSphere 6.5 "Self Managed" deployment:

If everything is succesful, you can now login to your new vCenter Server and you should either see the following for a "Standard" deployment:

or the following for "Self Managed" deployment:

More Repositories

1

ghettoVCB

ghettoVCB
Shell
1,219
star
2

vmware-scripts

Various scripts for VMware based solutions
Perl
806
star
3

vsphere-with-tanzu-nsxt-automated-lab-deployment

vSphere with Tanzu using NSX-T Automated Lab Deployment
PowerShell
209
star
4

homelab

VMware Community Homelabs
182
star
5

vmworld2019-session-urls

vmworld2019-session-urls
PowerShell
112
star
6

vmworld2018-session-urls

VMworld 2018 session recordings
PowerShell
76
star
7

vsphere-8-lab-deployment

Automated vSphere 8.x Lab Deployment
PowerShell
74
star
8

vsphere-with-tanzu-basic-automated-lab-deployment

Automated vSphere with Tanzu and HAProxy Lab Deployment
PowerShell
66
star
9

vmworld2017-session-urls

65
star
10

vmworld2016-session-urls

Nice summary list of all VMworld 2016 playback URLs
53
star
11

esxi-advanced-and-kernel-settings

ESXi Advanced and Kernel Settings
47
star
12

nsxt-automated-lab-deployment

NSX-T 2.0 Automated Lab Deployment with vSphere 6.x
PowerShell
46
star
13

vmware-explore-2022-session-urls

46
star
14

vcenter-event-mapping

40
star
15

vsphere-with-tanzu-nsx-advanced-lb-automated-lab-deployment

Automated vSphere with Tanzu and NSX Advanced Load Balancer Lab Deployment
PowerShell
36
star
16

usb-to-sddc

Shell
35
star
17

vmware-explore-2023-session-urls

VMware Explore 2023 Sessions
33
star
18

vcf-automated-lab-deployment

Automated VMware Cloud Foundation Lab Deployment
PowerShell
32
star
19

vsphere-with-tanzu-homelab-scripts

Simplified vSphere with Tanzu Homelab
PowerShell
30
star
20

photonos-appliance

Shell
29
star
21

vvd-quick-reference

VMware Validated Design (VVD) Quick Reference Sheet
28
star
22

vmworld2021-session-urls

26
star
23

instantclone-community-customization-scripts

Community customization scripts for Instant Clone in vSphere 6.7
PowerShell
25
star
24

customize-vsphere-web-client-6.0

Customizing the vSphere Web Client 6.0 Login UI
CSS
21
star
25

custom-virtual-appliances

References on how to build your custom Virtual Appliances w/OVF Properties
PowerShell
20
star
26

vmware-pks-automated-lab-deployment

Automated Pivotal Container Service (PKS) Lab Deployment
PowerShell
19
star
27

vyetti-vsphere-client-customization

Java
19
star
28

ax88179_178a-esxi

AX88179_178a USB NIC Driver for ESXi 5.5/6.0
C
19
star
29

harbor-appliance

PhotonOS Harbor Packer reference implementation (OVA)
Shell
17
star
30

customize-vsphere-web-client-6.5

Customizing the vSphere Web Client 6.5 Login UI
CSS
15
star
31

vmware-fah-automation

Automation examples for deploying VMware Appliance for Folding @ Home (https://flings.vmware.com/vmware-appliance-for-folding-home)
Shell
15
star
32

vcenter-authn-authz-log-examples

Log examples of vCenter Server Authentication & Authorization activities
13
star
33

vmfork-community-customization-scripts

Repository of community OS customization scripts for Instant Clone cmdlets
Shell
13
star
34

automated-nested-lab-deployment-on-vmware-cloud

Automated Nested Lab Deployment on VMware Cloud SDDCs
PowerShell
11
star
35

govc-recordings

Community Repository of govc vSphere Inventory Recordings
10
star
36

vmware-k8s-app-demo

10
star
37

customize-vsphere-web-client-6.0u2

Customizing the vSphere Web Client 6.0 Update 2 Login UI
CSS
10
star
38

migrate2vcsa-resources

List of useful resources related to the VCSA Migration Tool
8
star
39

deploy-vm-from-content-library-action

Github Action to Deploy Virtual Machine from vSphere Content Library using GOVC
Shell
8
star
40

photonos-nfs-appliance

PhotonOS Packer reference implementation (includes NFS Server)
Shell
8
star
41

powerclicore-docker-container-samples

Examples of how to run PowerCLI scripts using PowerCLI Core Docker Container
PowerShell
6
star
42

photonos-arm-nfs-appliance

PhotonOS Arm Packer reference implementation (includes NFS Server)
Shell
6
star
43

netboot-esxi

Netboot (network boot and installation) of ESXi onto Apple Mac Hardware
6
star
44

stateless-esxi-arm

Stateless ESXi-Arm + Auto Configuration
Python
6
star
45

mapping-vsan-perf-stats-to-powercli-api

6
star
46

raspberry-pi-os-ova

Scripts to build Raspberry Pi OS Virtual Appliance (OVA)
Shell
5
star
47

vmc-shorturl

List of all VMware Cloud on AWS short URLs
5
star
48

vum-umds-docker

VUM 6.5 Update Manager Download Service (UMDS) Docker Container
Shell
4
star
49

tkg-demos

4
star
50

intel-nuc-decoder

Decoding all Intel NUC "Canyon" Generation with CPU "Lake" Generation Codenames
HTML
4
star
51

vmc-packer-example

Packer Examples for VMware Cloud on AWS
4
star
52

VMware.VMC.NSXT

PowerShell Module for NSX-T on VMware Cloud on AWS
PowerShell
4
star
53

VMware.HCX

PowerShell Module for HCX and HCX Cloud
PowerShell
4
star
54

vmworld2016-eu-session-urls

VMworld 2016 Europe Session URLs
4
star
55

VMware.WorkloadManagement

PowerCLI Module for vSphere with Kubernetes
PowerShell
3
star
56

vcf-on-intel-nuc

Deploy VMware Cloud Foundation (VCF) Management Domain on Intel NUC
Shell
3
star
57

venusos-arm64-kernel-for-esxi-arm

Arm64 Kernel to boot VenusOS (32-Bit OS) on ESXi-Arm
3
star
58

vsphere-event-driven-automation-vmware-event-router

vSphere Event Driven Automation using VMware Event Router
Shell
3
star
59

VMware.WorkspaceOneAccess

PowerShell Module for VMware Workspace One Access
PowerShell
2
star
60

vmware-pks-app-demo

2
star
61

hiking

Hiking Trails
2
star
62

vmc-api-simulation

Simulating Multi-VMware Cloud on AWS API using Prism
2
star
63

create-vsphere-tag-action

Github Action to create a vSphere Tag using GOVC
Dockerfile
2
star
64

vmworld-2020-vmware-cloud-demo

Python
2
star
65

vmworld2015-3rd-party-content-library

Demo of VMware's 3rd Party Content Library using an Nginx Container
Shell
2
star
66

vmworld2020-session-urls

1
star
67

vmworld-hackathon

1
star
68

knative-on-tkg

Deploying Knative on a TKG Guest Cluster for both TKG MultiCloud and vSphere with Tanzu
1
star
69

tkg-multi-vcenter-ytt

Updating Tanzu Kubernetes Grid (TKG) manifest for multi vCenter Server deployment using YTT
Shell
1
star
70

vmware-fling-stats

HTML
1
star
71

kn-ps-telegram

PowerShell
1
star
72

VMware.DRaaS

PowerShell Module for VMware Site Recovery (DRaaS)
PowerShell
1
star
73

VMware.Community.AppTransformer

PowerShell Community Module for Application Transformer for VMware Tanzu
PowerShell
1
star
74

demo-go-webapp

Demo Go WebApp
Go
1
star
75

vsphere-event-driven-automation-tap

vSphere Event Driven Automation using Tanzu Application Platform
1
star
76

VMware.Community.Datasets

VMware Community Module for vSphere Datasets in vSphere 8
PowerShell
1
star
77

tkg-on-vmc-setup

PowerCLI to configure and setup all pre-reqs for running Tanzu Kubernetes Grid on VMware Cloud on AWS
PowerShell
1
star
78

crm-fling-docker-compose-app

Docker Compose App for running VMware Cluster Rules Manager Fling
1
star
79

VMware.Community.VPlus

VMware Community Module for interacting with vSphere+ and vSAN+ Cloud Service
PowerShell
1
star
80

vmc-tanzu-services-demo

1
star
81

cloudinit-vmware-guestinfo-examples

Examples using Cloud-init Datastore for VMware GuestInfo
1
star
82

horizon-event-mapping

VMware Horizon Event List
1
star