Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting properties in the OVF #50

Closed
fdanna opened this issue Aug 4, 2016 · 8 comments
Closed

Setting properties in the OVF #50

fdanna opened this issue Aug 4, 2016 · 8 comments
Assignees
Labels

Comments

@fdanna
Copy link

fdanna commented Aug 4, 2016

I'm trying to generate a VMware Virtual Appliances as part of a build system. When the Appliance is in the user's hands and being deployed (in a vSphere Environment) I want the user to be able to set networking and root password. I see that you can set properties and I've tried this, but they are not exposed when the Appliance is deployed. Comparing what COT generates and what VMware generates from VMware Studio, I noticed the code generated is not the same:

VMware Studio

Network 1 IP Address The IP address for this interface. Leave blank if DHCP is desired. Network 1 Netmask The netmask or prefix for this interface. Leave blank if DHCP is desired.

COT

<ovf:Property ovf:key="oe.IP" ovf:type="string" ovf:value="0.0.0.0" />

Is there a way in COT to generate lines with the userConfigurable attribute and no value (assuming that's the problem)?

@glennmatthews
Copy link
Owner

Thanks for the report! I'll start to look into this, but would you be able to provide:

  1. The COT command you are using to try and set the properties
  2. The PropertySection from the COT-generated OVF.
  3. The PropertySection from the VMware Studio-generated OVF.

Thanks!

@glennmatthews glennmatthews self-assigned this Aug 4, 2016
@fdanna
Copy link
Author

fdanna commented Aug 4, 2016

DOH! I didn't realize the code I pasted was converted. Guess I'm showing my newbie skin.

COT

 <ovf:Property ovf:key="oe.IP" ovf:type="string" ovf:value="0.0.0.0" />

Studio

 <Property ovf:key="DNS" ovf:userConfigurable="true" ovf:type="string">
        <Label>DNS</Label>
        <Description>The domain name servers for this VM (comma separated). Leave blank if DHCP is desired.</Description>
      </Property>
      <Property ovf:key="ip0" ovf:userConfigurable="true" ovf:type="string">
        <Label>Network 1 IP Address</Label>
        <Description>The IP address for this interface. Leave blank if DHCP is desired.</Description>
      </Property>
      <Property ovf:key="netmask0" ovf:userConfigurable="true" ovf:type="string">
        <Label>Network 1 Netmask</Label>
        <Description>The netmask or prefix for this interface. Leave blank if DHCP is desired.</Description>
      </Property>
    </ProductSection>

The command is: cot edit-properties StorageAgent.ovf -p oe.IP=1.2.3.4

I tried calling it different things, but nothing shows up at deploy time. Can't leave the value blank either. I can't seem to find any answers and I appreciate your help!!!

@glennmatthews
Copy link
Owner

Thanks! Looks like I forgot to have COT add the ovf:userConfigurable attribute when creating a new property. I'll fix this.

@fdanna
Copy link
Author

fdanna commented Aug 4, 2016

You've made my week! Is there a way for me to create the key pair such that the value will be blank? The value will be filled in by the end user at deploy time. Or from the VMware code, there is no value attribute at all.

@glennmatthews
Copy link
Owner

In the current implementation you can set the value to blank by not specifying anything after the '=' - for example cot edit-properties StorageAgent.ovf -p oe.IP=. I think I'll be able to rework it in my fix for this such that the '=' becomes optional as well so this would become cot edit-properties StorageAgent.ovf -p oe.IP.

@glennmatthews
Copy link
Owner

I have released COT 1.7.0, which includes a fix for this issue. Thanks for the report and please let me know if you encounter any further issues!

@glennmatthews
Copy link
Owner

Whoops, I almost forgot - I'd be happy to add you to the Thanks document if you'd like to provide a name (or just your GitHub user id, if you prefer). Let me know and if so I'll make sure it's included in the next release.

@fdanna
Copy link
Author

fdanna commented Aug 5, 2016

Can't wait to try it out! It's ok, I don't need any recognition :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants