Monday, August 3, 2020

How virtual machine run on Azure

Provisioning a virtual machine (VM) in Azure requires some additional components besides the VM itself, including networking and storage resources.

These are the components

1.       Virtual machine

2.       Disks

3.       Network

4.       Operations

Virtual machine

Virtual machine mainly has 2 components

1.       Published images (Virtual machine custom templates)

2.       VM Size (Virtual machine computation power like CPU, RAM)

Published images

You can provision a VM from a list of published images, or from a custom managed image or virtual hard disk (VHD) file uploaded to Azure Blob storage. User can create and publish their own custom VM image(template) for virtual machine. These can be used by anyone in future.  

In below screen shoot it shows as published template (images) for virtual machine. You can create your own and publish it on azure market place.


VM Size

Azure offers many different virtual machine sizes.  If you are moving an existing workload to Azure, start with the VM size that's the closest match to your on-premises servers. Then measure the performance of your actual workload in terms of CPU, memory, and disk input/output operations per second (IOPS), and adjust the size as needed. Generally, choose an Azure region that is closest to your internal users or customers. Not all VM sizes are available in all regions.



Disks

For best disk I/O performance, we recommend Premium Storage, which stores data on solid-state drives (SSDs). Cost is based on the capacity of the provisioned disk. IOPS and throughput also depend on disk size, so when you provision a disk, consider all three factors (capacity, IOPS, and throughput). We also recommend using Managed Disks. Managed disks simplify disk management by handling the storage for you. Managed disks do not require a storage account. You simply specify the size and type of disk and it is deployed as a highly available resource

The OS disk is a VHD stored in Azure Storage, so it persists even when the host machine is down. We also recommend creating one or more data disks, which are persistent VHDs used for application data. When possible, install applications on a data disk, not the OS disk. Some legacy applications might need to install components on the C: drive; in that case, you can resize the OS disk using PowerShell.

The VM is also created with a temporary disk (the D: drive on Windows). This disk is stored on a physical drive on the host machine. It is not saved in Azure Storage and may be deleted during reboots and other VM lifecycle events. Use this disk only for temporary data, such as page or swap files.

Network

The networking components for VM as below and I have highlighted these components in diagram as well.


Virtual network

Every VM is deployed into a virtual network that can be segmented into multiple subnets.

Network interface (NIC)

The NIC enables the VM to communicate with the virtual network. If you need multiple NICs for your VM, be aware that a maximum number of NICs is defined for each VM size.

Public IP address

A public IP address is needed to communicate with the VM — for example, via remote desktop (RDP). The public IP address can be dynamic or static. The default is dynamic.

Network security group (NSG)

Network security groups are used to allow or deny network traffic to VMs. NSGs can be associated either with subnets or with individual VM instances.

Operations

Diagnostics

Enable monitoring and diagnostics, including basic health metrics, diagnostics infrastructure logs, and boot diagnostics. Boot diagnostics can help you diagnose boot failure if your VM gets into a non-bootable state. Create an Azure Storage account to store the logs. A standard locally redundant storage (LRS) account is sufficient for diagnostic logs. For more information, see Enable monitoring and diagnostics.


Availability

Your VM may be affected by planned maintenance or unplanned downtime. You can use VM reboot logs to determine whether a VM reboot was caused by planned maintenance. For higher availability, deploy multiple VMs in an availability set. This configuration provides a higher service level agreement (SLA).

We have talked about VM availability in previous post. For more information read thisblog

Backups 

To protect against accidental data loss, use the Azure Backup service to back up your VMs to geo-redundant storage. Azure Backup provides application-consistent backups.

In next blog we will talk about azure VM backup. Hope it will help you to understand the components inside VM on Azure.

Keep sharing keep learning. 

No comments:

Post a Comment