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

Management API - Create VM - InvalidXmlRequest - The request body XML was invalid or not correctly specified

$
0
0

Hi,

I am getting error while creating virtual machine from Azure REST management API. Could someone please point me what wrong I am POSTing in below XML

ERROR --- <Error xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Code>InvalidXmlRequest</Code><Message>The request body's XML was invalid or not correctly specified.</Message></Error>

"  <Deployment xmlns=\"http://schemas.microsoft.com/windowsazure\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\">" + "    <Name>SomeName</Name>" + "    <DeploymentSlot>Production</DeploymentSlot>" + "    <Label>SomeLabel</Label>" + "    <RoleList>" + "      <Role>" + "        <RoleName>SomeRoleName</RoleName>" + "        <RoleType>PersistentVMRole</RoleType>" + "        <ConfigurationSets>" + "          <ConfigurationSet i:type=\"WindowsProvisioningConfigurationSet\">" + "            <ConfigurationSetType>WindowsProvisioningConfiguration</ConfigurationSetType>" + "            <ComputerName>SomeCompName</ComputerName>" + "            <AdminPassword>Admin098</AdminPassword>" + "            <EnableAutomaticUpdates>true</EnableAutomaticUpdates>" + "            <ResetPasswordOnFirstLogon>false</ResetPasswordOnFirstLogon>" + "          </ConfigurationSet>" + "          <ConfigurationSet i:type=\"NetworkConfigurationSet\">" + "            <ConfigurationSetType>NetworkConfiguration</ConfigurationSetType>" + "            <InputEndpoints>" + "              <InputEndpoint>" + "                <LocalPort>3389</LocalPort>" + "                <Name>RemoteDesktop</Name>" + "                <Protocol>tcp</Protocol>" + "              </InputEndpoint>" + "            </InputEndpoints>" + "          </ConfigurationSet>" + "        </ConfigurationSets>" + "        <OSVirtualHardDisk>" + "          <DiskName>SomeDiskName-0-20121007173943</DiskName>" + "          <MediaLink>http://portalvhdsrx7q659n2n5j2.blob.core.windows.net/public/myvhd0008980.vhd</MediaLink>" + "          <SourceImageName>MSFT__Win2K8R2SP1-Datacenter-201208.01-en.us-30GB.vhd</SourceImageName>" + "        </OSVirtualHardDisk>" + "        <RoleSize>Small</RoleSize>" + "      </Role>" + "    </RoleList>" + "  </Deployment>"


Viewing all articles
Browse latest Browse all 12545

Trending Articles



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