AWS EC2, Cloudinit and OneGate

My objective is to be able to change the hostname of the EC2 instance to that defined in OpenNebula.
I am trying to use cloud-init and I have managed to pass static user-data to the instance, but I cant see how to send any other data e.g. vm name.
Anyone know if OpenNebula, EC2 and Colud-init can work?

I have tried setting a Tag in the template, but it seems to be broken.
I set the tag to “Name = fred” and on the instance i get a tag with Key = “-t” and Value = "Name fred"
Any one else seen this? is it a bug or am i setting it wrong?

I have looked at using OneGate so that I can pull the data from OpenNebula. I have enabled “Add OneGate Token” and in the instance Tags can see the tag ONE_ID, but can not see how to get the token.txt data visible in the VM.
Any idea how to get token.txt on the instance?


Unfortunately, passing dynamic context information to hybrid drivers is not currently supported. We’ve opened a ticket to not miss this enhancement for future OpenNebula releases.

Regarding the tag bug, we will try and solve it for the upcoming maintenance release, 4.12.1.

Thanks for the update