In azure how to create a VM with deployment

163 Views Asked by At

I have a requirement that I need to create a VM using azure-java-sdk.

When I tried to create a VM it is showing that invalid deployment Name.

What is approach to create VM(Role) along with Cloud Service and Deployment using azure-java-sdk?

I am using VirtualMachineOperations to createRole(vm), and creatRole(ServiceName,DeploymentName,params) to create VM.

This is where I am getting Error.

Thanks in advance..

1

There are 1 best solutions below

0
On BEST ANSWER

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)

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