I am writing a small java client that uses the Azure Management API to create a new VM deployment on Azure. I keep getting messages with bad requests:
17/07/2012 18:26:37 com.sun.jersey.api.client.filter.LoggingFilter log INFO: 1 * Client out-bound request 1 > POST https://management.core.windows.net/my-subscription-id/services/hostedservices/myservice/deployments 1 > x-ms-version: 2012-03-01 1 > Content-Type: application/xml <Deployment xmlns="http://schemas.microsoft.com/windowsazure"> <Name>mynametest</Name> <DeploymentSlot>Staging</DeploymentSlot> <Label>mynamelabel</Label> <RoleList> <Role> <RoleName>mynamerolename</RoleName> <RoleType>PersistentVMRole</RoleType> <ConfigurationSets> <ConfigurationSet> <ConfigurationSetType>LinuxProvisioningConfiguration</ConfigurationSetType> <HostName>myunamehost</HostName> <UserName>myname</UserName> <UserPassword>password</UserPassword> </ConfigurationSet> </ConfigurationSets> <OSVirtualHardDisk> <SourceImageName>CANONICAL__Canonical-Ubuntu-12-04-amd64-server-20120528.1.3-en-us-30GB.vhd</SourceImageName> </OSVirtualHardDisk> </Role> </RoleList> </Deployment> 17/07/2012 18:26:38 com.sun.jersey.api.client.filter.LoggingFilter log INFO: 1 * Client in-bound response 1 < 400 1 < x-ms-request-id: c622e270c5934cb493f76790b7d2c49d 1 < Date: Tue, 17 Jul 2012 15:27:26 GMT 1 < Content-Length: 275 1 < Content-Type: application/xml; charset=utf-8 1 < Server: 6.0.6002.18488 (rd_rdfe_stable.120710-1331) Microsoft-HTTPAPI/2.0 1 < <Error xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Code>BadRequest</Code><Message>No target URI is specified for the image CANONICAL__Canonical-Ubuntu-12-04-amd64-server-20120528.1.3-en-us-30GB.vhd.</Message></Error>
it looks like docs from azure are errors: http://msdn.microsoft.com/en-us/library/windowsazure/jj157194
Has anyone tried this before? I donβt understand what the βtarget URIβ means ... the name of the image is taken from a common image gallery on an azure background.
any help, any help whatsoever, would be much appreciated. thanks
source share