简体   繁体   English

在蔚蓝中如何通过部署创建VM

[英]In azure how to create a VM with deployment

I have a requirement that I need to create a VM using azure-java-sdk. 我有一个要求,我需要使用azure-java-sdk创建VM。

When I tried to create a VM it is showing that invalid deployment Name. 当我尝试创建VM时,显示的是无效的部署名称。

What is approach to create VM(Role) along with Cloud Service and Deployment using azure-java-sdk? 使用azure-java-sdk与VM Service和Deployment一起创建VM(Role)的方法是什么?

I am using VirtualMachineOperations to createRole(vm), and creatRole(ServiceName,DeploymentName,params) to create VM. 我正在使用VirtualMachineOperations来创建角色(vm),并使用creatRole(ServiceName,DeploymentName,params)来创建VM。

This is where I am getting Error. 这是我得到错误的地方。

Thanks in advance.. 提前致谢..

Azure SDK has a lot of tests covering this functionality, you can check the setup and what entities you need to create (cloud service, deployment, role) Azure SDK有很多测试涉及此功能,您可以检查设置以及需要创建哪些实体(云服务,部署,角色)

https://github.com/Azure/azure-sdk-for-java/blob/master/management-compute/src/test/java/com/microsoft/windowsazure/management/compute/VirtualMachineOperationsTests.java#L77 https://github.com/Azure/azure-sdk-for-java/blob/master/management-compute/src/test/java/com/microsoft/windowsazure/management/compute/VirtualMachineOperationsTests.java#L77

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

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