Skip to content

PowerShell OVF Helper

OVF Template for VMware vCenter Server 8.0

The following PowerShell snippet can be used to deploy VMware vCenter Server 8.0 using PowerShell. The VMware.PowerCLI module is required to use the script.

  1. Copy the snippet to your favorite editor
  2. Change the path to your local OVA file
  3. Fill out the variables
  4. Connect to a vCenter Server using the Connect-VIServer command
  5. Run the script
iso-VMware-vCenter-Server-8.0.ps1:
$iso = '.\VMware-VCSA-all-8.0.0-20920323.iso' # Path to ISO File
$mnt = Mount-DiskImage $iso
$vol = Get-Volume -DiskImage $mnt
$deploymentType = "vCenter" # Deployment Type (ESXi|vCenter)

if($deploymentType -eq "ESXi"){
    $vcsa_config = (Get-Content -Raw "$($vol.DriveLetter):\vcsa-cli-installer\templates\install\embedded_vCSA_on_ESXi.json") | convertfrom-json
    $vcsa_config.new_vcsa.esxi.hostname = ""                      # FQDN or IP address of the ESXi host on which to deploy the new appliance
    $vcsa_config.new_vcsa.esxi.username = ""                      # root
    $vcsa_config.new_vcsa.esxi.password = ""                      # Password of the ESXi host root user
    $vcsa_config.new_vcsa.esxi.deployment_network = "VM Network"  # Portgroup
    $vcsa_config.new_vcsa.esxi.datastore = ""                     # Datastore to deploy the vCenter
} elseif($deploymentType -eq "vCenter") {
    $vcsa_config = (Get-Content -Raw "$($vol.DriveLetter):\vcsa-cli-installer\templates\install\embedded_vCSA_on_VC.json") | convertfrom-json
    $vcsa_config.new_vcsa.vc.hostname = ""                      # FQDN or IP address of the vCenter Server instance on which to deploy the new appliance
    $vcsa_config.new_vcsa.vc.username = ""                      # The user name of a user with administrative privileges
    $vcsa_config.new_vcsa.vc.password = ""                      # Password
    $vcsa_config.new_vcsa.vc.deployment_network = "VM Network"  # Portgroup
    $vcsa_config.new_vcsa.vc.datacenter = ""                    # Datacenter Name
    $vcsa_config.new_vcsa.vc.target = ""                        # ESXi, Cluster, or Resource Pool
    $vcsa_config.new_vcsa.vc.datastore = ""                     # Datastore to deploy the vCenter
} else {
    Throw "Unsupported Deployment Type: $deploymentType (ESXi|vCenter)"
}

$vcsa_config.new_vcsa.appliance.name = ""
$vcsa_config.new_vcsa.appliance.thin_disk_mode = $true
$vcsa_config.new_vcsa.appliance.deployment_option = "small"   # Options                     vCPUs Memory(GB) Storage(GB) Hosts(up to) VMs(up to)
                                                              # --------------------------------------------------------------------------------
                                                              # tiny                        2     14         579         10           100
                                                              # tiny-lstorage               2     14         2019        10           100
                                                              # tiny-xlstorage              2     14         4279        10           100
                                                              # small                       4     21         694         100          1000
                                                              # small-lstorage              4     21         2044        100          1000
                                                              # small-xlstorage             4     21         4304        100          1000
                                                              # medium                      8     30         908         400          4000
                                                              # medium-lstorage             8     30         2208        400          4000
                                                              # medium-xlstorage            8     30         4468        400          4000
                                                              # large                       16    39         1358        1000         10000
                                                              # large-lstorage              16    39         2258        1000         10000
                                                              # large-xlstorage             16    39         4518        1000         10000
                                                              # xlarge                      24    58         2283        2000         35000
                                                              # xlarge-lstorage             24    58         2383        2000         35000
                                                              # xlarge-xlstorage            24    58         4643        2000         35000

$vcsa_config.new_vcsa.network.ip_family = "ipv4"
$vcsa_config.new_vcsa.network.mode = "static"
$vcsa_config.new_vcsa.network.system_name = ""  # FQDN or IP address for the appliance
$vcsa_config.new_vcsa.network.ip = ""           # Static IP address
$vcsa_config.new_vcsa.network.prefix = ""       # Network prefix length
$vcsa_config.new_vcsa.network.gateway = ""      # Gateway IP address
$vcsa_config.new_vcsa.network.dns_servers = ""  # DNS Server IP Addres

$vcsa_config.new_vcsa.os.password = ""          # Appliance root password
$vcsa_config.new_vcsa.os.ntp_servers = ""       # NTP Server
$vcsa_config.new_vcsa.os.ssh_enable = $false    # Enable SSH Shell
    
$vcsa_config.new_vcsa.sso.password = ""                  # vCenter Single Sign-On administrator password
$vcsa_config.new_vcsa.sso.domain_name = "vsphere.local"  # vCenter Single Sign-On Domain

$vcsa_config.ceip.settings.ceip_enabled = $true  # Join VMware Customer Experience Improvement Program

$vcsa_config | ConvertTo-Json | Set-Content -Path "$($ENV:Temp)\$($vcsa_config.new_vcsa.appliance.name).json"

Invoke-Expression "$($vol.DriveLetter):\vcsa-cli-installer\win32\vcsa-deploy.exe install --no-esx-ssl-verify --accept-eula --acknowledge-ceip $($ENV:Temp)\$($vcsa_config.new_vcsa.appliance.name).json" |Out-Host
$mnt | Dismount-DiskImage |Out-Null

Please leave a comment when you have issues with the deployment. Additional feature requests are also welcome.

Confirmed Images:
VMware-VCSA-all-8.0.1-21560480.iso
VMware-VCSA-all-8.0.0-21457384.iso
VMware-VCSA-all-8.0.0-21216066.iso
VMware-VCSA-all-8.0.0-20920323.iso
VMware-VCSA-all-8.0.0-20519528.iso

<-- Back to PowerShell OVF Helper