hashicorp / packer-plugin-vmware

Packer plugin for VMware Builder
https://www.packer.io/docs/builders/vmware
Mozilla Public License 2.0
48 stars 42 forks source link

`vmware-vmx`: builder ova import functionality #9

Open ghost opened 3 years ago

ghost commented 3 years ago

This issue was originally opened by @orcutt989 as hashicorp/packer#9228. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.


Feature Description

Take an OVA artifact form vmware-iso or from anywhere else and use it to provision a machine with the vmware-vmx builder.

"source_path": "vmx or ova file path"

Use Case(s)

OVA is smaller than VMX format and would take up less space on the datastore. Vcenter/esx both have functionality to import OVA let's extend this to Packer.

aru-vmw commented 3 years ago

this needs an vmware-ovf builder or vsphere-ovf builder. vmx is an existing virtual machine. ovf is a VM template, ova is zipped ovf. it needs ovftool to import or export ovf from an existing virtual machine.

puetzk commented 3 years ago

It certainly could be a separate builder, but FWIW,the vmware-vmx builder already supports ([format="ova"] and [format="ovf"])(https://www.packer.io/docs/builders/vmware/vmx#format) by calling ovftool to do the export export. It just doesn't have any similar support for recognizing that source_path is a .ova/.ovf and doing the same on import.

So while I'm certainly not an expert on the implementationhere, I don't see any reason it would have to be a separate builder; it seems to me that it would fit the kind of things that vmware-vmx already does with ovftool.

iamjackg commented 8 months ago

I see this was closed as "not planned." Will we never see support for importing OVAs?

Stromweld commented 8 months ago

I would love to see this as well. It's apart of virtualbox plugin so should be able to copy code and do it for vmware https://developer.hashicorp.com/packer/integrations/hashicorp/virtualbox/latest/components/builder/ovf

tenthirtyam commented 8 months ago

More 👍 are needed on the issue origination.

tenthirtyam commented 1 month ago

Question is if this is needed or desktop hypervisors or ESXi. If ESXi, this should be deferred to thr vSphere plugin as support for ESXi in this plugin is deprecated as of v1.1.0 and will be removed in a future release as noted in the README and the v1.1.0 release.