packer-builder-vsphere icon indicating copy to clipboard operation
packer-builder-vsphere copied to clipboard

support for vm export

Open ramonskie opened this issue 6 years ago • 6 comments

i saw a merge request for vm export see https://github.com/vmware/govmomi/pull/813

it would be awesome if this can also be implemented here

ramonskie avatar Aug 21 '17 16:08 ramonskie

Could you provide more details how would you use such feature?

mkuzmin avatar Aug 21 '17 16:08 mkuzmin

for example i'm trying to to create stemcells. a vm that has the latest updates and some software we globally use. so we have a CI that updates the stemcell each week and then reuse that.

and so we can export it to another vsphere environment. or reuse the stemcell so we can build on it further and we don't need to recreate a "stemcell for each vm"

ramonskie avatar Aug 21 '17 16:08 ramonskie

If vSphere environments are linked as datacenters on the same vCenter, you could use the plugin as is. Otherwise - yes, export/import with OVF is the only option I see. This is not a feature I'm going to work in the nearest time. govc could probably do that.

Second use case is different. This builder is incremental, you can set up a hierarchy of images. For example we have 3 layers:

  • base OS image, installed from ISO by old plugin
  • image with installed software
  • image customized for specific environments (keys, caches)

mkuzmin avatar Aug 21 '17 16:08 mkuzmin

Hi @mkuzmin, The usecase is to export the newly created template via packer vsphere builder plugin on vcenter and put it in an artifact repository (to ensure versionning) using post-processors.

MJA1 avatar Jan 17 '18 13:01 MJA1

Anyone found alternative to this?

dkirrane avatar Sep 04 '19 16:09 dkirrane

Would be a nice feature to have. But why not just use a shell-local post-processor and call out to ovftool or govc for export?

fbecker avatar Nov 27 '19 15:11 fbecker