Create a virtual machine in azure windows programmatically with C # or .net code

As we know, a new feature called a virtual machine has been added to the azure windows portal. but I want to create a virtual machine in windows azure programmatically with C # or. network. so can anyone help with this ... which shoud API do I use or another .net API to be published by azure people? please, any of us will help me complete this task.

+6
source share
4 answers

You probably want to use the Azure REST service management API. For example, the APIs for creating and managing virtual machines are here: Create a virtual machine deployment .

The general API is described here.

Since you work in .NET, it looks like the service management APIs will be used in the managed SDK but I have not seen any links to the service management APIs.

+6
source

I just want to add something after the above answers, of course, you can create virtual machines using Power Shell or C #, and here is an example that I found interesting using the API.Net API

http://code.msdn.microsoft.com/windowsazure/How-to-program-control-838bd90b

+2
source

Currently, there is only a REST API for creating virtual machines.

This post shows an example of how to call the REST API in C # to create a virtual machine . Remember that the virtual machine and VMRole are different.

+1
source

Apologizes for not having seen this issue before. Microsoft Azure Management Libraries (MAML, for short) can provide this type of access based on Microsoft Azure management APIs. MAML is available as a series of NuGet packages officially released this week only.

To accompany the release, I sent a message related to VS Extension I wrote for // assembly / conference. This extension allows you to go through the VS Project and Item templates, along with some pieces of code that do exactly what you need - create a virtual machine in Microsoft Azure from a console application.

I wrote several other posts on MAML that offer other parts of the manual and information. Hope this helps!

+1
source

Source: https://habr.com/ru/post/917852/


All Articles