It depends on your use case. Do you want to create a brand new key pair for
each machine ? Then, how do you manage who ows what key pair(s) ? If you
want a user to be able to connect to his virtual machine once the virtual
machine is provisioned, you may want to use different methods: IPA (with or
without AD Trust) with Kerberos, IPA with key pairs, Puppet that would
deploy your keys, etc…
A simple way to go, is to have the CloudForms SSH public key in your VM
template and in a post provision state you connect to your VM and set it
up. This requires to wait for the VM to be up so I would add a new state
right after “CheckProvisioned”, maybe called “WaitForSsh” that just wait
for SSH to be available (returns something else than 255 when trying to
connect). And then you can add a state called “InstallSshKeys” that upload
the keys through SCP.
Hope this helps.