Azure Lab Manual-New
Azure Lab Manual-New
Azure Lab Manual-New
Resource Group
A resource group is a container for Azure solutions, containing related resources,
managed by the organization based on their most suitable allocation.
Step-by-Step Lab
1. Sign in to Portal
2. Create Resource Group:
Provide Name
Select Region
3. Review and Create
4. Create Virtual Machine:
Provide Name
Select Region
Availability Option: No infrastructure redundancy required
Security Type: Standard
Image: Winder Server 2019
Size: 3.5GiB
Provide Your UserName and Password
Select Inbound Port: RDP, HTTP
5. Review and Create
6. Connect Virtual Machine with RDP
7. Open Add Roles and Features
Select Web Server Under Server Roles
Next- Next -Install
8. Test Web Server
Delete Resource Group
Azure Lab 2
Creating Linux Virtual Machine-Apache
Secure Shell
Secure Shell (SSH) is a protocol that securely connects to a remote
server/system, transferring encrypted data between the host and the client.
Step-by-Step Lab
1. Sign in to Portal
2. Create Resource Group:
Provide Name
Select Region
3. Review and Create
4. Create Virtual Machine:
Provide Name
Select Region
Availability Option: No infrastructure redundancy required
Security Type: Standard
Image: Ubuntu Server Image
Size: 3.5GiB
Provide Your UserName and Password
Select Inbound Port: SSH, HTTP
5. Review and Create
6. Download Putty Software
7. Open Putty- Paste Public IP
Change Font Size -> Click Appearance-> change
8. Type Username and Password
9. Change Root User-> Sudo -i
10.Update-> apt update
11. Install WebServer-> apt install Apache2 -y
12. Test Web Page
Basic Commands
Create directory: mkdir
change directory command: cd
Come out from the directory: cd ..
Create File: touch
Open File: vi
Edit File: Press i
Save and Exit File: press esc Type :wq
Azure Lab 3
Capture Windows VM as an Image
SysPrep Tool
Sysprep allows generalising Windows installation by removing PC-specific information
and configuring boot mode to audit mode or Out-of-Box Experience (OOBE).
Architecture of the Lab
Step-by-Step Lab
1. Sign in to Portal
2. Create Resource Group:
3. Create Virtual Machine: (Windows)
4. Connect Virtual Machine using RDP (mstsc)
5. Install IIS using Server Manager in Windows
6. Modify the Index Page
WindowsC/Inetpub/Www
7. Check the modified web server IndexPage
8. Before Capturing run Sysprep
Go to the Sysprep path
Windows C/Windows/System32/Sysprep
Overview of Lab
In this Azure lab you will learn how to prepare and capture Linux Virtual
Machine with Installed Apache. Before capturing Linux Virtual Machine we
use Waagent Tool to prepare the VM.
Managed Images are helpful in development and test environments where you need
a consistent baseline.
Capture the VM by copying virtual hard disks of the VM and output a template that
can be used to create similar VMs.
Step-by-Step Lab
1. Sign in to Portal
2. Create Resource Group
3. Create Virtual Machine (Linux)
4. Connect Virtual Machine using Putty
5. Install Apache2
6. Modify the Index Page
Cd /var/www/index
Vi index.html
(Press i for Insert -> Edit 198th line -> press esc :wq)
7. Check the modified web server IndexPage
8. Before Capturing a Generalised VM
Waagent -deprovision+user
halt
9. Go to VM Overview
10. Capture the Virtual Machine using the “Capture”.
11. Create Capture
select a resource group
select No, and capture only a managed image.
Provide a Name for your Image
12. Review and Create
13. After Capturing the Virtual Machine you can use the Custom Image
to create a new Virtual Machine.
14. Check the Web Page is working with the newly created Virtual
Machine’s Public IP
Azure Lab 5
Azure Compute Gallery
Overview of Lab
In this Azure lab you will learn how to replicate VM Custom Image to
different regions using Azure Compute Gallery.
Step-by-Step Lab
1. Sign in to Portal
2. Create Resource Group
3. Create Virtual Machine (Windows/Linux)
4. Connect Virtual Machine
5. Modify Index Page
6. Generalize VM
7. Capture the Virtual Machine using the “Capture” button in Portal.
8. Create Capture
select a resource group
select yes, share it to a gallery as an image version.
create a new gallery by selecting Create new.
provide a name for a new Image definition.
image version 1.0.0
Replication: select any additional region
Review and Create
9. After Capturing the Virtual Machine you can use the Custom Image
to create a new Virtual Machine.
10. Check the Web Page is working with the newly created Virtual
Machine’s Public IP
Azure Lab 6
Increase the Disk Size in Windows
Overview of Lab
In this Azure lab you will learn how to increase the OS Disk size
(Windows VM).
Managed disks are like a physical disk in an on-premises server but virtualized.
Standard SSD
Azure standard SSDs are optimised for workloads that need consistent
performance at lower IOPS levels.
Standard HDD
Azure standard HDDs deliver reliable, low-cost disk support for VMs running
latency-tolerant workloads.
Architecture of Lab
Step-by-Step Lab
1. Sign in to Portal
2. Create Resource Group
3. Create Virtual Machine (Windows)
4. Connect Virtual Machine
5. Open Disk Management (diskmgmt.msc) check the size of disk
6. Go to Portal-Stop Virtual Machine
7. Go to VM Overview -> Disks -> Select OS Disk ->
Size+Performance
8. Increase Disk Size & Save
9. Start Virtual Machine
10. Connect Virtual Machine using RDP(mstsc)
11. Open Disk Management(diskmgmt.msc) recheck the disk size.
12. R-Click - Extend C Partition - Add Newly unallocated space.
13. Delete the Resource Group
Azure Lab 7
Azure Managed VM Data Disk and Snapshots
Overview of Lab
Data Disk
A snapshot is a full, read-only copy of a virtual hard disk (VHD). You can use a
snapshot as a point-in-time backup, or to help troubleshoot virtual machine (VM)
issues.
Incremental snapshots are point in time backups for managed disks that, when
taken, consist only of the changes since the last snapshot.
When you restore a disk from an incremental snapshot, the system reconstructs the
full disk which represents the point in time backup of the disk when the incremental
snapshot was taken.
Architecture of Lab
Step-by-Step Lab
1. Sign in to Portal
2. Create Resource Group
3. Create Virtual Machine (Windows)
4. Go to VM Overview
5. Open Disk
6. Select Create and Attached a New Disk
7. Provide Disk Name (DataDisk1) And Size - Save
8. Connect Virtual Machine
9. Open DiskManagement(diskmgmt.msc)
10. Instalaise the New Disk
11. Right Click on the New Disk - Select New Simple Volume
12. Create Folders in a new partition
Snapshot
13. Go to Portal Search for Snapshot and Create Snapshot
14. Provide Name for Snapshot
15. Snapshot Type: Full Snapshot
16. Source Type: Disk
17. Select DataDisk1
Search Data Disk
18. Create Disk
19. Provide Disk Name (DataDisk2) And Size
20. Go to Portal Select Existing Disk
21. Go to Virtual Machine RDP
22. Open Disk Management
23. Right Click - Online
24. Check New Partition
25. Go to - DataDisk1 Create a new folder.
26. After adding a new folder create a Snapshot again
27. Search Snapshot in Portal to Create DataDisk3
28. Create Incremental Snapshot by selecting DataDisk1
29. create DataDisk3 Use existing Incremental Snapshot
30. Go to Virtual Machine Overview
Attach Existing Disk-Refresh - Select Disk
Go to Virtual Machine RDP
31. Open Disk Management
32. Right Click - Online
33. Check New Partition
34. Delete the Resource Group
Azure Lab 8
Linux VM Data Disk
Overview of Lab
Architecture of Lab
Step-by-Step Lab
Overview of Lab
Architecture of Lab
Step-by-Step Lab
1. Sign in to Portal
2. Create Resource Group
3. Create Virtual Network
Provide Name
IP address
Vnet IP address: 10.0.0.0/16
Add Subnet:
Provide Subnet name: public-subnet
Subnet Address: 10.0.1.0/24
Add
Create
4. Search Public IP Address -> Create
IP Version: IPv4
SKU: Basic
Tier: Regional
Provide Name
Routing Performance: Microsoft network
Select location
Create
Select public IP
Monitoring:
Boot diagnostics: disable
Create
6. Connect with RDP
7. Open command prompt: ipconfig
Overview of Lab
Virtual Network
VNet is similar to a traditional network that you'd operate in your own data
center, but brings with it additional benefits of Azure's infrastructure such as scale,
availability, and isolation.
Subnet
The Internet Protocol (IP) is the method for sending data from one
computer to another over the internet. Each computer, or host, on the internet
has at least one IP address as a unique identifier.
Public subnet
A public subnet is a subnet that's associated with a route table that has a
route to an internet gateway.
Architecture of Lab
1. Sign in to Portal
2. Create Resource Group
3. Create Virtual Network
Provide Name
IP address
Vnet IP address: 10.0.0.0/16
Add Subnet:
Provide Subnet name: public-subnet
Subnet Address: 10.0.1.0/24
Add
Add Subnet:
Provide Subnet name: private-subnet
Subnet Address: 10.0.2.0/24
Add
4. Create a Public IP Address
5. Create a virtual machine (Windows)
Networking:
Virtual network: Select the Vnet name
subnet: Public subnet
Select public IP
Monitoring:
Boot diagnostics: disable
Create
6. Create virtual machine(Linux)
Networking:
Virtual network: Select the Vnet name
subnet: Private subnet
Public IP: None
Monitoring:
Boot diagnostics: disable
Create
Overview of Lab
Architecture of Lab
Step-by-Step Lab
1. Sign in to Portal
2. Create Resource Group
3. Create Virtual Network
IP address
Vnet IP address: 10.0.0.0/16
Add Subnet:
Provide Subnet name: public subnet
Subnet Address: 10.0.1.0/24
Add
Create
4. Search Public IP Address -> Create
IP Version: IPv4
SKU: Basic
Tier: Regional
Provide Name
Routing Performance: Microsoft network
Overview of Lab
Architecture of Lab
Step-by-Step Lab
1. Sign in to Portal
2. Create Resource Group
3. Create Virtual Network
Provide Name
IP address
Vnet IP address: 10.0.0.0/16
Add Subnet:
Provide Subnet name: private-subnet
Subnet Address: 10.0.2.0/24
Add
Add Subnet:
Provide Subnet name: public-subnet
Subnet Address: 10.0.1.0/24
Add
Create
4. Create Network Security Group
Go to NSG Overview
Inbound Security Rule
Add-> HTTP and RDP
5. Select subnet
Associate NSG with Subnet
Select public IP
Monitoring:
Boot diagnostics: disable
Create
7. Connect with RDP
Overview of Lab
Architecture of Lab
Step-by-Step Lab
1. Sign in to Portal
2. Create Resource Group
3. Create Virtual Network
Provide Name
IP address
Vnet IP address: 10.0.0.0/16
Add Subnet:
Provide Subnet name: public-subnet
Subnet Address: 10.0.1.0/24
Security:
Network Security Group: Create New
Name: Public NSG
Add
Add Subnet:
Provide Subnet name: private-subnet
Subnet Address: 10.0.2.0/24
Security:
Network Security Group: Create New
Name: Private NsG
Add
4. Go to Public NSG
Add Inbound Rule
Allow HTTP and RDP
Associate NSG with Subnet
5. Go to Private NSG
6. Associate NSG with Subnet
7. Create a virtual machine (Windows)
8. Provide Basic Details
Networking:
Virtual network: Select the Vnet name
subnet: Public subnet
Select public IP
Monitoring:
Boot diagnostics: disable
Create
9. Create a virtual machine(Linux)
Provide Basic Details
Networking:
Virtual network: Select the Vnet name
subnet: Private subnet
Public IP: None
Monitoring:
Boot diagnostics: disable
Create
Overview of Lab
Architecture of Lab
Step-by-Step Lab
1. Sign in to Portal
2. Create Resource Group (Weast US)
3. Create Virtual Network (Weast US)
Provide Name
IP address
Vnet IP address: 10.0.0.0/16
Add Subnet:
Provide Subnet name: public-subnet
Subnet Address: 10.0.1.0/24
Security:
Network Security Group: Create New
Name: Public NSG
Add
Add Subnet:
Provide Subnet name: private-subnet
Subnet Address: 10.0.2.0/24
Security:
Network Security Group: Create New
Name: Private NsG
Add
4. Go to Public NSG
Add Inbound Rule
Allow HTTP and RDP
Associate NSG with Subnet
5. Go to Private NSG
6. Associate NSG with Subnet
Peering:
Go to Vnet (East/West)
Peering -> Provide name and Vnet
Create
Overview of Lab
Architecture of Lab
Step-by-Step Lab
1. Sign in to Portal
2. Create Resource Group
3. Create a Virtual Network
4. Create Public and Private Subnet with Nsg
5. Public NSG-> Add inbound Rules Associated with Public NSG
6. Private NSG-> Associate with Private NSG
7. Create Windows Virtual Machine (Public)
8. Create a Linux Virtual Machine (Private)
9. Connect both Virtual Machines
10.Install Apache
11. Go to Portal Create Private DNS Zone
12. Create Recordset
Name: WWW
IP Address: (Linux Private IP)
13. Create Virtual Network Link
14. Test Webserver with DNS Name From Windows Machine
Azure Lab 16
VPN Point to Site Connection
Overview of Lab
Architecture of Lab
Step-by-Step Lab
1. Sign in to Portal
Azure Side
2. Create Resource Group
3. Create a Virtual Network
Add Private Subnet-> Private NSG
Add Gateway Subnet
4. Create a Private Linux VM
5. Create a Virtual Network gateway
Name: Azure Side VPN
GateWay Type: VPN
VPN type: Route based
SKU: VpnGw1
Public IP Type: Stanard
Public IP Address: Create New
Provide Public IP Address Name
Enable Active-Active Mode: Disable
Configure BGP: Disable
Create
6. Open Azure Portal in New Tab
OnPrem Side
7. Create Resource Group
8. Create a Public Virtual Machine(Windows)
9. connect
Open a new Tab Search Azure point to site VPN Configure
Copy Root Certificate
10. Open Power Shell
Paste Root Certificate in Powershell
Enter
11. Copy Client Certificate
Paste Client Certificate in Powershell
Enter
12. Type mmc
Click File
Select Add or remove Snapin
Add Certificate
13. Right Click Root Certificate
All Task
Export
Select No , do not export the private key
Next
Select Base-64 encoded X.509 as export file format.
Browse and Save in Desktop
14. R.Click Client Certificate
Click all Task
Select Yes, Export the Private Key
Next
Format: Personal Information Exchanges
Define PassWord
Save in Desktop
15. Go to VM Desktop
R.Click Child Certificate
define PassWord
R.Click Root Certificate Open with Notepad
Edit First and Last Line
(Begin Certificate/ End Certificate)
Copy Certificate