reinstantiate vm as a command
there is possiblity to resubmit vm - which will recreate the vm, but from the template state that was at the moment of first instantiation.
but there are cases, when you need to start the same machine (usualy with persistent volumes) with the uptodate state of the vm template. i call it reinstantiate. this will get the id of the template it was originaly started, shutdown the vm and then instantiate the vm again with current template. because this could be dangerous for non-persistent vms/images it is nice to have the possibility to warn user to not reinstantiate vm if it has some nonpersistent volumes.
it could be done with simple scripting like this one: https://gist.github.com/jhrcz/3a04577e8c1d18014d33
but it would be nice to have it as a easy to use function in opennebula (oned - onevm command) and in sunstone.
some cool thing would be to keep the vmid like the resubmit does - but it depends on the thing how you look on it (reinstantiated vm could be very different from the original one - so keeping the vmid could be a question)
#2 Updated by Jan Horacek about 6 years ago
I didn't think cloning the template ... just get the ID it was originaly started from, shutdown and delete the vm and instantiate it again (instantiate from the template it was originaly started from).
The cloning of a VM you mentioned is different thing. (nice to see this as a possible feature too.)