OVF Template for VMware Cloud Director 10.2
The following PowerShell snippet can be used to deploy VMware Cloud Director 10.2 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
$ovf = 'Z:\images\VMware\vCloud Director\VMware_Cloud_Director-10.2.0.5190-17029810_OVF10.ova' # Path to OVA File $ovfConfig = Get-OvfConfiguration $ovf $ovfConfig.DeploymentOption.Value = "primary-small" # Deployment Configuration (primary-small|primary-large|standby-small|standby-large|cell) # Primary - small: Primary appliance, configured with 12 GB of RAM and 2 vCPUs. # Primary - large: Deploy Primary appliance, configured with 24 GB of RAM and 4 vCPUs. # Standby - small: Deploy Standby appliance, configured with 12 GB of RAM and 2 vCPUs. Note: A Primary must be deployed and running before a Standby appliance can be deployed. # Standby - large: Deploy Standby appliance, configured with 24 GB of RAM and 4 vCPUs. Note: A Primary must be deployed and running before a Standby appliance can be deployed. # vCD Cell: Deploy a vCD Cell Application appliance, configured with 8 GB of RAM and 2 vCPUs. Note: A Primary must be deployed and running before a vCD Cell Application appliance can be deployed. $ovfConfig.NetworkMapping.eth0_Network.Value = "" # Network for vCloud Director UI and API access. $ovfConfig.NetworkMapping.eth1_Network.Value = "" # Network for accessing internal services, including the embedded PostgreSQL DB service. $ovfConfig.vcloudapp.VMware_vCloud_Director.ntp_server.Value = "" # NTP Server $ovfConfig.vcloudapp.VMware_vCloud_Director.varoot_password.Value = "" # This will be used as an initial password for the root user account. Password must be changed to a more secure one after first login. # Requirements: Minimum 8 characters in length / Minimum 1 uppercase character / Minimum 1 lowercase character / Minimum 1 numeric digit / Minimum 1 special character $ovfConfig.vcloudapp.VMware_vCloud_Director.expire_root_password.Value = $true # Expire Root Password Upon First Login. The OVF deployment wizard can not validate the root password criteria. If you are sure the password meets the stated criteria, uncheck this to skip expiring the password on upon first boot. ($true or $false) $ovfConfig.vcloudapp.VMware_vCloud_Director.enable_ssh.Value = $false # Enable SSH root login ($true or $false) $ovfConfig.vcloudnet.VMware_vCloud_Director.routes0.Value = "" # Optional: eth0 Network Routes $ovfConfig.vcloudnet.VMware_vCloud_Director.routes1.Value = "" # Optional: eth1 Network Routes # You may need to provide static routes in case you want to reach hosts over a non-default gateway route. In most situations this setting can remain empty. # Contents should be a comma-separated list of route specifications consisting of Gateway IP (required) followed optionally by a CIDR network specification (Prefix/Bits). # Ex: 172.16.100.253 172.16.96.0/19, 172.16.100.253 192.168.100.0/24 $ovfConfig.vami.VMware_vCloud_Director.gateway.Value = "" # Default Gateway - The default gateway address for this VM. Leave blank if DHCP is desired. $ovfConfig.vami.VMware_vCloud_Director.domain.Value = "" # Domain Name - The domain name of this VM. Leave blank if DHCP is desired. $ovfConfig.vami.VMware_vCloud_Director.searchpath.Value = "" # Domain Search Path - The domain search path (comma or space separated domain names) for this VM. Leave blank if DHCP is desired. $ovfConfig.vami.VMware_vCloud_Director.DNS.Value = "" # Domain Name Servers - The domain name server IP Addresses for this VM (comma separated). Leave blank if DHCP is desired. $ovfConfig.vami.VMware_vCloud_Director.ip0.Value = "" # eth0 Network IP Address - The IP address for this interface. Leave blank if DHCP is desired. $ovfConfig.vami.VMware_vCloud_Director.netmask0.Value = "" # eth0 Network Netmask - The netmask or prefix for this interface. Leave blank if DHCP is desired. $ovfConfig.vami.VMware_vCloud_Director.ip1.Value = "" # eth1 Network IP Address - The IP address for this interface. Leave blank if DHCP is desired. $ovfConfig.vami.VMware_vCloud_Director.netmask1.Value = "" # eth1 Network Netmask - The netmask or prefix for this interface. Leave blank if DHCP is desired. $VMName = "" # Virtual Machine Display Name $vmhost = "" # ESXi Host to deploy the VM $datastore = "" # Datastore to deploy the VM $diskStorageFormat = "Thick" # Thin or Thick provisionig of virtual disks $vm = Import-VApp -Source $ovf -OvfConfiguration $ovfconfig -Name $VMName -VMHost (Get-VMHost -Name $VMHost) -Datastore $datastore -DiskStorageFormat $diskStorageFormat #$vm | Start-VM # Uncomment to power on the VM after creation.
Please leave a comment when you have issues with the deployment. Additional feature requests are also welcome.