简体   繁体   中英

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

As we know that a new feature called virtual machine has been added in windows azure portal. but i want to create a virtual machine in windows azure programmatically with C# or . net. so can any one please help in this... which API shoud i use or yet the API for .net need to be published by azure people? please any one guide me to do this task.

You'll likely want to use Azure's REST Service Management APIs. For example, APIs for creating and managing VMs are here: Create Virtual Machine Deployment .

The overall API is documented here.

Since you're in .NET it seems like there would be service management APIs in the managed SDK , but I didn't see any service management API references there.

I just want to add something after the above answers, certainly you can create the Virtual Machines using Power Shell or C# and here is an example I found it might be interesting using the .Net API

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

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# for creating a VM . Remember that a Virtual Machine and a VMRole are different.

Apologies for not having seen this question earlier. The Microsoft Azure Management Libraries (MAML, for short) can provide this sort of .NET-based access to the Microsoft Azure management APIs. MAML is available as a series of NuGet packages, which were released officially just this week.

To accompany the release I've put out a blog post linking to a VS Extension I wrote for the //build/ conference. This extension provides a walk-thru via VS Project & Item templates, along with some code snippets, that do exactly what you're after - create a VM in Microsoft Azure from a Console Application.

I've written a few other posts on MAML that offer other pieces of guidance and information. Hope this helps!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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