VM "Save as Template" enhancements
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
#1 Updated by Stefan Kooman over 3 years ago
- File virtual_machine.rb added
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.