Create and Manage Azure VMs from Visual Studio Code

By | June 25, 2020

Azure Virtual Machine Extension for Visual Studio Code gives Azure developers a set of powerful commands to working with Azure VMs. With the help of Azure Virtual Machine extension for VS Code, from Visual Studio Code, you can easily create and delete Azure VMs, Start, stop and manage Virtual Machine. With the help of this extension, you can manage the Azure VMs very easily.

Create and Manage Azure VMs from Visual Studio Code

First of all install the Azure Virtual Machine Extension, and then connect with your Azure account.

Azure Virtual Machine extession help us with following

  • Create, delete, start, view and stop Azure Virtual Machines
  • Add SSH key to existing Azure Virtual Machines

Following are the list of commands available in the Visual Studio Code commands palette.

To create a new Azure Virtual Machine, Select the command “Azure Virtual Machine: Create Virtual Machine. It will ask to choose the Azure Subscription name if you have multiple subscriptions under the same account.

Once you choose the subscription it will ask for Virtual Machine Name, and passphrase for the same.

In the next step you need to select the resource location.

Once done, it will start provisioning all the resources for the Azure VMs such as Public IP, Network Interface, Disc, Network Security Group, and Virtual Machine.

Once the provisioning is completed you can open the Azure VMs in the Azure Portal see all the provision resources.

You can also use the Open in Portal command to open the Azure VMs in portal.

Author: Abhijit Jana

Abhijit runs the Daily .NET Tips. He started this site with a vision to have a single knowledge base of .NET tips and tricks and share post that can quickly help any developers . He is a Former Microsoft ASP.NET MVP, CodeProject MVP, Mentor, Speaker, Author, Technology Evangelist and presently working as a .NET Consultant. He blogs at http://abhijitjana.net , you can follow him @AbhijitJana . He is the author of book Kinect for Windows SDK Programming Guide.