One of my biggest pet peeve when it comes to deploying the VCSA (vCenter Server Appliance) and other OVF/OVA directly onto an ESXi host is the lack of OVF property support. If you have deployed the VCSA before, you are probably aware of the different user experience when deploying to a vCenter Server versus deploying directly to an ESXi host. For those of you who are not familiar, the difference is when you deploy an OVF/OVA that contains custom OVF properties such as the VCSA, you have the ability to provide input to these parameters when deploying to a vCenter Server as seen in the screenshot below.

However, when you deploy to an ESXi host (which is a common use case for greenfield deployments), you will notice that these OVF properties are not available. So, why are the OVF properties missing when deploying to ESXi? The simple answer is that the vCenter Server has a database.

OVF properties work by being injected into the Virtual Appliance through VMware Tools and into the OVF run time environment when a Virtual Appliance is powered on. If a user decides not to power on the Virtual Appliance immediately after deployment, the OVF properties and their values must be persisted. For vCenter Server, we have a database in which we can store the OVF properties, but for ESXi a database does not exists which can properly store the OVF properties and this is why they are not been supported by ESXi.

UPDATE (10/22) - ovftool 4.0 has been officially released. You can download it here.

The good news is that a solution has been in the works and you can actually get a sneak peak and try it out if you have either the recent VMware Fusion 2014 or Workstation 2014 Tech Preview installed. The solution was to add a new ovftool parameter called injectOvfEnv. As the name suggest, it allows the injection of OVF property values into a Virtual Appliance during power on. I have known about this solution for some time but it was only available in an unreleased version of ovftool. Since VMware Fusion and Workstation automatically bundles ovftool, I was curious if they would include the upcoming version and it looks like they did! πŸ™‚

So now, instead of having to use the VAMI commands to setup the networking for a greenfield deployment with VCSA, you can simply add the following two parameters: --X:injectOvfEnv --powerOn along with the list of OVF property values.

I have created a simple shell script called to demonstrate this functionality and you can easily create an equivalent BAT or PowerShell script for a Windows environment. You will need to modify the variables in the script to match your environment and they should all be pretty self-explanatory.

Here is an example output of running the script and deploying the VCSA directly onto my Mac Mini running ESXi 5.5u1:

Once the VCSA is fully booted up, we can take a look using the vSphere C# Client that it contains the IP Network information we provided through the OVF properties:

As you can see this new version of ovftool works without requiring anything special on the ESXi host and should technically work for the last several releases. I think this is a pretty good reason to check out the latest Fusion and Workstation Tech Previews πŸ™‚

