Feature #5506

VM "Save as Template" enhancements

Added by Stefan Kooman over 3 years ago. Updated over 3 years ago.

Status:PendingStart date:10/26/2017
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Resolution: Pull request:

Description

Currently only the option of doing a VM "Save as Template" when the VM has STATE "POWEROFF". Most probably because of all referenced disks being cloned when doing a "Save as Template". I would like to propose the following enhancement options:

- "Save as Template" WITHOUT DISKS (extra checkbox in sunstone)
- "Save as Template" --force existing_template (Overwrite the contents of an already existing Template with this one)
- "Save as Template" --update (variant on above: overwrite existing template REFERENCED in this template: TEMPLATE_ID. So overwrite "TEMPLATE_ID"). --update can be considered to be "linked" to originating template.

Our use case: we have a TEMPLATE for every VM running. If, for some reason or the other, we need to re-instantiate the VM we can do so. Every Template has a fixed IP in it for example, which could be lost if VM's were just re-instantiated / delete-recreated for example.

More general use case: Keep changes in template to golden template VM's in sync with the template

virtual_machine.rb Magnifier (33.4 KB) Stefan Kooman, 10/26/2017 11:38 AM

History

#1 Updated by Stefan Kooman over 3 years ago

Javi Fontan suggested I could hack the the ruby library (mad) disabling the actions checking / cloning the DISKS in the template. This works for CLI. See attached file virtual_machine.rb. This if of course a hack and disables the ability to clone with DISKS, but shows it's possible.

Also available in: Atom PDF