vagrant-vsphere icon indicating copy to clipboard operation
vagrant-vsphere copied to clipboard

Ability to convert newly created VM into a template

Open morganatkins24 opened this issue 6 years ago • 1 comments

Background

As part of my workflow it would be ideal for Vagrant to clone a Template, provision it, and then produce a new vSphere Template. Currently 'vagrant-vsphere' only allows the creation of a new VirtualMachine on vSphere.

Proposal

'vagrant-vsphere' should have an option to convert the VirtualMachine to a vSphere Template after the provisioning is finished.

Proposed Workflow

A new configuration parameter is added: vsphere.convert_to_template = true / false Option should default to false

morganatkins24 avatar Aug 17 '18 20:08 morganatkins24

You might want to look into using Packer for this as Packer is designed to make templates. Vagrant is supposed to provision instances of templates.

Specifically take a look at https://github.com/jetbrains-infra/packer-builder-vsphere to build a VM (from another VM/Template even) then use https://github.com/hashicorp/packer/blob/master/website/source/docs/post-processors/vsphere-template.html.md to convert the output to a template.

DamonStamper avatar Dec 18 '18 21:12 DamonStamper