Unit 1
Unit 1
Unit 1
Module Number: 01
1
Introduction to Microsoft Azure Virtual Machines
Syllabus
Introduction to Azure VM, Resource planning with Basic and standard, VM pricing, Difference between
basic and standard VM, Creating virtual machines, Choosing the type of VM, Configuring DNS address,
Configuring endpoints, Connecting to virtual machine, Implementing the lifecycle of a virtual machine,
Uploading and downloading virtual hard disks Attaching an empty hard disk to VM, Creating VM from
a custom image Deleting images and disks
2
Introduction to Microsoft Azure Virtual Machines
Aim:
To equip the students with benefits of Virtual Machine on Azure Platform.
3
Introduction to Microsoft Azure Virtual Machines
Objectives:
4
Introduction to Microsoft Azure Virtual Machines
Outcomes:
5
Introduction to Microsoft Azure Virtual Machines
Table of Content
▪ Introduction to Azure VM
▪ Resource planning with Basic and standard VM pricing
▪ Difference between basic and standard VM
▪ Creating virtual machines
▪ Choosing the type of VM
▪ Configuring DNS address - Configuring endpoints - Connecting to virtual machine
▪ Implementing the lifecycle of a virtual machine
▪ Uploading and downloading virtual hard disks
▪ Attaching an empty hard disk to VM
▪ Creating VM from a custom image
▪ Deleting images and disks
6
Introduction to Microsoft Azure Virtual Machines
Introduction to Azure VM
• Azure Virtual Machines (VM) are becoming more popular among IT infrastructures.
Microsoft Azure is one of the leading cloud providers that offer various kinds of cloud-based
services to bring an integrated solution platform.
• Azure Virtual Machines are one of the on-demand computing resources that come under
Infrastructure as a Service (Iaas) category in Azure.
• Azure services are mainly used to build and develop cloud-based solutions in various
organizations.
7
Introduction to Microsoft Azure Virtual Machines
Resource Planning with Basic and Standard VM
Pricing
Azure VM pricing is based on the following instance properties:
Region
Physical location of the machine. Azure offers 60 regions worldwide, available in 140 countries.
Operating system (OS)
Linux or Windows are available.
Tier
Sets of instances and Its service level.
License Type
OS only or software license attached (BizTalk / SQL server).
Instance Type
The type defines the size of the instance, and Storage attached
8
Introduction to Microsoft Azure Virtual Machines
Resource Planning with Basic and Standard VM Pricing
Azure VM Tiers
Azure VM sets a service level tier for each instance, affecting the possible
resources and services consumed by the instance.
• Standard
• Basic
9
Introduction to Microsoft Azure Virtual Machines
Basic and Standard pricing tier is about the CPU power, IOPS, etc.
these virtual machine breaks down as followed:
Basic pricing tier: optimized for dev/test, these virtual machines have capabilities similar
to the standard tier.
However, they do not support the Azure load balancer or auto-scaling, IOPS is slower than
for Standard.
Standard Pricing tier: provide better CPU performance and IOPS than basic tier.
10
Introduction to Microsoft Azure Virtual Machines
Difference between basic and standard VM
Source: https://faddom.com/azure-vms-pricing/ 11
Introduction to Microsoft Azure Virtual Machines
Azure virtual machines can be Deployed through the Azure portal. This provides a
browser-based user interface to create Virtual Machines and their related resources.
We have to create an Azure subscription, create a free account before you begin.
12
Introduction to Microsoft Azure Virtual Machines
In the Basics tab, under Project details, make sure the correct subscription is selected and
then choose to Create new resource group. Enter myResourceGroup for the name.
Source : https://docs.microsoft.com/en-us/azure/virtual-machines/windows/quick-create-portal#create-virtual-machine 13
Introduction to Microsoft Azure Virtual Machines
Creating Virtual Machines
Source : https://docs.microsoft.com/en-us/azure/virtual-machines/windows/quick-create-portal#create-virtual-machine 14
Introduction to Microsoft Azure Virtual Machines
Creating Virtual Machines
Under Inbound port rules, choose Allow selected ports and then select RDP (3389) and HTTP (80) from the drop-down.
Source : https://docs.microsoft.com/en-us/azure/virtual-machines/windows/quick-create-portal#create-virtual-machine
15
Introduction to Microsoft Azure Virtual Machines
Source : https://jaychapel.medium.com/microsoft-azure-vm-types-comparison-e7d031b4b588 17
Introduction to Microsoft Azure Virtual Machines
Configuring DNS Address
Step- 1: Login to https://portal.azure.com/
Source: https://azurelessons.com/azure-virtual-machine-dns/ 18
Introduction to Microsoft Azure Virtual Machines
Configuring DNS Address
Step- 3: You will see the list of VM created in your Azure subscription. It will show the VM name, Type, Status,
Resource Group, Location, etc.
Source: https://azurelessons.com/azure-virtual-machine-dns/
19
Introduction to Microsoft Azure Virtual Machines
Step- 4: Now click on the VM name. “MyNewVM” in my case. You can able to see the details of
your virtual machine like Public IP address, status, Computer name, Operating system, Size etc.
Source: https://azurelessons.com/azure-virtual-machine-dns/ 20
Introduction to Microsoft Azure Virtual Machines
Configuring DNS Address
Step- 5: You can also see the DNS name here. Click on the configure link.
21
Source: https://azurelessons.com/azure-virtual-machine-dns/
Introduction to Microsoft Azure Virtual Machines
Configuring DNS Address
Step- 5: You can also see the DNS name here. Click on the configure link.
22
Source: https://azurelessons.com/azure-virtual-machine-dns/
Introduction to Microsoft Azure Virtual Machines
Step- 6: Select the Assignment as Dynamic, Provide a name for the DNS in the DNS name label field.
Then click on the Save button.
So now if you can see my DNS name is “mynewvm.westus.cloudapp.azure.com“. You can see it here
on the Overview tab.
23
Source: https://azurelessons.com/azure-virtual-machine-dns/
Introduction to Microsoft Azure Virtual Machines
Configuring Endpoints
There is a section Azur Platform where endpoints can be set up when constructing a virtual
machine.
PowerShell and Remote Desktop are the two default endpoints that are enabled when
building a virtual machine.
• In essence, it involves opening a port to access the virtual computer. Remote access to
services operating on virtual machines is made possible by an endpoint.
• When building an endpoint, the public and private ports must be specified. In addition, turning
on Access Control Lists enables secure access to an endpoint (ACL).
24
Introduction to Microsoft Azure Virtual Machines
Configuring Endpoints
Step 1
Login to your Azure subscription and create a virtual machine.
Step 2
Click on the virtual machine in the Grid view. Now, you will be in the Virtual machine properties blade
Window. Select the option “Network Interfaces”. Under the essentials section, find the public IP address
parameter and click on IP address.
Step 3
You will be redirected to IP configuration blade of the virtual machine. In this Window, click Configurations
option under settings section.
25
Introduction to Microsoft Azure Virtual Machines
Configuring Endpoints
Step 4
In the opened view ,add desired DNS name in DNS name label(Optional). The important information to be
noted here is the entered name should be available, else an error message will be thrown, as shown in the
screenshot given below. Once the proper name is provided, save the current settings.
Steps 5
After the successful creation of DNS name, navigate to the main virtual machine grid view and click on the
virtual machine. In properties Window, select Network Interfaces option under settings section. In the new
blade, click on the Network security group and click Security group in the next Window.
26
Introduction to Microsoft Azure Virtual Machines
Configuring Endpoints
Step 6
In the new blade, click Network security group option and select the corresponding Security group in
the Grid View.
Step 7
In the new blade, select the option Inbound security rules and click add button in the blade.
27
Introduction to Microsoft Azure Virtual Machines
Configuring Endpoints
Step 8
Provide the desired name and click save button. After saving it successfully, the endpoint can be viewed in the
rules Grid View.
Step 9
Navigate to the virtual machines Grid View and click on the resource group with which the virtual machine is
associated with.
Step 10
In the resource group property Window, select the “virtual machine ip” in the Grid View section. You can find
DNS name of the virtual machine in the properties Window.
28
Introduction to Microsoft Azure Virtual Machines
1. Open the downloaded RDP file and select Connect when prompted. You will get a warning that
the .rdp file is from an unknown publisher. This is expected. In the Remote Desktop
29
Introduction to Microsoft Azure Virtual Machines
6. Use a different account by clicking More options in the Windows Security dialogue. Select OK after
entering the account's login information for the virtual computer.
Local account: When you created the virtual machine, you typically gave a local account user name and
password. In this instance, the virtual machine's name, which is entered as vm name username, is the
domain.
Domain joined VM: Enter the user name in the format Domain Username if the VM is part of a domain.
Additionally, the account must either belong to the Administrators group or have been given permission
to access the virtual machine remotely.
Domain controller: Enter the user name and password for a domain administrator account for that
domain if the VM is a domain controller.
7. Select Yes to verify the identity of the virtual machine and finish logging on.
30
Implementing the lifecycle of a Virtual Machine
• The term "virtual machine lifecycle management" (VMLM) refers to a group of procedures that
administrators can use to control the creation, delivery, use, and upkeep of virtual machines (VMs)
over the course of their use.
• An operating system (OS) or programme can be installed and run in a virtual machine (VM), which
is a software implementation of a computing environment.
• The virtual machine (VM) simulates a physical computer environment, but resource requests are
handled by a virtualization layer that translates them to the underlying hardware.
31
Implementing the lifecycle of a Virtual Machine
A virtual machine (VM) may frequently outlive repeated hardware upgrades, resulting in an
allegedly "immortal VM.“
Although the hypervisor is upgraded, the VM continues to run without taking into account changes
in the hardware.
As long as there is no urgent need for new hardware, the VM continues to function mostly in the
same way. However, after time, support becomes cumbersome and pointlessly expensive.
An enterprise may have virtual machines (VMs) running on a variety of major OS releases,
necessitating the use of several antivirus, security, asset management, monitoring, and other tools as
well as personnel.
32
Introduction to Microsoft Azure Virtual Machines
Uploading and downloading Virtual Hard Disks
The virtual hard disc must be ready before you transfer a Windows virtual machine (VM) from
on-premises to Azure (VHD or VHDX).
Generation 1 and Generation 2 VMs with fixed-size discs and VHD file format are both supported by
Azure. On a generation 1 VM, the OS VHD can have a maximum size of 2 TB.
Source: https://claytonshieldsjr.medium.com/add-and-size-disks-in-azure-virtual-machines-576d8da969f5
33
Introduction to Microsoft Azure Virtual Machines
Attaching an empty hard disk to VM
How to use the Azure PowerShell module to copy a managed disc to a different region or upload a VHD
from your local computer to an Azure managed disc.
You can upload a VHD up to 32 TiB in size straight into a managed drive using the upload managed
disc procedure, commonly known as direct upload.
At the moment, normal HDD, standard SSD, and premium SSDs can all be directly uploaded. As of
right now, ultra discs are not supported.
To restore client backups to managed discs while offering a backup solution for IaaS VMs in Azure, use
direct upload.
The speed at which you can upload a VHD from an external source to Azure depends on your local
bandwidth. When copying from or uploading to an Azure VM.
34
Introduction to Microsoft Azure Virtual Machines
Creating VM from a Custom Image
• A managed VM image contains the information necessary to create a VM, including the OS and data
disks.
• The virtual hard disks (VHDs) that make up the image, including both the OS disks and any data disks,
are stored as managed disks.
• Before creating a new VM, you'll need to create a managed VM image to use as the source image and
grant read access on the image to any user who should have access to the image.
• One managed image supports up to 20 simultaneous deployments. Attempting to create more than 20
VMs concurrently, from the same managed image, may result in provisioning timeouts due to the
storage performance limitations of a single VHD.
35
Introduction to Microsoft Azure Virtual Machines
Creating VM from a Custom Image
Use the portal
1. Go to the Azure portal to find a managed image. Search for and select Images.
2. Select the image you want to use from the list. The image Overview page opens.
3. Select Create VM from the menu.
4. Enter the virtual machine information. The user name and password entered here will be used to log
in to the virtual machine. When complete, select OK. You can create the new VM in an existing
resource group, or choose Create new to create a new resource group to store the VM.
5. Select a size for the VM. To see more sizes, select View all or change the Supported disk type filter.
6. Under Settings, make changes as necessary and select OK.
7. On the summary page, you should see your image name listed as a Private image. Select Ok to start
the virtual machine deployment.
36
Introduction to Microsoft Azure Virtual Machines
Deleting Images and Disks
The networking and disc resources may not be deleted when you delete a virtual machine (VM),
depending on how you do it. When you delete a VM, what additional resources are automatically
deleted can be changed from the default settings.
37
Introduction to Microsoft Azure Virtual Machines
Deleting Images and Disks
From Azure portal, browse to the storage container that contains unmanaged disks. Click on the disk to
view the properties.
Ensure that the lease status is “unlocked” and that the lease state is “Available.” This indicates that the
disk is not attached to any VMs. Click on Delete to remove the disks.
• You can utilize Azure Advisor to find the unused virtual machines in your subscription.
• The advanced evaluation model in Azure Advisor analyses metrics like CPU, memory, and
network usage of VMs and finds underused VMs that can be terminated or eliminated.
• The discs and those VMs can be deleted together to reduce your cloud storage costs.
38
Introduction to Microsoft Azure Virtual Machines
Summary
• Virtual machines, also known as just VMs, are much like any other real computers, such as laptops,
smartphones, and servers. It is equipped with a CPU, RAM, discs for file storage, and an internet
connection in case that is required. VMs are frequently considered to be virtual computers or
software-defined computers inside of real servers, although the components that make up your computer
(referred to as hardware) are actual, physical, and exist solely as code.
• Virtualization is the process of building a software-based or "virtual" version of a computer with
dedicated resources from a physical host machine, like your desktop computer, and/or a distant server,
such a server in a cloud provider's datacenter.
• To ensure that the discs of VMs in an availability set are sufficiently isolated from one another to
prevent a single point of failure, managed discs are integrated with availability sets. Disks are
automatically inserted into various scale storage devices (stamps). Only the VM instances with discs on
those stamps fail when a stamp fails due to hardware or software failure.
39
Introduction to Microsoft Azure Virtual Machines
Self Assessment ( Quiz)
Q1. In which year was Azure launched?
A. 2009
B. 2010
C. 2011
D. 2012
Answer: B
40
Introduction to Microsoft Azure Virtual Machines
A. Blob
B. Queue
C. Both A and B
Answer: C
41
Introduction to Microsoft Azure Virtual Machines
A. compute
B. store
C. management
Answer: D
42
Introduction to Microsoft Azure Virtual Machines
Q4. Which of the following element is a non-relational storage system for large-scale
storage?
A. Application
B. Compute
C. Storage
Answer: C
43
Introduction to Microsoft Azure Virtual Machines
Q5. Which of the following element allows you to create and manage virtual machines
A. Compute
B. Application
C. Storage
Answer: C
44
Introduction to Microsoft Azure Virtual Machines
Q6. Azure Storage plays the same role in Azure that ______ plays in Amazon Web Services.
A. EC3
B. S3
C. EC2
Answer: B
45
Introduction to Microsoft Azure Virtual Machines
A. VM Role
B. Web Role
C. Worker Role
Answer- D
46
Introduction to Microsoft Azure Virtual Machines
A. Yes
B. No
Answer: A
47
Introduction to Microsoft Azure Virtual Machines
A. Web Applications
B. Infrastructure Services
C. Media Services
Answer: D
48
Introduction to Microsoft Azure Virtual Machines
Q10. A _________ role is a virtual machine instance running Microsoft IIS Web server that can
A. Worker
B. Server
C. Web
D. Client
Answer: C
49
Introduction to Microsoft Azure Virtual Machines
Activity
50
Introduction to Microsoft Azure Virtual Machines
Subjective Assessment
2) VM creation is possible using Azure Resource Manager in a Virtual Network which was created
by means of classic deployment. Explain
3) What would be the best feature recommended by Azure for having a common file sharing system
between multiple virtual machines?
51
Introduction to Microsoft Azure Virtual Machines
External Resources
1. SQL Server on Azure Virtual Machines: A hands-on guide to provisioning Microsoft SQL by
Joey D'Antoni (Author), Louis Davidson (Author), Allan Hirt (Author), John Martin (Author )
2. https://courses.edx.org/asset-v1:Microsoft+AZURE202x+4T2017+type@asset+block@Azure
_Virtual_Machines_Practical_Exercises.pdf
52
Introduction to Microsoft Azure Virtual Machines
Document Links
https://courses.edx.org/asset-v1:Microsoft+AZ
This link explain Azure VM
Azure VM URE202x+4T2017+type@asset+block@Azure_
Virtual_Machines_Practical_Exercises.pdf
Virtual DISK in Azure https://azure.microsoft.com/en-in/services/s This link explains Virtual DISK in Azure Platform
Platform torage/disks/
53
Introduction to Microsoft Azure Virtual Machines
Video Links
54
Introduction to Microsoft Azure Virtual Machines
E-Book Links
https://download.microsoft.com/download/6/6/
2/662DD05E-BAD7-46EF-9431-135F9BAE6332/97
Microsoft Azure Essentials 81509302963_Microsoft%20Azure%20Essentials All pages
%20Fundamentals%20of%20Azure%202nd%20ed
%20pdf.pdf
55