Run OVF Tool With ESXi and
vCenter Target Locations
If you are deploying with the
ovftool
command targeting vCenter
Server, you can use the command line options in the table below to specify
parameters when you deploy.
If you are deploying with the
ovftool
command targeting an
ESXi host, you must “inject” the parameters into the resulting VM when it is
powered on. This is because the ESXi host lacks a cache to store the OVF
parameters, as with vCenter Server. Therefore, you must use the
--X:injectOvfEnv
debug option
with the
--poweron
flag in the command
line if you are deploying a virtual machine targeting ESXi. Example below. (You
can also do this using the Create a VM from an OVA/OVF option in the ESXi host
client, then browse to the .ova file.)
>./ovftool/ovftool\ --name="Cloudvm_2074586_with_inject"\ --X:injectOvfEnv\ --X:logFile=ovftool.log\ --X:logLevel=trivia\ --acceptAllEulas\ -ds=cl-storage-1\ -dm=thin\ --net:'Network 1=VM Network'\ --X:enableHiddenProperties\ --noSSLVerify\ --allowExtraConfig\ --machineOutput\ --prop:vami.netmask0.VMware_vCenter_Server_Appliance=255.255.255.0\ --prop:guestinfo.cis.appliance.net.prefix=24\ --prop:guestinfo.cis.appliance.net.gateway=X.X.X.123\ --prop:guestinfo.cis.appliance.time.tools-sync=True\ --prop:vami.gateway.VMware_vCenter_Server_Appliance=X.X.X.123\ --prop:guestinfo.cis.appliance.net.dns.servers=X.X.X.1,X.X.X.2\ --prop:vami.ip0.VMware_vCenter_Server_Appliance=X.X.X.145\ --prop:guestinfo.cis.appliance.root.passwd=vmware\ --prop:guestinfo.cis.appliance.net.addr=X.X.X.145\ --prop:vami.DNS.VMware_vCenter_Server_Appliance=X.X.X.1,X.X.X.2\ --prop:vami.vmname=vmc-srm-vc10\ --prop:guestinfo.cis.appliance.root.shell=/bin/bash\ --prop:guestinfo.cis.vmdir.first-instance=True\ --prop:guestinfo.cis.appliance.ssh.enabled=True\ --prop:guestinfo.cis.appliance.net.mode=static\ --prop:guestinfo.cis.appliance.net.addr.family=ipv4\ --prop:guestinfo.cis.vmdir.domain-name=vsphere.local\ --prop:guestinfo.cis.vmdir.password=vmware\ --powerOn\ --X:waitForIp\ http://<directory_w/cloudvm>/VMware-vCenter-Server-Appliance-6.0.0.XXXX-XXXXXXX_OVF10.ovf\ vi://root:pwd@vm_name
You will need to replace the variables (IP
addresses, build numbers, root password, and VM names) in the above example
with values from your own system.