Azure VM Tutorial

Azure Virtual Machine Tutorial
Virtual machine

Microsoft Azure is a cloud computing service developed by Microsoft in the early 2000s. It is used to manage, test, build, and deploy applications via Microsoft’s very own datacenters. It offers various services, such as SaaS (Software as a service), IaaS (Infrastructure as a service), and PaaS (Platform as a service).

Now that we are familiar with what Microsoft Azure is, we will explore the different types of virtual machines and provide a step-by-step guide to Azure Virtual Machine learning. 

Azure Virtual Machine

Azure Virtual Machine is one of the most sought-after virtual machines or computing resources created by Microsoft Azure. It is based on the IaaS and enables the users to get more control over the environment to help them customize the hosting. 

Azure Virtual Machine is a vital part of hardware visualization. These machines are pre-made systems designed on the basis of visualization concepts. The concept behind Azure Virtual Machine is the same as cloud platform visualization. One of the main benefits of using Azure VM or Azure Virtual Machine is that the users can open and shut down whenever they like. It provides an ample amount of visualization flexibility without having to use the maintenance of physical hardware. 

However, users have to configure, patch, and install applications that run on it. Also, users can create SQL databases, directory domain services, Linux virtual machines, application services, and so on. Now, you might be thinking about Azure virtual machine types.

Different Types of Azure Virtual Machines

Here are the different types of Azure Virtual Machines:

Compute-Optimized

This type of VM has a high memory-to-CPU ratio. It is great for medium-traffic web servers, application servers, and network equipment. 

General Purpose

General purpose boasts a balanced memory-to-CPU ratio. It is mostly suitable for the deployment of databases from small or medium. 

Storage-Optimized

This VM possesses high IO and disk throughput, which is excellent for NoSQL databases, Big Data, SQL, big transactional databases, and data warehousing. 

Memory-Optimized

This type of VM leans towards a high memory-to-CPU ratio. It is ideal for medium-to-large caches, memory analytics, and relational database servers. 

High-Performance Compute

These VMs are the most powerful and the fastest VMs that are equipped with RDMA (high-throughput network interfaces).

GPU

It is a specialized VM type that targets video editing and heavy graphics rendering. It can also be used for differencing with deep learning and modern training. The users can either have multiple GPUs or a single one.

Workloads

In cloud computing, the workload is the amount of processing time a computer gives to complete a certain task. The workload has application programs processing in the computers. Some users connect and interact with the computer’s applications as well. The workload in the Azure Virtual Machine is divided into two categories.

Unsuitable Workloads

The services or applications not suitable for Azure VM workload IaaS are:

  • Controlled environment workloads that are unable to move to the cloud due to the rules
  • Small businesses that can run the service at a lesser cost compared to using the cloud

Suitable Workloads

The services and applications suitable for Azure VM workloads are:

  • Workloads such as online commercial stores
  • Businesses with an unpredictable growth rate, such as a short-term increase in sales and development in the organization 
  • Workloads for retail sales in festival holidays

Why Use Virtual Machines?

Why use virtual machines?
Virtual machine

Virtual machines operate many operating systems simultaneously from a single piece of hardware. Without virtualization, users wanting to work on different operating systems like Linux and Windows would have to operate them from two separate physical units. Here is an example:

David works as a freelancer and designs computer games. One of his clients wants the game to run on all operating systems like Windows, Ubuntu, and macOS.  However, David only has one PC that runs on Windows. He will need Ubuntu and Windows to test the game. Instead of getting two separate physical units, he chooses Virtual Machines. He can now deploy two VMs for each system to test his game. Once the game is tested, the client and David are happy. 

Another example is related to operating systems. If David’s client wants a high-end game requiring a lot of power that his computer can’t handle, he has two options. He can buy a new PC, upgrade the existing one, or create a virtual machine to help him with the computing power. The cost will be lower, and it will be much more effective compared to buying a new PC. He can decrease or increase computing power or memory anytime he likes. 

Azure Virtual Network or VNet represents your network in the cloud platform. It allows different types of resources, such as Azure VM, to communicate effectively with each other, the internet, and network more securely. It is a highly secure and isolated environment to run the applications and machines. Here are some features of VNet.

