ovftool-deploy

Migrate virtual NIC (vmk) from Standard vSwitch to Distributed vSwitch

This task deploys an OVA appliance utilizing the ovftool which is found in the vmware-tools context container.

This requires the JSON configuration to be described in the ova/param-json Param to build up the ovftool command line options. govc import.spec (also in the vmware-tools context container) can be used to generate the JSON template for a given OVA file.

The import.spec formats the JSON structure in an inconsistent way from how OVFTool command line flags are operated. As a consequence, mapping of arguments must be performed in a lot of cases. It is impossible to map all argument possibilities without seeing how they are output by OVFTool in conjunction with govc import.spec. Additionally, ovftool can be used to determine what the OVF properties are for customization. Examples:

  • govc import.spec VMware-Cloud-Builder-4.1.0.0-16961769_OVF10.ova
  • or ovftool --schemaValidate VMware-Cloud-Builder-4.1.0.0-16961769_OVF10.ova

The GoVC command produces a JSON data structure which should be valid for use with the ovo/param-json Param definition.

This tool attempts to map as many values as possible. Where the mappings don't exist for your use case, there are some options available to customize the OVFTool command line flags.

  1. Use the Param ova/ovftool-extra-options to add command line flag overrides - see the Param for more documentation.
  2. For more advanced/flexible use cases in the field, create a Shell script template defined by the Param ova/ovftool-deploy-more-mapping-template

The template override (option 2) is a much more advanced use case. It utilizes Golang Templating to parse the JSON data structure options, and remap them to OVFTool arguments. Please review the Template script that this Task calls for details.

Warning

If you use the template override option, your template must absolutely conform to the exact white space formatting, golang templating, etc rules as is used in this template. Review the shell variable build up for MORE in the template.

Use of the command ovftool --help can help map OVFtool arguments to the JSON spec template structure.

Note

If you encounter any new mappings that should be in this Task, please contact RackN (support@rackn.com) and provide that information. We would like to make this as complete as possible within the product; so in-the-field template hackery is not necessary.