How can I extend nova metadata to alter the user data after VM's boot?

asked 2013-10-09 15:33:34 -0500

B.Callanan gravatar image

updated 2013-10-11 17:50:18 -0500

smaffulli gravatar image

If I run nova --debug meta <vm_instance> set cat=dog I can see that the API will add the metadata into the cache for that instance.</vm_instance>

If I run nova boot and I specify "--user-data" and add a script/mime-type/any_of_the_supported cloud init types...etc The data injected here is only at boot time. Personalities (5 files) can also be loaded as well...

This is all great... However, I'd like to inject different stuff into the VM through the lifetime of the VM "without" using a floating IP to get to the VM. Nor do I have the ability to ssh to the VM (certainly not as root).

I want to modify the metadata/user_data to inject other stuff during the lifetime of the VM. If I can inject new key-value pairs I should be able to change more stuff. (Note: we are using the full openstack API and are very comfortable with passing any type of JSON to and from the API.

On the VM, I'm using Curl to see the contents of the metadata on a per instance basis. On the compute-node that is also running the metadata process I try to query the metadata port (ie curl http://10.2.2.22:8775/ ) what can I use are the request to get access to the each different vm instance metadata spaces/caches. is it possible?

Can I post anything else to the metadata server in this way?

Aside from writing a new agent to sit along side the metadata server I have not other options with what is provided by openstack to get data to or from the vms.

edit retag flag offensive close delete

Comments

What would be equally great is have the VM instance be able to post into the metadata. For instance, it could post whether the VM was healthy or not. The options are limitless...

B.Callanan ( 2013-10-09 16:19:32 -0500 )edit

Remember that you can edit your question instead of adding a comment.

smaffulli ( 2013-10-11 17:48:35 -0500 )edit

I have same question about this argument. I have an instance ad i want to inject a custom user-data to it. It's possible ?

salvorapi ( 2014-03-27 03:52:27 -0500 )edit