Internet Communication

  • When you launch instances, Azure VM can access the internet
  • You can access specific resources 

Isolation

  • All the networks work independently.
  • You can divide virtual networks into segments.
  • Configuration of the virtual network can be done by using your DNA servers.

Azure Resource 

  • Resources fall under the umbrella of Azure VNet and can communicate with each other with the help of IP addresses, regardless of being from different subnets.
  • They offer routing between on-premise networks and subnets, so you don’t have to manage or configure the routes. 

Filtering the Traffic

  • Network traffic is filtered from resources by port and source IP address.

VNet Connectivity

Any resource can connect; a virtual network can communicate with resources in other VNets. 

On-Premise Connectivity

This means the VNet can connect to a network on-premise and enable the resources to interact with each other.

Routing

You can override routing by configuring Azure VM with your own routes or by generating BGP routes via a network gateway. It is responsible for routing the traffic. A route table for subnets is automatically created within Azure VNet, and system default routes are added. 

Azure Virtual Network Subnet

Azure VNet subnets divide the virtual network into small IPs to ensure the resources organized in these subnets are separated logically. Each subnet consists of a range of IP addresses with a subset of virtual network space. 

Network Security Group

These groups function as a firewall that limits and monitors network traffic. They also contain a range of security rules that deny or allow outbound or inbound network traffic based on the destination or source of IP addresses, protocol, and port. The security rules apply to all the resources in the subnet. 

Step-by-Step Guide to Azure Virtual Machine 

Now that we have explored the basics let’s move on to our step-by-step guide to Azure Virtual Machine. This guide will help you with the steps and deployment of VM in Azure.

Step # 1

The first step involves the process of setting up an Azure Virtual Machine. You would need to log into the management portal via www.portal.azure.com. Make sure you have an Azure subscription so you can use the portal. You can easily sign up for a free trial if you don’t have a subscription.

After signing up and logging into the account, go to the “Navigation” section and click “New.” After that, click “Marketplace” and then “Compute.”

Step # 2

You will see the “Virtual Machines Marketplace” tab. This is where you will find different VM pre-configured images and configurations. The images in the tab will consist of official images from ISVs, Microsoft partners, and Microsoft. You can find images from selected partners like Red Hat or Canonical. The images are used for Windows-based deployments only.

Select the image you like from the various options. For instance, if you create an Azure VM using Windows Server 2016, after choosing the image, you will be able to see all the information related to the Windows Server 2016 image. 

Now, it’s time for you to choose a suitable deployment model. Let’s use the example of Windows Server 2016. The recommended deployment model for Windows Servers 2016 is “Resource Manager.” Select “Resource Manager” after clicking “Select a deployment model.”

Once that is done, click “Create,” which will initiate the Azure Virtual Machine creation process. 

After following the steps to deploy a virtual machine, the next steps cover configuring settings for Azure VM. 

Step # 3

This step involves creating a virtual machine. Click on the “Create Virtual Machine” tab. You will find four tabs on the left side of your screen, “Basics,” “Size,” “Settings,” and “Summary.” 

Let’s start with the Basics

This is the first configuration. In this configuration, you must provide all the important details about the VM you want to create, such as:

  • VM disk type
  • Name of VM
  • User name of the administrator
  • Password for the admin user
  • The subscription that you want to use
  • Resource group to get a logical container for Azure resources

There will be two options in the fields “Create new” and “Use existing.” You can choose which one is applicable in your case. This field is important for the management of resources on your VM. 

The final entry in the basics setting is adding the location of the Azure region. The virtual machine would be placed in that location. 

Once all the fields are filled up, click “OK.” You will be moved to the next tab, which will include:

Size

This tab helps the user configure the Azure Virtual Machine size. There will be various VM size options depending on your basic configurations. It is essential to remember that not all VM sizes will be available in all Azure regions. If a particular size of VM isn’t available, the size option is automatically disabled. This section will consist of the description of minimum memory and vCPU for VM. The most important information in this section is the estimated monthly cost of the VM size. Once all the options have been reviewed, select the right one by clicking “Select.”

Settings

After selecting the VM size, go on to the next tab, “Settings.” This tab will allow you to configure settings for availability, networking, storage, and monitoring. 

