hey i’m planing on upgrading opennebula 6.8 to 7.0
i saw there was changes regarding the oneflow templates and the old way of updating templates vm_template_contents, does not apply anymore
This is for example, how i used to do it in 6.8:
This is working for me i can modify the VCPU and MEMORY and other atributes based on custom inputs from my service template
"roles": [
{
"name": "test",
"cardinality": 1,
"vm_template": 48,
"vm_template_contents": "NIC = [\n NAME = \"_NIC0\",\n NETWORK_ID = \"$mgmt\" ]\nDISK = [\n IMAGE = \"$OS_VERSION\",\n SIZE = \"$VM_SIZE\",\n IMAGE_UNAME = \"oneadmin\" ]\nVCPU = \"$VIR_CPU\"\nMEMORY = \"$MEMORY\"\",
"elasticity_policies": [],
"scheduled_policies": []
}
],
"ready_status_gate": false,
"automatic_deletion": true,
"networks": {
"mgmt": "M|network|| |id:103"
},
"custom_attrs": {
"OS_VERSION": "M|list|ACP VERSION:|test|test",
"VM_SIZE": "M|list|Size (MB):|130000,157000,200000|130000",
"VIR_CPU": "M|range|Select CPU :|4..12|4",
"MEMORY": "M|list|Select how much RAM(MB) (4GB,8GB,16GB,32GB)|4096,8192,16384,32768|4096"
},
"registration_time": 1708960162
}
and in opennebula 7.0 from what i understood from the docs it should be like this
"user_inputs": {
"OS_VERSION": "M|list|OS VERSION:|test|test1",
"SIZE": "M|list|Size (MB):|110000,157000,200000|110000",
"VIR_CPU": "M|range|Select CPU :|4..12|4",
"VMEMORY": "M|list|Select how much RAM(MB):|4096,8192,16384|4096"
},
"roles": [
{
"name": "test",
"cardinality": 1,
"type": "vm",
"template_id": 4,
"template_contents": {
"DISK": [
{
"IMAGE": "${OS_VERSION}",
"SIZE": "${VM_SIZE}",
"IMAGE_UNAME": "oneadmin"
}
],
"VCPU": "${VIR_CPU}",
"MEMORY": "${VMEMORY}"
}
}
],
but this does not work i get empty variables and not the ones i got in user_inputs
any idea on how to implament this in 7.0 ?