Posts

Showing posts from December, 2021

Auto-Stop Virtual Machines based on CPU utilization

Image
  Auto-Stop Virtual Machines based on CPU utilization: Microsoft Azure provides a service to Start or stop virtual machines (VMs) whenever there is more/less load of CPU utilization.   Prerequisites to test the Auto shutdown based on CPU utilization: A resource group containing the VMs An automation account with an azure run as account An azure monitor log analytics workspace Go to Home> "Start/Stop VMs during off hours" > Create Click on Add Solution> Create New Workspace > Fill-up the details > Create. Click on Automation Account> Create an Automation Account> Ok Click on Configuration> Parameters >Fill-up the  required details. You can mention * to include for all resource group as target resource group and none to include all VM’s .  In this case we mentioned a resource group.To exclude any VM’s mention the VM Name with comma separated values. Mention the Start and Stop schedule of the VM’s and configure mail id for notification >Ok  Go to 

Autoscale Azure Virtual Machine Scale Set

Image
  Autoscale Azure Virtual Machine Scale Set: Auto scaling feature enables you to dynamically allocate or remove resources based on the load on the services/application. You can mention the number of instances to run and add or remove VM's based on a scale set of rules. There could be many reasons for Increase / Decrease the instances. Here are few examples: Case 1 : You have an application running with heavy load everyday during 3PM to 5PM.So you would like to increase the instances during that time. Outside this window the your application usage is less and you want to reduce the instance count to save cost. Case 2 :Your customer is releasing a new product on your application on next week (date specific). So during the heavy peak season , you wna to increase the CPU count for those 2 days. Case 3: You want to increase the Instance count when there is unpredictable performance fluctuations in these environment of your application. Virtual machine scale set scaling options: In Azur

AZCopy : Upload and Download files from or to Azure Storage account using AZcopy

Image
  Upload and Download files from or to Azure Storage account using AZcopy: AzCopy is a command-line utility used to upload and download files to or from a storage account . Create a storage account and Create a container. Select the Storage account >IAM> Grant “Storage blob data Contributor” and “Storage blob data Owner” access. Download the AZcopy executable files based on your Operating system (Windows/ Linux) from Microsoft site.Upload the executable AZcopy file and upload in Azure Storage fileshare       To access the AZcopy file go to the file share path you have mounted on the system. Open the Bash shell and access the file: Windows : Extract the azcopy_windows_amd64_10.13.0.zip  Linux :To extract the file use tar –xvzf azcopy_linux_amd64_10.13.0.tar.gz Upload a file to Storage account : Login to Azcopy : Azcopy login: Use azcopy copy to upload a file: Command : azcopy copy “file path” “container URL” Example :azcopy copy 'C:\path\reports.txt' 'https://mystor

Virtual Network Peering and VNet-to-VNet VPN gateway connection

Image
    Virtual Network Peering : Virtual network peering is used to connect two or more Virtual Networks in Azure. Once the Virtual networks are connected using peering  it will appear as one network. The traffic between VM's are routed through Microsoft infrastructure through private IP addresses only. Types of Virtual network peering: Virtual network peering: Connect virtual networks within the same Azure region. Global virtual network peering: Connecting virtual networks across Azure regions.  Step by Step procedure to create a Virtual network peering: Create two Virtual Networks: Go to Home >Virtual networks>Create> Fill up the required fields > Review and Create   Create two Virtual Machines: Go to Home >Virtual Machine >Create Fill up the required fields as mentioned below> Ensure you select the appropriate VNets for VM1 and VM2 >Review and create  Connect the VM’s using RDP Downloaded File Create a Peering between Vnet1 and Vnet2: Go to VNet1 you created