Packer: Make VMWare OVA output work out of the box

Created on 10 Nov 2015  路  7Comments  路  Source: hashicorp/packer

It would be extremely useful if an option to the output for packer for the vmware builder resulted in an OVA template instead of machine files. I feel like this fits in line with other builders, for example the AWS builder creates an AMI template not a machine.
I know this would likely require a tool to be installed (i.e. ovftool) but I think having this as an option and outputting an error if ovftool isn't installed is acceptable.

This is essentially following on from https://github.com/mitchellh/packer/issues/1593, but is an enhancement request instead of a query/error.

I also think this could help going forward with the whole terraform/atlas pipeline as packer could deploy templates to vcentre or other vmware locations and terraform could spool instances from those templates.

buildevmware-esxi enhancement post-1.0

Most helpful comment

This is really discouraging, OVA is touted as the open format , first of all anyone who knows Virtualbox and Vmware accepts that OVA produced by virtualbox are not automatically supported by VMware ESXi so using Virtualbox builder to create an OVA for VMWare is not going to work. This option in #3859 for OVA is not practical for someone who wants a proper VMWare image which is effectively and annoyingly the industry standard, no idea why Virtualbox does not create compatible OVF for Vmware(maybe it does?). Sure you can bypass this with LAX but this is very unprofessional when you are distributing to a client.

It also makes the OVA import post-processor for Amazon impossible to utilize with Vmware-iso builder. Surely the benefit of this feature to build in Vmware compatible environment and be able to import your OVA to Amazon would be extremely useful (OVA imports in Amazon sadly take forever)

All 7 comments

@yoshiwaan I haven't tried it with the 0.8.6 release but if you build from source (which shows as being version 0.8.7) you can specify "format": "ova" in the builder section of your config. It works for me as long as I specifically add vmx_data options for ethernet0, but that caveat might just be because I'm building against ESXi 6.

@rothwerx Can you elaborate on "vmx_data options for ethernet0"? Maybe this is something we could/should take care of automatically.

@cbednarski Sure, ovftool (4.1.0 (build-2459827)) would fail with "Device 'Network Adapter 1' cannot be exported." until I added the ethernet0 options mentioned in this thread: https://groups.google.com/d/msg/packer-tool/02idn-nuIK4/Ou2tOziWpTQJ

"vmx_data": {
      "ethernet0.present": "TRUE",
      "ethernet0.startConnected": "TRUE",
      "ethernet0.virtualDev": "e1000",
      "ethernet0.networkName": "VM Network",
      "ethernet0.addressType": "generated",
      "ethernet0.generatedAddressOffset": "0",
      "ethernet0.wakeOnPcktRcv": "FALSE"
  },

@rothwerx Looks great, thanks for sharing!

thanks all round

This sounds like a reasonable idea, but isn't something we're targeting for 1.0, so I'm going to close this. Please see the mailing list for more details on 1.0.

This is really discouraging, OVA is touted as the open format , first of all anyone who knows Virtualbox and Vmware accepts that OVA produced by virtualbox are not automatically supported by VMware ESXi so using Virtualbox builder to create an OVA for VMWare is not going to work. This option in #3859 for OVA is not practical for someone who wants a proper VMWare image which is effectively and annoyingly the industry standard, no idea why Virtualbox does not create compatible OVF for Vmware(maybe it does?). Sure you can bypass this with LAX but this is very unprofessional when you are distributing to a client.

It also makes the OVA import post-processor for Amazon impossible to utilize with Vmware-iso builder. Surely the benefit of this feature to build in Vmware compatible environment and be able to import your OVA to Amazon would be extremely useful (OVA imports in Amazon sadly take forever)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Tensho picture Tensho  路  3Comments

brettswift picture brettswift  路  3Comments

sourav82 picture sourav82  路  3Comments

PartyImp picture PartyImp  路  3Comments

Nikoos picture Nikoos  路  3Comments