How to convert rsa key to pem using X.509 standard
From the Azure site itself:
openssl req -x509 -key ~/.ssh/id_rsa -nodes -days 365 -newkey rsa:2048 -out id_rsa.pem
This will convert your private key into a public key that can be used with Azure.