When I modify user’s parameters (e.g. SSH keys, the CRYPTED_PASSWORD attribute), is there any way how to recreate the context CDROM without deleting the VM and deploying it again from the template?
I tried “Undeply hard” and start the VM again - the VM with non-persistent disk returned to its original state, but the contextualization CDROM contained the original content (i.e. old SSH keys). With “Delete recreate” the situation was the same.
Is it possible to modify the context at all after the VM is deployed? Thanks!
I have never tried it myself but if you manually destroy the VM out of band of OpenNebula, create the ISO image and replace it in the cached directory, then onevm resume the VM, it should pick up the new context. Very hacky but it would work.
Well, it would be sufficient to just shutdown the machine, replace the ISO, and boot it again - the deployment directory is AFAIK not recreated during shutdown/resume cycle. This is however not what am I looking for. I need something that works for ordinary users, without access to the physical infrastructure.
I think the underlying problem is that the data from the template is fixed during instantiation, and it is not updated ever since, including the variable substitution ($USER[CRYPTED_PASSWORD], for example). So in fact the ISO probably gets recreated during delete/recreate cycle, but from the same old data.
Just a quick note, in 5.0 this has been implemented. There is a new
updateconf operation for VMs in poweroff-like states. You can take a look
to the CLI interface to get an overview of the new feature:
it looks as a nice start. However, I suppose that the notion of CRYPTED_PASSWORD attribute of the VM being in fact generated from $USER[CRYPTED_PASSWORD] user attribute is still not there. So there is probably no simple way of telling the VM “update the context according to current user settings, whatever it is”. I am thinking about lost ssh key or lost password, and having to fix all my VMs.
Anyway, it looks that ONe 5.0 will get many features I would like to use. In which phase the development is? Would it be feasible to test in on my cluster? Are there e.g. nightly builds or something? I don’t know ruby enough to do development, but I might help with testing, provided the code is at least marginally usable/stable (stable as in “in case of problems, just revert to the yesterday’s build” instead of “we do not expect the code to build at all for at least the next three months” :-).
DONE! I’ve just added the parsing of context variables to accommodate your
use case.
Regarding 5.0, we want to enter feature-freeze next week. I’d say there are
many rough edges here and there, so it’s better to wait for the beta do the
testing. Once we get the beta, your testing would be more than welcome