Azure Virtual Machine (VM) is one of the types of on-demand, scalable computing resources. It gives us the flexibility of virtualization. We do not need to buy and maintain the physical hardware, we just need to take care of the machine itself. We can easily and quickly create a virtual machine with specific configurations as per our needs. The size of the VM that we use is determined by the workload that we want to run. We can connect Virtual machines in an Azure virtual network easily to our organization’s network.
Azure provides many operating systems images that can be used to create Virtual Machines.
The Virtual Machine can have a public IP address assigned to it to access it remotely. The Virtual Machine needs to be created in the Virtual Network in Azure. To create a VM, we need to select a location from the list.
With Azure Virtual Machine we need to pay for compute capacity, with no long-term commitment or upfront payments.
You will see the main page as follows once you successfully log in to your account. Click on 3 lines near “Microsoft Azure” in the upper left-hand corner of the Azure portal to show the portal menu.
Here, for Resource Group click on create new, enter my-resource-group name and then select OK.
Name the virtual machine as “my-first-vm”, select the region “Central US”, Change the Size as required, add “Username” and “Password” which will be used to login to the Virtual Machine. Click on “Next: Disk”.
You will see an error as “Validation failed. Required information is missing or not valid.” To fix this error, go to the “Management” tab with a red-colored dot on it.
Here the error says that “No existing storage account in current subscription and location”.
The reason for this is: We have enabled “” for which “Diagnostics storage account” is needed to Metrics are written so you can analyze them with your own tools.
To get rid of this error for now “keep Boot diagnostics as off” and click on the “Review create” tab.
Here, you can see that the Virtual Machine is ready. Click on “Resource group” to see what all resources have been created under the resource group we created as part of the Virtual Machine creation process.
You can see that there are multiple resources that have been created upon creating the Virtual Machine. All these resources belong to the Virtual Machine we created.
When you no longer need the Virtual Machine, you can delete it by deleting the Resource Group under which we created it.
Type the Resource Group name in the text box and click on “Delete”.
When you delete the Resource Group, all the resources which belong to it will get deleted.
Since the Resource Group we created does not have any other resources it is safe to delete it, but if there were other resources in it, we should avoid deleting the resources group as it will delete other resources too.
In this article, we learn to create our very first Virtual Machine on Azure Cloud. We saw how to fix the error we encountered while creating the machine. We also saw the steps to connect and delete the machine when it is no longer needed.