创建VM请求信息
URI:
https://management.core.windows.net/xxxxxx-xxxxx-xxxxx-xxxx-xxxxxxx/services/hostedservices/hostzuntmhqzio/deployments/vmtestdeploy1muv/roles
请求正文:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<PersistentVMRole
xmlns="http://schemas.microsoft.com/windowsazure"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<RoleName>jdkimtestazs</RoleName>
<RoleType>PersistentVMRole</RoleType>
<ConfigurationSets>
<ConfigurationSet i:type="LinuxProvisioningConfigurationSet">
<ConfigurationSetType>LinuxProvisioningConfiguration</ConfigurationSetType>
<ComputerName>jdkimtestazs</ComputerName>
<AdminPassword>inslab1234!</AdminPassword>
<EnableAutomaticUpdates>false</EnableAutomaticUpdates>
<StoredCertificateSettings/>
<AdminUsername>inslab</AdminUsername>
<UserName>inslab</UserName>
<UserPassword>inslab1234!</UserPassword>
<DisableSshPasswordAuthentication>false</DisableSshPasswordAuthentication>
</ConfigurationSet>
<ConfigurationSet>
<ConfigurationSetType>NetworkConfiguration</ConfigurationSetType>
<InputEndpoints>
<InputEndpoint>
<LocalPort>22</LocalPort>
<Name>SSH</Name>
<Port>22</Port>
<Protocol>tcp</Protocol>
<EnableDirectServerReturn>false</EnableDirectServerReturn>
</InputEndpoint>
<InputEndpoint>
<LocalPort>8080</LocalPort>
<Name>tomcat</Name>
<Port>8080</Port>
<Protocol>tcp</Protocol>
<EnableDirectServerReturn>false</EnableDirectServerReturn>
</InputEndpoint>
</InputEndpoints>
<ComputerName>jdkimtestazs</ComputerName>
<StoredCertificateSettings/>
</ConfigurationSet>
</ConfigurationSets>
<OSVirtualHardDisk>
<HostCaching>ReadWrite</HostCaching>
<DiskName>vmtestoshdname74</DiskName>
<MediaLink>http://storagevmopzzwval.blob.core.windows.net/vhd-store/vmtest74.vhd</MediaLink>
<SourceImageName>0b11de9248dd4d87b18621318e037d37__RightImage-Ubuntu-14.04-x64-v14.1</SourceImageName>
<OS>Linux</OS>
</OSVirtualHardDisk>
<RoleSize>Medium</RoleSize>
<ProvisionGuestAgent>true</ProvisionGuestAgent>
</PersistentVMRole>
异常日志:
java.util.concurrent.ExecutionException: com.microsoft.windowsazure.exception.ServiceException: BadRequest: A computer name must be specified.
at java.util.concurrent.FutureTask.report(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at com.microsoft.windowsazure.management.compute.VirtualMachineOperationsImpl.create(VirtualMachineOperationsImpl.java:5418)
at seabream.VirtualMachineOperator.createVirtualMachines(VirtualMachineOperator.java:414)
at seabream.RunTest.main(RunTest.java:15)
Caused by: com.microsoft.windowsazure.exception.ServiceException: BadRequest: A computer name must be specified.
at com.microsoft.windowsazure.exception.ServiceException.createFromXml(ServiceException.java:216)
at com.microsoft.windowsazure.management.compute.VirtualMachineOperationsImpl.beginCreating(VirtualMachineOperationsImpl.java:1933)
at com.microsoft.windowsazure.management.compute.VirtualMachineOperationsImpl$3.call(VirtualMachineOperationsImpl.java:1050)
at com.microsoft.windowsazure.management.compute.VirtualMachineOperationsImpl$3.call(VirtualMachineOperationsImpl.java:1)
我指定了计算机名称,错误原因......