Hi,

I found that vCenter can be deployed with Ansible with IP configuration using the following parameters which are found in the vCenter’s OVF file, which is basically an XML file.

      properties:
        DeploymentOption.value: '{{ vcsa_size }}'
        guestinfo.cis.appliance.net.addr.family: 'ipv4'
        guestinfo.cis.appliance.net.mode: 'static'
        guestinfo.cis.appliance.net.addr: '{{ vcenter_address }}' 
        guestinfo.cis.appliance.net.pnid: "{{ vcenter_hostname }}.{{ domain }}" 
        guestinfo.cis.appliance.net.prefix: '{{ net_prefix }}' 
        guestinfo.cis.appliance.net.gateway: '{{ net_gateway }}' 
        guestinfo.cis.appliance.net.dns.servers: '{{ dns_servers }}' 
        guestinfo.cis.appliance.root.passwd: '{{ vcenter_password }}' 
        guestinfo.cis.ceip_enabled: "False"
        guestinfo.cis.deployment.autoconfig: 'True' 
        guestinfo.cis.vmdir.password: '{{ vcenter_password }}' 
        domain: '{{ domain }}'
        searchpath: '{{ searchpath }}'

And in Ansible the code inject_ovf_env: true needs to be added as well for the IP configuration to be injected during the OVA deployment.

My question is what part in the OVF file determines if an OVA will accept or allow injecting IP related configuration because I have a StarWind OVA as well which does not accept IP configuration.

I opened the OVF file of both and its not clear which part determines this.

Would anyone happen to know this, or where, or what to look for..

Thanks..

1 Spice up

Take a read of this.

Your Starwind OVA may not include:

a <PropertySection> with configurable network parameters
May not have a guest OS script
May not have OVF environment transport enabled, without this, guest OS configurations wont be passed through.

To see if a guest has customization to deploy.

Open the .ovf file inside the OVA and look for a <PropertySection>.
Check for ovf:userConfigurable="true" on relevant properties.
Verify the VM was configured with vApp options and OVF transport before export.
Ensure the guest OS has VMware Tools installed and a script to read guestinfo.ovfEnv.

1 Spice up

Thanks, will go through this, appreciate the link..

1 Spice up

Be sure to come back and mark @Rod-IT’s answer when you’ve got this running. Or, if you need further assistance, come back any time!

1 Spice up

Thanks @Rod-IT this is what is the issue, but does not seem to work, tried everything I could but still didn’t work, checked everything from the links to OVF specifications document..

I manually recreated the OVF from vCenter with the above parameters, still didn’t work.

StarWind has a startup script that reads incoming data which works when manually entering the information during manual deployment via the UI, but does not seem to work when deploying with Ansible..

1 Spice up

Apart from confirming the issue, you’ve not given me much to work with here.

Can you provide some further information or errors.

1 Spice up

Sorry about that..

There are no errors during the OVA deploment with Ansible.

The OVF file has both ovf:userConfigurable="true" and <PropertySection> parameters.

    <ProductSection ovf:class="mgmnt">
    <Info>Management interface network settings</Info>
    <Category>Management interface network settings</Category>
    <Property ovf:userConfigurable="true" ovf:type="string" ovf:key="hostname">
    <Label>Hostname</Label>
    <Description>Hostname of StarWind Appliance</Description>
    </Property>
    <Property ovf:userConfigurable="true" ovf:type="string" ovf:key="ipaddress">
    <Label>IPv4 address for Management interface</Label>
    <Description>IPv4 address for Management interface (example 192.168.1.100)</Description>
    </Property>
    <Property ovf:userConfigurable="true" ovf:type="string" ovf:key="netmask">
    <Label>IPv4 netmask for Management interface</Label>
    <Description>IPv4 netmask for Management interface (example 24)</Description>
    </Property>
    <Property ovf:userConfigurable="true" ovf:type="string" ovf:key="gateway">
    <Label>IPv4 gateway for Management interface</Label>
    <Description>IPv4 gateway for Management interface (example 192.168.1.1)</Description>
    </Property>
    <Property ovf:userConfigurable="true" ovf:type="string" ovf:key="dns">
    <Label>DNS Server for Management interface</Label>
    <Description>DNS Server for Data interface (example 8.8.8.8)</Description>
    </Property>
	  <Property ovf:userConfigurable="false" ovf:type="string" ovf:key="ovfConfigure" ovf:defaultValue="True">
    <Label>Configure OVF Environment</Label>
    </Property>
    </ProductSection>

As in the articles, I deployed the StarWind in vCenter, checked the vAPP options, and it has mgmnt.hostname and other similar guestinfo.ovfEnv values that can be seen in the above code. I exported StarWind from vCenter and tried it again, did not work.

Then I searched for files in StarWind via CLI that might have mgmnt.hostname in it, and found a python file which was the script that captured the values during manual OVA deployment.

I created the startup script file anyway and added it to StarWind as instructed in the article to test it out, that did not work either..

Let me know if you need something specific, and I can provide it..

1 Spice up

In the guest, are VM tools or open VM tools running?

1 Spice up

Its likely to be open vm tools, I’ll recheck and let you know..

1 Spice up

This is what I found..

1 Spice up

Open VM Tools is installed..

1 Spice up