PowerShell OVF Helper

<-- Back to PowerShell OVF Helper

OVF Template for VMware vSphere Integrated Containers

The following PowerShell snippet can be used to deploy VMware vSphere Integrated Containers 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
ovf-VMware-vSphere-Integrated-Containers.ps1:
$ovf = 'Z:\images\VMware\vSphere 7.0\vic-v1.5.5-7767-a7161963.ova' # Path to OVA File
$ovfConfig = Get-OvfConfiguration $ovf
$ovfConfig.NetworkMapping.Network.Value = ""  # Destination network (Portgroup)

$ovfConfig.appliance.root_pwd.Value = ""              # The initial password of the root user. Subsequent changes of password should be performed in operating system. (8-128 characters)
$ovfConfig.appliance.permit_root_login.Value = $true  # Specifies whether root user can log in using SSH. ($true or $false)
$ovfConfig.appliance.tls_cert.Value = ""              # Optional: Paste the content of the PEM encoded certificate file. Leave blank for a generated self-signed certificate.
$ovfConfig.appliance.tls_cert_key.Value = ""          # Optional: Paste the content of the unencrypted PEM encoded certificate key file. Leave blank for a generated key.
$ovfConfig.appliance.ca_cert.Value = ""               # Optional: Paste the content of the PEM encoded CA certificate that signed the TLS Certificate. Leave blank for a generated self-signed certificate.
$ovfConfig.appliance.config_port.Value = "9443"       # Specifies the port on which the Getting Started Page and Appliance Configuration will be published.
$ovfConfig.network.ip0.Value = ""                     # The IP address for this interface. Leave blank if DHCP is desired.
$ovfConfig.network.netmask0.Value = ""                # The netmask or prefix for this interface. Leave blank if DHCP is desired.
$ovfConfig.network.gateway.Value = ""                 # The default gateway address for this VM. Leave blank if DHCP is desired.
$ovfConfig.network.DNS.Value = ""                     # The domain name server IP Addresses for this VM (space separated). Leave blank if DHCP is desired.
$ovfConfig.network.searchpath.Value = ""              # The domain search path (space separated domain names) for this VM. Leave blank if DHCP is desired.
$ovfConfig.network.fqdn.Value = ""                    # The fully qualified domain name of this VM. Leave blank if DHCP is desired.
$ovfConfig.network.ntp.Value = ""                     # The NTP server IP Addresses for this VM (space separated). Leave blank if DHCP is desired.
$ovfConfig.network.http_proxy.Value = ""              # Optional: The HTTP Proxy setting: http://PROXY_SERVER:PORT or http://USER:PASSWORD@PROXY_SERVER:PORT. Leave blank if no http proxy is required.
$ovfConfig.network.https_proxy.Value = ""             # Optional: The HTTPS Proxy setting: http(s)://PROXY_SERVER:PORT or http(s)://USER:PASSWORD@PROXY_SERVER:PORT. Leave blank if no https proxy is required.
$ovfConfig.network.no_proxy_list.Value = ""           # Optional: Bypass proxy settings for these hosts and domains (comma separated). Leave blank if no proxy is required.
$ovfConfig.registry.registry_port.Value = "443"       # Specifies the port on which registry will be published.
$ovfConfig.registry.notary_port.Value = "4443"        # Specifies the port on which Notary will be published.
$ovfConfig.registry.gc_enabled.Value = $false         # When setting this to true, registry performs garbage collection everytime it boots up. ($true or $false)
$ovfConfig.management_portal.management_portal_port.Value = "8282"  # Specifies the port on which Management Portal will be published.
$ovfConfig.default_users.create_def_users.Value = $true             # Create Example Users. ($true or $false)
$ovfConfig.default_users.def_user_prefix.Value = "vic"              # Username prefix to be used to create Example Users for vSphere Integrated Containers.
$ovfConfig.default_users.def_user_password.Value = "VicPro!23"      # Password to be used to create Example Users. The password must follow the rules set for vSphere. Default: "VicPro!23"
$ovfConfig.syslog_server.syslog_srv_host.Value = ""                 # Optional: The IP address or host name for remote syslog sever. Leave blank if no syslog is desired.
$ovfConfig.syslog_server.syslog_srv_protocol.Value = "UDP"          # Protocol used by syslog server to upload logs (the default protocol will be UDP, if you select TCP, please make sure the syslog server supports it.)
$ovfConfig.syslog_server.syslog_srv_port.Value = "514"              # Remote syslog server port (default port is 514)

$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.

Confirmed Images:
vic-v1.5.5-7767-a7161963.ova
vic-v1.5.4-7589-e70af4fe.ova