# AWS EC2, Cloudinit and OneGate

**URL:** <https://forum.opennebula.io/t/aws-ec2-cloudinit-and-onegate/516>\
**Category:** Product Support\
**Created:** [March 27, 2015, 10:57am UTC](https://forum.opennebula.io/t/aws-ec2-cloudinit-and-onegate/516 "2015-03-27T10:57:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![adrianre12](https://avatars.discourse-cdn.com/v4/letter/a/94ad74/32.png) [@adrianre12](https://forum.opennebula.io/u/adrianre12)\
**Post date:** [March 27, 2015, 10:57am UTC](https://forum.opennebula.io/t/aws-ec2-cloudinit-and-onegate/516/1 "2015-03-27T10:57:13Z")

</div>

Hi,  
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?

Regards  
Adrian

---

<div class="post-metadata">

**Author:** ![tinova](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/tinova/32/25_2.png) [@tinova](https://forum.opennebula.io/u/tinova)\
**Post date:** [March 31, 2015, 9:33am UTC](https://forum.opennebula.io/t/aws-ec2-cloudinit-and-onegate/516/2 "2015-03-31T09:33:51Z")

</div>

Unfortunately, passing dynamic context information to hybrid drivers is not currently supported. We’ve opened a [ticket](http://dev.opennebula.org/issues/3730) to not miss this enhancement for future OpenNebula releases.

Regarding the tag bug, we will try and [solve it for the upcoming maintenance release](http://dev.opennebula.org/issues/2511), 4.12.1.

---

<div class="post-metadata">

**Author:** ![adrianre12](https://avatars.discourse-cdn.com/v4/letter/a/94ad74/32.png) [@adrianre12](https://forum.opennebula.io/u/adrianre12)\
**Post date:** [April 8, 2015, 10:53am UTC](https://forum.opennebula.io/t/aws-ec2-cloudinit-and-onegate/516/3 "2015-04-08T10:53:56Z")

</div>

Thanks for the update
