I have read in the documentation about VCENTER_VM_FOLDER attribute that is set on VM creation in order to specify the destination folder.
I want to customice that attribute to automatically keep all user VMs on a separate folder without the need of fill this field in every VM creation. Is it posible?
You can set the attribute in the OpenNebula VM Template so it get’s inherited in the VM. You can clone the OpenNebula VM Template and add a different VCENTER_VM_FOLDER and assign it to different users or groups of users.
I would like to define 1 template that will be availabe for any user and then they will instantiate VMs. The point is to automatically (without user intervention) assign VCENTER_VM_FOLDER to the user name or user group.
Understood. Unfortunately there is no out of the box way to achieve this behaviour. It is an interesting feature, could you please open a feature request in the project’s github?
Sure, I’ll open it. In the mean while, could I achieve this by creating a hook script that modifies this parameter?
I have searched in the forum and found one topic talking about hooks that trigger before and after certain event occur, as I understood this is not a feature of opennebula but what I’m not sure is if I can move the newly created VM to a diferent vCenter folder after it is created and maybe running.