This is how you will configure each setting:

  1. Availability Set

Configuring availability is an essential step in creating a VM in Azure. In the “Settings” tab, you will be given an option to choose “Availability Set.” You can choose the Availability Set as an option if you want. It will help you determine the availability set for placing a VM. However, it is important to note that the configuration can’t be changed once the VM is created. 

  1. Storage

This setting is for your Azure Virtual Machine storage. Here, you will have to choose storage for the OS disk in the VM. You will find two options, “Managed Disks” and the second is “Storage Account.” 

The first option, Managed Disks, helps manage the storage account, simplifying disk management on IaaS virtual machines. 

The second option, “Storage Account,” is typically selected for placing the OS disk. Depending on which option suits you best, you can choose either a new or existing storage account. 

  1. Network

Setting up the Network is the next step in Azure Virtual Machine. In this section, you have to choose the “Subnet,” “Network Security Group,” “Virtual Network” type, and “Public IP Address.” In the “Virtual Network” section, you can either create a new VNet or choose an existing one. After that, select the subnet you want your VM to be placed on. Now, it’s time to choose the “Public IP address.”  You can create a new public IP address or choose “None” to obtain a publicly accessible IP address. In the “Network Security Group,” you will configure the outbound and inbound firewall rules to control the traffic. The default “Network Security Group” for Windows is Remote Desktop Protocol or RDP and SSH in Linux.

  1. Monitoring

The last step in configuring your Azure VM is “Monitoring.” This option is the “Settings” tab that gives you three monitoring configurations to choose from: “Boot Diagnostics,” “Guest OS Diagnostics,” and lastly, “Diagnostics Storage Account.”  The “Boost Diagnostics” option lets you view the console output and take screenshots. In the “Guest OS Diagnostics,” you disable or enable the Guest OS Diagnostic metrics for the VM. It helps you stay updated on applications and create alerts. The last element of the monitoring settings is “Diagnostics Storage Account”. In this, you can either create a new or choose an existing Azure storage account. This is where the diagnostic metrics will be written. 

After selecting the appropriate configuration for “Settings,” you click “OK.” 

Step # 4

This step entails final deployment. The final step of “Create Virtual Machine” is “Summary.” After all the basic configuration settings have been done on your Azure Virtual Machine, you will see this part. The “Summary” gives you a basic impression of the VM about to be created, including the terms of use, highlighted, pricing, and other details. 

Accept the terms and conditions to create the VM and click “Create.” The deployment process will be initiated immediately. Remember, the VM will take a few minutes before it is ready. You will be able to find the status on the notification board. 

Check out the complete steps with screenshots on How to Create Azure VM (Virtual Machine).

FAQs

How to rename Azure VM

Answer: It is impossible to rename a Virtual Machine. You need to redeploy the virtual machine in order to rename it.

What operating systems does Microsoft supply Azure virtual machine images for?

Answer: Windows and Linux.

Which virtual machine or virtual machines can use file-level restore?

Answer: Azure VMsor Azure Virtual Machines

Where can the settings for the shielding option on a virtual machine be configured?

Answer: Under Settings –> Hardwire section

What is the process in which the Python virtual machine recycles its storage known as?

Answer: Garbage Collection

Where must virtualization be enabled for VM (virtual machine) software to work?

Answer: In the host system BIOS

Which hyper-v feature allows you to install a virtual machine within another virtual machine?

Answer: Nested virtualization

What component within a CD workflow creates a new virtual machine or container to host the web app?

Answer: Orchestration server

Which of the following tools can be used for virtual machine sprawl avoidance?

Answer: Virtual Machine Manager

What is one benefit of using a virtual machine vs a physical one?

Answers

  • Multiple users can use one virtual machine
  • It is very simple to change the virtual hardware resource allocation

What additional resource is required by an Azure virtual machine

Answer: Virtual network gateway

You may also like following the below Articles

Conclusion

In conclusion, creating an Azure Virtual Machine is not difficult. We hope the step-by-step guide to Azure Virtual Machine above proves helpful. We have reflected on various factors that must be considered when setting up the VM. The steps required to create an Azure VM successfully highlighted in this article will ensure you have all the details down to a tee.