OVF Template for VMware vCenter Server 7.0
The following PowerShell snippet can be used to deploy VMware vCenter Server 7.0 using PowerShell. The VMware.PowerCLI module is required to use the script.
- Copy the snippet to your favorite editor
- Change the path to your local OVA file
- Fill out the variables
- Connect to a vCenter Server using the Connect-VIServer command
- Run the script
$iso = '.\VMware-VCSA-all-7.0.0-15952498.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 12 579 10 100
# tiny-lstorage 2 12 1992 10 100
# tiny-xlstorage 2 12 4279 10 100
# small 4 19 694 100 1000
# small-lstorage 4 19 2046 100 1000
# small-xlstorage 4 19 4304 100 1000
# medium 8 28 908 400 4000
# medium-lstorage 8 28 2140 400 4000
# medium-xlstorage 8 28 4468 400 4000
# large 16 37 1358 1000 10000
# large-lstorage 16 37 1958 1000 10000
# large-xlstorage 16 37 4518 1000 10000
# xlarge 24 56 2283 2000 35000
# xlarge-lstorage 24 56 2383 2000 35000
# xlarge-xlstorage 24 56 4620 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-7.0.3-21477706.iso
VMware-VCSA-all-7.0.3-21290409.iso
VMware-VCSA-all-7.0.3-20990077.iso
VMware-VCSA-all-7.0.3-20845200.iso
VMware-VCSA-all-7.0.3-20395099.iso
VMware-VCSA-all-7.0.3-20150588.iso
VMware-VCSA-all-7.0.3-20051473.iso
VMware-VCSA-all-7.0.3-19717403.iso
VMware-VCSA-all-7.0.3-19480866.iso
VMware-VCSA-all-7.0.3-19234570.iso
VMware-VCSA-all-7.0.3-18778458.iso
VMware-VCSA-all-7.0.3-18700403.iso
VMware-VCSA-all-7.0.2-18455184.iso
VMware-VCSA-all-7.0.2-18356314.iso
VMware-VCSA-all-7.0.2-17958471.iso
VMware-VCSA-all-7.0.2-17920168.iso
VMware-VCSA-all-7.0.2-17694817.iso
VMware-VCSA-all-7.0.1-17491101.iso
VMware-VCSA-all-7.0.1-17327517.iso
VMware-VCSA-all-7.0.1-17004997.iso
VMware-VCSA-all-7.0.1-16860138.iso
VMware-VCSA-all-7.0.0-16749653.iso
VMware-VCSA-all-7.0.0-16620007.iso
VMware-VCSA-all-7.0.0-16386292.iso
VMware-VCSA-all-7.0.0-16189094.iso
VMware-VCSA-all-7.0.0-15952498.iso