简体   繁体   English

Azure部署名称''不存在Java Create VM

[英]Azure The deployment name '' does not exist Java Create VM

I'm trying to deploy a VM using the Azure Java SDK. 我正在尝试使用Azure Java SDK部署VM。 I am able to retrieve listings from my Azure portal through Java. 我可以通过Java从Azure门户中检索列表。

When trying to deploy the VM it asks for a Deployment Name in the function: 尝试部署VM时,它会在函数中请求部署名称:

computeManagementClient.getVirtualMachinesOperations().create(String, String, VirtualMachineCreateParameters); computeManagementClient.getVirtualMachinesOperations()。create(String,String,VirtualMachineCreateParameters);

The second string is supposed to be Deployment Name, where can I find what this should be in the Azure portal or how do I create the deployment name container? 第二个字符串应该是部署名称,在哪里可以找到Azure门户中应该包含的内容,或者如何创建部署名称容器?

I've tried several names I thought might be correct and get the exception: 我已经尝试了几个我认为可能正确的名称并获得异常:

    Exception in thread "main" java.util.concurrent.ExecutionException: com.microsoft.windowsazure.exception.ServiceException: ResourceNotFound: The deployment name 'thundertest' does not exist.
    at java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.util.concurrent.FutureTask.get(FutureTask.java:188)
    at com.microsoft.windowsazure.management.compute.VirtualMachineOperationsImpl.create(VirtualMachineOperationsImpl.java:5359)
    at com.thunderhead.cloudlib.azure.RequestBuilder.createVirtualMachines(RequestBuilder.java:344)
    at com.thunderhead.cloudlib.azure.RequestBuilder.main(RequestBuilder.java:365)
Caused by: com.microsoft.windowsazure.exception.ServiceException: ResourceNotFound: The deployment name '<deploymentName?>' does not exist.
    at com.microsoft.windowsazure.exception.ServiceException.createFromXml(ServiceException.java:216)
    at com.microsoft.windowsazure.management.compute.VirtualMachineOperationsImpl.beginCreating(VirtualMachineOperationsImpl.java:1884)
    at com.microsoft.windowsazure.management.compute.VirtualMachineOperationsImpl$3.call(VirtualMachineOperationsImpl.java:1038)
    at com.microsoft.windowsazure.management.compute.VirtualMachineOperationsImpl$3.call(VirtualMachineOperationsImpl.java:1035)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

首先调用computeManagementClient.getVirtualMachinesOperations().createDeployment()应该为您提供一个可以传递给computeManagementClient.getVirtualMachinesOperations().create的名称的部署对象。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM