Quantcast
Channel: Azure Virtual Machines forum
Viewing all articles
Browse latest Browse all 12545

Provisioning image - Failed to deploy key pair (0x0A) when creating a new virtual machine in the cloud using the management API

$
0
0

I'm trying to create a virtual machine, with 3 steps:

1) Create host service:

POST /49ec5253-6db4-4a0d-bf7d-af1129644614/services/hostedservices

<CreateHostedService xmlns="http://schemas.microsoft.com/windowsazure"><ServiceName>0ZhYAkkG</ServiceName><Label>0ZhYAkkG</Label><Description>Test</Description><Location>East US</Location></CreateHostedService>

2) Add a certrificate to the hosted service:

POST /49ec5253-6db4-4a0d-bf7d-af1129644614/services/hostedservices/0ZhYAkkG/certificates

<CertificateFile xmlns="http://schemas.microsoft.com/windowsazure"><Data>MIIDbjCCAlYCCQC64u4IC/6xUzANBgkqhkiG9w0BAQUFADB5MQswCQYDVQQGEwJVUzERMA8GA1UECAwITmV3IFlvcmsxETAPBgNVBAcMCE5ldyBZb3JrMRAwDgYDVQQKDAdSYXZlbGxvMQswCQYDVQQLDAJhYTELMAkGA1UEAwwCYWExGDAWBgkqhkiG9w0BCQEWCWFhQGFhLm5ldDAeFw0xMzA4MTMxNTE2MzlaFw0xNDA4MTMxNTE2MzlaMHkxCzAJBgNVBAYTAlVTMREwDwYDVQQIDAhOZXcgWW9yazERMA8GA1UEBwwITmV3IFlvcmsxEDAOBgNVBAoMB1JhdmVsbG8xCzAJBgNVBAsMAmFhMQswCQYDVQQDDAJhYTEYMBYGCSqGSIb3DQEJARYJYWFAYWEubmV0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtAU/iwy1SGIQIR0H1x6r3Uvl2sx7GVsKZDanNyvFf/dWh8P6RXNPX9CcAbcnL5wIrscp570g2XeQwNcCseuLlTye6q7wkzzP46pcZMUB27xc2RDsYTyGTPDXS3blvImb7r87Jodi8JF48RRG2gxQqPSQmEULzdQCAeSfn73TvZZSLoz4F2mEsn1FLkYtezsMomyyAuagEqCff/3bBZsVyb7cmvuOOcFSP95lXxK5oqr0rmCDDXP8VYRTeMQLzmI1hnTPts6u4ajM9UYA6nRdg+2N9GMghbSc0ulDAX4ShyKsF8VttQb03Nk52x/QfDGOT8eRtPjzD1H6kg60nGQ80QIDAQABMA0GCSqGSIb3DQEBBQUAA4IBAQAVQs91NbQBoqjE2rsGtib+KYWWDNrCsSe77dh3pxv9h2nmAJ0OBi2KH7ASG3V8ppbuloPWcPohIU2gr5Bo1i5P4dKRKEJKeq4k7quNO2cZwY4AnKQ7xeDG6mQhCHIt0zWDY5TxjHcy7PHn7tElEol4R8lkyXLJ5yD38LGhALwMv5OBXH4iUX2Yqz76AV6qpDUrCtAw5+3v02JJNjZ+/eVWn5k4VTzM+4OpCKNy6jJ7s5RluPxQPvxzBgKMn0EH5MxHPWysDmncBqUzcyy6uxHa1jQqj3gNI46wg+6ipsZobkxSDnLU9Sv/yAuRTryxWT9RT5O0oqfbBc12xsdCSLCq</Data><CertificateFormat>pfx</CertificateFormat><Password></Password>

3) Create a deployment:

POST /49ec5253-6db4-4a0d-bf7d-af1129644614//services/hostedservices/0ZhYAkkG/deployments

<Deployment xmlns="http://schemas.microsoft.com/windowsazure"><Name>X9kaMY9M</Name><DeploymentSlot>Production</DeploymentSlot><Label>X9kaMY9M</Label><RoleList><Role><RoleName>SSHTEST</RoleName><RoleType>PersistentVMRole</RoleType><ConfigurationSets><ConfigurationSet><ConfigurationSetType>LinuxProvisioningConfiguration</ConfigurationSetType><HostName>SSHTEST</HostName><UserName>ubuntu</UserName><UserPassword>password</UserPassword><DisableSshPasswordAuthentication>true</DisableSshPasswordAuthentication><SSH><PublicKeys><PublicKey><Fingerprint>04B6CF056329797443514C9AC86F03D5E48FE452</Fingerprint><Path>/home/ubuntu/.ssh/authorized_keys</Path></PublicKey></PublicKeys><KeyPairs><KeyPair><Fingerprint>04B6CF056329797443514C9AC86F03D5E48FE452</Fingerprint><Path>/home/ubuntu/.ssh/id_rsa</Path></KeyPair></KeyPairs></SSH></ConfigurationSet><ConfigurationSet><ConfigurationSetType>NetworkConfiguration</ConfigurationSetType><DisableSshPasswordAuthentication>false</DisableSshPasswordAuthentication><InputEndpoints><InputEndpoint><LocalPort>22</LocalPort><Name>SSH</Name><Port>22</Port><Protocol>TCP</Protocol></InputEndpoint></InputEndpoints></ConfigurationSet></ConfigurationSets><OSVirtualHardDisk><MediaLink>https://portalvhdsgcsg7xccmw2n3.blob.core.windows.net/vhds/X9kaMY9M.vhd</MediaLink><SourceImageName>b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-12_04_2-LTS-amd64-server-20130624-en-us-30GB</SourceImageName></OSVirtualHardDisk></Role></RoleList>

Then the image is presented as Running (Provisioning failed) and I get this message in the InstanceStateDetails field:

<InstanceStateDetails>Provisioninig image FAILED Failed to deploy key pair (0x0A).</InstanceStateDetails>

What is going on? How can I do it right?Thank you!




Viewing all articles
Browse latest Browse all 12545

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>