ikkec
Contributor
Contributor

metadata entries for cloud-init (e.g. public keys)?

Hi,

we're building images that are compatible for both vCloud and other cloud environments. How to push/get openssh public keys?

I'm still more familar with non vCloud stuff, so I though I ask here first for a second opinion. So far I found metadata info from vmware docs, that list some entries, but nothing for the ssh keys:

VMware vCloud Director Documentation Center

Then there is a way to extend the metadata:

VMware vCloud Director Documentation Center

And then there should be a library/driver written for the cloud-init itself for vCloud datastore that could read the info. Any other recommendations for setting the key into the guest?

BR,

Ilkka Tengvall

Tags (2)
0 Kudos
2 Replies
ikkec
Contributor
Contributor

Now after digging some more into issue, it seems that the above way is no good. It would require login credentials. But there seems to be a way to query guest info from guest by the command: vmtoolsd –cmd “info-get guestinfo.ovfenv” . Unfortunately that does not return any metadata I tried to set in vCloud. Any info on subject?

0 Kudos
IamTHEvilONE
Immortal
Immortal

The metadata you set in the vCloud Director website is about the VM in vCloud.  It is not passed as metadata to the VM via OVF properties.

This of the metadata as a way of programatically setting some value for monitoring.  e.g. if the VM has Oracle installed inside of it, you could set a metadata tag of 'ORA'.  Then later on, you could scan all VMs for the 'ORA' tag to see how many VMs have Oracle installed on it.

If you need to set something in the guest, then you'll probably need to either do a 1 post customization script OR 2 automation on top to get the IP and remote execute some scripts.

0 Kudos