37 thoughts on “How to finally inject OVF properties into VCSA when deploying directly onto ESXi?

  1. Amusingly I black-boxed this yesterday using a slightly different methodology:

    I set guestinfo.ovfEnv with the finished OVF Environment XML blob properly escaped in the .vmx file, then performed a vim-cmd vmsvc/reload operation, prior to first power-on of the VCSA. I didn’t come across your post until this morning. πŸ™‚

    Proper escaping means:
    double-quote is represented as vertical-pipe-character number-two number-two
    next line is represented as vertical-pipe-character number-zero uppercase-A

    -that JMills πŸ™‚

  2. Hello William
    Can you tell me what version of ovftool you used for this –X:injectOvfEnv –powerOn options ?

    • ovftool 4.0, this was mentioned in the article πŸ™‚ You can get it by downloading either the latest Tech Preview of VMware Workstation / Fusion, again this is mentioned in the article

      • Hi William
        Another question. Can we inject a new property into OVF using this method say for example something like following:


        In your example, you have involved preexisting (??) properties like –prop:vami.netmask0.VMware_vCenter_Server_Appliance but I have a different use-case where the property I want to inejct is something that I have created myself.

        The reason I ask is that when I tried above with ovftool command, I got this error :

        – OVF property with key: ‘Property1’ does not exists.
        Completed successfully

        I am using the latest tools as can be seen here on my Ubuntu Box:

        [[email protected]~] CLIENT $ ovftool –version
        VMware ovftool 4.0.0 (build-1944234)

        Any help in this regard would be deeply appreciated.

        • Did you add this custom property in to the OVF? because the error message states you do not have a property called “Property1”, so if that’s the case the error is expected πŸ™‚

          • Hi William
            Thanks for replying. That’s actually the point. I want to build a generic OVF that can be deployed for both Standalone vSphere Server (because Property field is not supported ) and vCenter server. If I add the property, the OVA can no longer be deployed on a standalone vSphere server. And so I am not adding it, but rather while deploying it on vCenter, I am injecting the same property using ovftool. Is that something supported in 4.0 or am I taking it wrong i.e. you need to have the property in ovf, and just inject the value of it during deployment, instead of injecting the property itself.


  3. Hello,

    Error: Failed to read from file: VMware-vCAC-Appliance-
    Completed with errors

    I’ve check the path to ovftool and it’s valid (same path that yours):
    VMware ovftool 4.0.0 (build-1941623)

    My ESXo (5.5) it’s up and running (I’ve checked the IP address and authentication as well – working fine) and I’ve tried with others OVAs (vcac identity and etc) and the OVA files aren’t corrupted in fact I’ve tested then as well (they are deploying, just fine and the MD5 hash is the same).

    I need to assign hostname and IP configurations to vCAC Identity in Deploying time, then I’ve found your tutorial…

    Thanks from Brazil, your blogs is awesome and very useful indeed!

  4. Hi William

    Good post… I used this info and made a quick and dirty powershell script…

    $ovftool=”C:\Program Files\VMware\VMware OVF Tool\ovftool.exe”
    $vcenternetwork= “VM Network”

    $option = ”
    $option += ” –X:injectOvfEnv –powerOn”
    $option += ” –prop:vami.ip0.VMware_vCenter_Server_Appliance=”+$vcenteripAddress
    $option += ” –prop:vami.netmask0.VMware_vCenter_Server_Appliance=”+$vcenternetmask
    $option += ” –datastore=”+$vcenterdatastore
    $option += ” –prop:vami.DNS.VMware_vCenter_Server_Appliance=”+$vcenterDNS
    $option += ” –prop:vami.gateway.VMware_vCenter_Server_Appliance=”+$vcentergateway
    $option += ” –prop:vami.hostname=”+$vcenterhostname
    $option += ” –diskMode=”+$vcenterdiskmode
    $option += ” –acceptAllEulas ”
    $option += ” –network=”+'”‘+$vcenternetwork+'”‘
    $option += ” “+$vcenterovfile
    $option += ” vi://root:[email protected]”+$vcenterhost

    & cmd /c ‘”‘$ovftool'”‘$option

  5. Instead of using ovftool to export a specific vm in a datastore to a template, is there a way to feed the ovftool a wildcard so that it automatically exports all the VMs in a specified datastore to OVFs?

  6. Hi William,

    Thanks for the good post. For some reasons I cannot use the bash script to completes this. I am doing this manually by running below command. And it gives me the key does not exist in VOF error. Could you please help t understand this and make it work?

    [[email protected] ~]# /vmfs/volumes/datastore1/vmware-ovftool/ovftool -dm=thin -ds=datastore1 -n=myvmhost –X:injectOvfEnv –powerOn –acceptAllEulas –ipAllocationPolic
    y=fixedPolicy –prop:vami.gateway.VMware_vCenter_Server_Appliance= –prop:vami.ip0.VMware_vCenter_Server_Appliance= –prop:vami.netmask0.VMwar
    e_vCenter_Server_Appliance= /vmfs/volumes/datastore1/vmcm2.3.4.5.ova vi://root:[email protected]
    Opening OVA source: /vmfs/volumes/datastore1/vmc3.409.ova
    The manifest validates
    Opening VI target: vi://[email protected]:443/
    Deploying to VI: vi://[email protected]:443/
    Transfer Completed
    Powering on VM: myvmhost
    Task Completed
    – OVF property with key: ‘vami.gateway.VMware_vCenter_Server_Appliance’ does not exists.
    – OVF property with key: ‘vami.ip0.VMware_vCenter_Server_Appliance’ does not exists.
    – OVF property with key: ‘vami.netmask0.VMware_vCenter_Server_Appliance’ does not exists.
    Completed successfully

  7. For those of us with complex passwords there is a need to change the special characters into Hex ASCII codes that work as part of a URL. For example, if you have a “!” in your password it needs to be “%21” in the script.

  8. Hi Again William

    Is it possible to export the VM with the (in other words include) extended properties from the ESXi host .

    For example I have done the following :
    1. Extract the OVA file from VCSA installation CD.
    2. Deploy it to ESXi Host using c# client.
    3. Added the guestinfo lines to the .vmx file.
    Did not power on.

    After this in order to try have a master template I exported the VM to a ,OVF using the c# client.

    Sadly the exported template does not contain the extended settings.

    So this begs the question … How can these settings be bundled into the deployed .OVF ?
    Should I be using OVFTOOL from the command line ? And if so how ?

    I assume the same would happen when exporting from with Workstation using the gui ?

    I have seen your posts for using (–X:injectOvfEnv –powerOn along with the list of OVF property values.)
    BUT what’s not clear is how to use this to set the guestinfo properties as I see you too used the VAMI properties.

    I would really appreciate any tips with this.


  9. Just a few tips for anyone running this with vsphere 6 update 1, and using ovftool 4.1 :
    The command :
    C:\Program Files\VMware\VMware OVF Tool>”c:\Program Files\VMware\VMware OVF Tool
    \ovftool.exe” –acceptAllEulas –skipManifestCheck –X:injectOvfEnv –powerOn –
    -diskMode=thin -ds=datastore1 -n=vcva01 –prop:vami.hostname=vcva01.vmware.local
    –prop:vami.DNS.VMware_vCenter_Server_Appliance= –prop:vami.gatew
    ay.VMware_vCenter_Server_Appliance= –prop:vami.ip0.VMware_vCenter_Se
    rver_Appliance= –prop:vami.netmask0.VMware_vCenter_Server_Applianc
    e= f:\test\vmware-vcsa.ova “vi://root:[email protected]@

    The ovftool output:

    Opening OVA source: f:\test\vmware-vcsa.ova
    The manifest does not validate
    Enter login information for target vi://
    Username: root
    Password: ********
    Opening VI target: vi://[email protected]:443/
    Deploying to VI: vi://[email protected]:443/
    Transfer Completed
    Powering on VM: vcva01
    Task Completed
    – OVF property with key: ‘vami.hostname’ does not exists.
    – Skipping monitor as the –X:waitForIp option is not given.
    Completed successfully

    @ William ..NOTICE the vami.hostname error ?
    Is there a fix/solution for this ?

    And after final installation on the appliance screen :

    Root password is not set
    vmdir.password is not set …aborting intsallation

    Hope that helps anyone battling here in some way πŸ˜‰

    • Did you even look at the documentation/references I mentioned in my last reply? From your comments, it does not seem so.

      In fact, in the ovftool documentation there’s an explicit example on how to properly deploy VCSA 6.x directly to ESXi using ovftool not to mention I’ve written several articles with explicit details as well. I’ve already mentioned in my last post on how to obtain OVF properties of a given OVF/OVA and there is also some details about this in the ovftool docs. I would really encourage you to spend some time actually going through and reading the articles …

  10. It did not work for me. I got the following errors. Static IP address is not reflected after VM is powered on.

    – OVF property with key: ‘vami.gateway.VMware_vCenter_Server_Appliance’ does not exists.
    – OVF property with key: ‘vami.hostname’ does not exists.
    – OVF property with key: ‘vami.ip0.VMware_vCenter_Server_Appliance’ does not exists.
    – OVF property with key: ‘vami.netmask0.VMware_vCenter_Server_Appliance’ does not exists.

  11. Hi Willam,

    Thanks for this useful article it is really helpful for newbie like me in vmware world.

    I am successfully able to delpoy an ova package using this tool.

    Pardon my ignorance if this is a basic question:
    Is there any way I can get the IP of the deployed ova using the ovftool … I have searched a lot but not able to find any solution.

    • I assume you’re asking for DHCP, given Static, you would know the address πŸ™‚

      You can specify –X:waitForIp which will wait for VMware Tools to load up and it’ll print out the IP Address

  12. How do I figure out what my “VMware_vCenter_Server_Appliance” value is? I had read that it was the Instance ID when I run the ovftool with no parameters, but that is not the answer. How can I find this value?

    Also is there a way to overwrite existing VMs, or delete existing VMs through this tool?


  13. the IP is getting assigned with the IPv6 address , eventhough i have specified various options like –ipProtocol=IPv4 and IPAllocationPolicy as fixed.Please let me know

  14. Hi William … just came across your blog. I’m hopeful this will be the solution that works for me. I’m running a ESXI 5.5 and had created a OVA out of one of the Ubuntu guest VMs. Now I’m trying to deploy the ova back on to this esxi using your example script. However, like many others who commented here, I too get errors similar to “OVF property with key: β€˜vami.ip0.VMware_vCenter_Server_Appliance’ does not exists.”. The ova does deploy but the IP address, gateway etc. do not change. I ran just “$ovftool ubuntuserver.ova” which probes the properties and there are no such properties “vami.ip0…..” listed. I have also added in –ipAllocationPolicy=fixedPolicy as well hoping to set the eth0 to static IP address.

    If you get any time, would appreciate a solution to this. Thanks.

    – ESXI 5.5
    – VSphere Client 5.5 (used for exporting existing VM to ova)
    – ovftool 4.2 running on linux VM in my laptop.

    ovftool –disableVerification –noSSLVerify \
    –name=myVM \
    –X:injectOvfEnv –powerOn \
    –acceptAllEulas \
    –datastore=datastore1 \
    –diskMode=thin \
    –network=”VM Network” \
    –ipAllocationPolicy=fixedPolicy \
    –prop:vami.hostname=myVM \
    –prop:vami.gateway.VMware_vCenter_Server_Appliance=10.x.x.254 \
    –prop:vami.ip0.VMware_vCenter_Server_Appliance=10.x.x.150 \
    –prop:vami.netmask0.VMware_vCenter_Server_Appliance= \
    –X:waitForIp \
    U1404_Server.ova \

    …. …
    Deploying to VI: vi://[email protected]…..esxi server …. :443/
    Transfer Completed
    The manifest validates
    Powering on VM: myVM
    Task Completed
    – OVF property with key: ‘vami.gateway.VMware_vCenter_Server_Appliance’ does not exists.
    – OVF property with key: ‘vami.hostname’ does not exists.
    – OVF property with key: ‘vami.ip0.VMware_vCenter_Server_Appliance’ does not exists.
    – OVF property with key: ‘vami.netmask0.VMware_vCenter_Server_Appliance’ does not exists.
    – No manifest entry found for: ‘U1404_Server-disk1.vmdk’.
    Completed successfully

      • I’m confused … what does the vami.*.VMware_vCenter have to do with your Ubuntu VM, if I understand correctly?

        Those OVF properties are specific to the VMware VCSA appliance that we ship, its not generic for any VM you export

  15. Hello William
    Have tried out a few more things since my last query. Had a ova of a ubuntu VM with open-vm-tools installed.

    Attempt 1: I try to deploy it with

    The VM deploys, but I get the error:
    – OVF property with key: ‘testprop’ does not exists.

    Inside the guest VM, I verify with “vmtoolsd –cmd “info-get testprop” and it says “invalid key”. So clearly nothing was sent across to the VM.

    This is similar to what many others are reporting on this blog. In one of your responses to Mr. Rishab, you asked “Did you add this custom property in to the OVF?”. Ok, so I need to add this property to the OVF. After lots of googling, finally found the COT tool to edit OVF/OVA. I add the property to the OVA:
    cot edit-properties ubuntuserver.ova -p testprop=1234 –user_configurable

    It now correctly shows the injected property in the ova file:
    #cot info ubuntuserver.ova

    “1234” <– inserted property shows up.

    Attempt 2: I deploy the ova (with the injected property) with same ovftool command. This time no VM deploys and I get error:
    Error: OVF Package is not supported by target:
    – Line 148: Unsupported element 'Property'
    Completed with errors

    After lots of googling, I find a post:
    which basically says that we CANNOT deploy OVA's "with custom properties" to ESXI hosts directly. It can only be deployed via vcenter server. But that is also a older (2009) post. Your blog here says we can now indeed deploy such OVA's. So pretty sure I (and others here) must be doing something wrong or understanding the meaning of "properties" differently.

    Thanks for any advice or course-corrections you can suggest.

  16. Hello!

    Great posts William,

    following them and the User Guide seems fine but I want to change the memory size (–memorySize:) and CPU (–numberOfCpus, –coresPerSocket:, etc) that come by default in the .ova file but when the VM is created it has those default values.

    Best Regards


  17. Hey William,

    I work for a network security company and we build a product in appliance format. Right now the appliance is in an OVA format and once deployed we have to carry out a few manual steps. I would like to automate the process to do the same.
    I have edited the OVA file to ask for the parameters and they work perfectly when i deploy the new OVA.
    Now i have created a shell script that I plan to run to automate those first time configuration steps.

    2 questions for you
    How can I enable OVF ENV properties for VMware Tools to access them? right now after deployment, I have to manually enable them in the VM properties.
    How can I run this shell script just after the appliance is deployed and never again? Our Appliance is a Ubuntu 16.04 64 bit VM with our product running on top of that.


  18. after installing VM on esxi using ovftool, can we retrieve properties of that vm. i am retrieving but i didn’t get it.

    vmprop = (it returns “None”)

    but if i installed VM through vcenter it will returns properties

  19. Maybe we install vCSA via using ‘./vcsa-deploy install –accept-eula –no-esx-ssl-verify
    You can find the json template file in the vCSA installation ISO.

Thanks for the comment!

This site uses Akismet to reduce spam. Learn how your comment data is processed.