Reputation: 105
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.
Upvotes: 6
Views: 10072
Reputation: 565
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.
Upvotes: 6
Reputation: 1506
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!
Upvotes: 1
Reputation: 619
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
Upvotes: 2
Reputation: 1648
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.
Upvotes: 1