Virtual Machines and Virtual Networks

Virtual Machines are one of the Azure Compute way to host your solution and is the base Infrastructure component of the Cloud. Virtual Machines are logical machines which are created by the cloud using Hypervisors but for end user they act like physical machines containing all the components like RAM, CPU, Storage and Network. The physical hardware resources of the datacentre are intelligently managed and allocated to the virtual machines and these virtual machines are being paid for according to their location, performance and storage parameters. Hypervisor is a technology which manages these virtual machine allocations. One physical machine share its resource to multiple VMs. VMs have their own Operating system which is selected at the time of the creation of the VM. 


Azure offers a number of ways to host your application code. The term compute refers to the hosting model for the computing resources that your application runs on.


"Lift and shift" is a strategy for migrating a workload to the cloud without redesigning the application or making code changes. Also called rehosting. VMs are usually first choice for Lift and Shift Scenarios specially when there are legacy systems to migrate. After Lift and Shift is successfully accomplished, you can now leverage the cloud service features like scalability, performance, availability, failover and disaster prevention. Next you see if there are some components which are clients for cloud optimization.

Cloud optimized is a strategy for migrating to the cloud by refactoring an application to take advantage of cloud-native features and capabilities. In such cases the existing solutions like databases, web apps, APIs are moved into cloud using PAAS services like App Services, Kubernetes etc for containerized solutions, Web APIs, Azure Databases and storage to make your systems more cloud optimised and to delegate admin and maintenance processes onto the cloud management while leveraging the security and authentication, autoscaling etc

Virtual Machines

virtual machines are managed using HyperV software which sits on top of OS in a physical machine in a datacentre. HyperV is used to manage VMs.

1. VMs have different types based on performance, data storage and CPU intensive etc. e.g. D-series is the general purpose VM, E- Series are compute intensive etc

2. You can choose a VM based on your requirement

VM Disks (VHD)

• Each VM is created with two disks, OS disk and a temporary data disk. The data stored on temporary disk is wipes out when you shut the machine. 
  • In addition to OS and Temp Disc we can also associate one or more the external data discs (managed external disc) depending on the selection of the type of VM. On deletion of a VM, this data disc still persist, in case you want to attach it to another VM or use the data for some other purposes. You can however manually delete this disc later.

• Data Disk can be attached or removed from VM and you can attach more than 1 data data discs with VM depending upon specs/sku/pricing tier of VM.

• Managed Data Disk (read MS doc) also provides copies of data. They are a special type of data storage solution provided in the premium tier of Azure Storage.

• Default this type for OS is the premium SSD, which is the default solution.
There are other options for the OS Disk like Standard SSD and two others, but premium is the. Solution for in most of the cases it means it's a. Solid flash disc.

  • When you delete a VM, all its associated resources (VNet, data Disks, Network Interface, IP address etc) remain in the resource group. Best approach is to put a VM in its separate resource group and delete the resource group to delete VM and all of its associated resources. Otherwise you can manually delete resources later


click to enlarge photo.

Virtual Network - VNet
Before you decide  to create a VM, decide about Virtual Network and its IP range etc. As VNets can not be changed once allocated. Every VNet is associated with a Network Interface and Network Security Group. VNet is allocated a big range of IP addresses to use for the resources connected in that VNET. In order to divide VNets into smaller chunks of connected groups, VNet is divided into Subnet which is allocated a small range of IP addresses from the parent VNet.

Deleting a virtual network requires you to delete network Interface first (other wise you get subnet in use error). 

VNets are used to network the resources in a resource group. All resources in a VNet can access other resources in the same VNet

Network Security groups (NSG) are used to control the network traffic to the VNet resources as well as open or close ports to access the resources in a VNet. e.g. port 80 is opened for HTTP, 3389 for RDP (remote desktop protocol) etc. 









Comments

Popular posts from this blog

How to prepare for AZ-204 Developing for Microsoft Azure Certification Exam

Data Annotations in ASP.NET Core