VM_PREFIX Implementation

Please, describe the problem here and provide additional information below (if applicable) …

I am attempting to change the VM naming convention from the default one-- structure to a custom prefix using the VM_PREFIX as denoted in the user guide (see quote below) but have been unsuccessful getting it to work.

Within the VM template, I have added it manually at the bottom of the template file using the advanced editor in the following ways (each without success):
VM_PREFIX = ‘$i’
VM_PREFIX = ($i)

I have also attempted to change the setting using the key-value tags method, but the resulting template file (and results) appear to be identical.

I have noticed that after making each of the changes, it appears that the system automatically adds a set of double-quotes ("") around the string, and I am wondering if this is what is causing the system to not recognize the variable. However, I have been unable to escape the quotes so far.

Please let me know if you need any additional information.

Versions of the related components and OS (frontend, hypervisors, VMs):
vOneCloud 3.2.0, OpenNebula 5.6.0
Steps to reproduce:
See description above
Current results:
VM naming would match the name description (passed through to VM_Prefix)
Expected results:
VM naming retains “One-” syntax

Im trying it right now and its working as expected.

i can see two problems:

  • you need to update the OpenNebula host (pointing to one vCenter cluster), not the template. that means that if you have for example:

(updating host templates)
vCenter “Cluster a” ->OpenNebula host_id 0: VM_PREFIX = “a-$i-”
vCenter “Cluster b” ->OpenNebula host_id 1: VM_PREFIX = “b-$i-”

when you deploy a machine from a OpenNebula template if the new vm go to cluster a it will have the name a-0-templatename.

  • use double quotes when using your editor with onehost update: