0% found this document useful (0 votes)
219 views30 pages

Cloud Computing and Migration - Study Material

Uploaded by

shukuratajoke3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
219 views30 pages

Cloud Computing and Migration - Study Material

Uploaded by

shukuratajoke3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

NCC 312

Virtualization and Cloud Migration:


Principles, Technologies, and Hands-On Labs

Study material

By

Emmanuel Oloyede

Department of Computer Science


Ogun State Institute of Technology, Igbesa.
TABLE OF CONTENTS
Chapter 1 ..................................................................................................................................... 3
Introduction to Virtualization ....................................................................................................... 3
1.1 What is Virtualization? ....................................................................................................... 3
1.2 Traditional Server Deployment ........................................................................................... 3
1.3 Key Terminologies .............................................................................................................. 4
1.4 Server Virtualization ........................................................................................................... 4
1.5 Advantages of Server Virtualization .................................................................................... 5
1.6 Client-Side Virtualization .................................................................................................... 6
1.7 Lab: Installing Oracle VirtualBox and Creating a Virtual Machine ......................................... 7
Chapter 2 ..................................................................................................................................... 8
Local Virtualization Technologies.................................................................................................. 8
2.1 Understanding Hypervisors: Type 1 vs. Type 2 ..................................................................... 8
2.2 Comparing Bare-Metal vs. Hosted Hypervisors .................................................................... 9
2.3 VM Lifecycle ....................................................................................................................... 9
2.4 LAB: Install Proxmox VE and Configure a Cluster with Shared Storage ................................ 10
Chapter 3 ................................................................................................................................... 12
Cloud Service Providers .............................................................................................................. 12
3.1 Introduction to Cloud Computing and IaaS ........................................................................ 12
3.2 Comparing Cloud Virtual Machines ................................................................................... 12
3.3 Understanding Cloud Pricing Models................................................................................. 13
3.4 Private Cloud with Proxmox VE ......................................................................................... 13
3.5 Lab: Set Up a VM in the Public Cloud ................................................................................. 14
Chapter 4 ................................................................................................................................... 16
Cloud Computing and Virtualization ........................................................................................... 16
4.1 The Role of Virtualization in Cloud Computing................................................................... 16
4.2. Cloud Computing Applications ......................................................................................... 16
4.3 Cloud Services .................................................................................................................. 17
4.4 Cloud Types...................................................................................................................... 18
4.5 How Virtualization Enables Cloud Services ........................................................................ 18
4.6 Scalability and Resource Pooling ....................................................................................... 19
4.6.1 Elasticity in the Cloud .......................................................................................................... 19
4.6.2 Resource Pooling Techniques.............................................................................................. 20
4.6.2 Tools That Enable Scalability and Pooling ........................................................................... 20
4.7 Migrating On-Premise VMs to the Cloud ........................................................................... 21
4.8 Lab: Migrate a Local VM to AWS or Azure ......................................................................... 21
Chapter 5 ................................................................................................................................... 23
Virtualization Management & Security ....................................................................................... 23
5.1 Virtualization Management Tools ..................................................................................... 23
5.2 Virtualization Security Best Practices ................................................................................ 23
5.3 Resource Optimization in Virtual Environments ................................................................ 24
5.4 Lab: Monitoring and Automating VM Tasks ....................................................................... 25
Chapter 6 ................................................................................................................................... 27
Trends & Emerging Technologies ................................................................................................ 27
6.1 Serverless Computing ....................................................................................................... 27
6.2 AI-Driven Resource Optimization ...................................................................................... 27
6.3 Disaster Recovery (DR): RPO/RTO and Failover Testing ...................................................... 28
6.4 Lab Exercises .................................................................................................................... 29

Virtualization and Cloud Migration: Principles, Technologies, and Hands-On Labs 2


Chapter 1
Introduction to Virtualization
1.1 What is Virtualization?
Virtualization is the process of creating a virtual version of something—such as an
operating system, server, storage device, or network resource. It enables one physical
machine to run multiple virtual machines (VMs), each with its own operating system and
applications, acting as though it were a completely separate computer.

A Brief History
The concept of virtualization dates back to the 1960s with IBM's mainframes, where
virtual memory and partitioning techniques allowed multiple users to run processes on
the same machine. However, it wasn't until the early 2000s that virtualization took off in
the commercial space, driven by the need to optimize hardware usage and reduce IT
costs.

1.2 Traditional Server Deployment


To fully appreciate virtualization, it is first necessary to understand how servers are used
in an organization.

Traditionally, organizations delivered applications and services to their users using


powerful dedicated servers as shown in the figure. These Windows and Linux servers are
high-end computers with large amounts of RAM, powerful processors, and multiple large
storage devices. New servers are added if more users or new services are required.

Problems with the traditional server deployment approach include:

 Wasted resources – This occurs when dedicated servers sit idle for long periods
waiting until they are needed to deliver their specific service. Meanwhile, these
servers waste energy.
 Single-point of failure – This occurs when a dedicated server fails or goes offline.
There are no backup servers to handle the failure.
 Server sprawl – This occurs when an organization does not have adequate space
to physically house underutilized servers. The servers take up more space than is
warranted by the services that they provide.
Virtualizing servers to use resources more efficiently addresses these problems.

Virtualization and Cloud Migration: Principles, Technologies, and Hands-On Labs 3


1.3 Key Terminologies
Understanding virtualization starts with grasping a few core terms:
 Hypervisor: A piece of software that enables virtualization. It allows multiple
operating systems to run on a single physical machine. There are two main types:
o Type 1 (bare-metal): Runs directly on the host’s hardware (e.g., VMware
ESXi, Microsoft Hyper-V).
o Type 2 (hosted): Runs on a conventional operating system (e.g., Oracle
VirtualBox, VMware Workstation).

 Virtual Machine (VM): A software-based emulation of a computer. Each VM runs


its own operating system and behaves like an independent system.

 Host OS: The physical machine’s operating system that runs the hypervisor.

 Guest OS: The operating system running inside the VM.

 Snapshots: Saved states of a virtual machine at a particular point in time.


Snapshots allow users to revert to previous states quickly, which is useful for
testing or recovery.

1.4 Server Virtualization


Server virtualization takes advantage of idle resources to reduce the number of servers
required to provide services to users.

A special program called the hypervisor is used to manage the computer resources and
various VMs. It provides VMs access to all of the hardware of the physical machine such
as CPUs, memory, disk controllers, and NICs. Each of these VMs runs a complete and
separate operating system.

With virtualization, enterprises can now consolidate the number of servers. For example,
it is not uncommon for 100 physical servers to be consolidated as virtual machines on
top of 10 physical servers using hypervisors. In the figure, the previous eight dedicated
servers have been consolidated into two servers using hypervisors to support multiple
virtual instances of the operating systems.

Virtualization and Cloud Migration: Principles, Technologies, and Hands-On Labs 4


1.5 Advantages of Server Virtualization
Virtualization includes the following major advantages:

 Better use of resources. Virtualization reduces the number of physical servers,


networking devices, supporting infrastructure, and maintenance costs.
 Less space required. Server consolidation with virtualization reduces the overall
footprint of the data center. Fewer servers, network devices, and racks reduce the
amount of required floor space.
 Less energy consumed. Consolidating servers lowers the monthly power and
cooling costs. Reduced consumption helps enterprises to achieve a smaller carbon
footprint.
 Reduced cost. Cost savings because less equipment is required, less energy is
consumed, and less space is required.
 Faster server provisioning. Creating a virtual server is far faster than
provisioning a physical server.
 Maximize server uptime. Most server virtualization platforms now offer
advanced redundant fault tolerance features, such as live migration, storage
migration, high availability, and distributed resource scheduling. They also
support the ability to move a virtual machine from one server to another.
 Improved disaster recovery. Virtualization offers advanced solutions to keep
business continuing during a disaster. VMs can be copied to other hardware
platforms that may even be in a different data center.
 Support for legacy systems. Virtualization offers advanced solutions to keep
business continuing during a disaster. VMs can be copied to other hardware
platforms that may even be in a different data center.

Virtualization and Cloud Migration: Principles, Technologies, and Hands-On Labs 5


1.6 Client-Side Virtualization
Many organizations use server virtualization to optimize network resources and reduce
equipment and maintenance costs. Organizations are also using client-side virtualization
to enable users with specific needs to run VMs on their local computer.
Client-side virtualization is beneficial for IT staff, IT support people, software developers
and testers, and for educational reasons. It provides users with resources to test new
operating systems, software, or to run older software. It can also be used to sandbox and
create a secure isolated environment to open or run a suspicious file.
Some terms that are used when discussing client-side virtualization include:
 Host computer – This is the physical computer controlled by a user. VMs use the
system resources of the host machine to boot and run an OS.
 Host operating system (host OS) - This is the operating system of the host
computer. Users can use a virtualization emulator such as VirtualBox on the host
OS to create and manage VMs.
 Guest operating system (guest OS) - This is the operating system that is running
in the VM. Drivers are required to run the different OS version.
The guest OS is independent of the host OS. For example, the host OS could be Windows
10 and the VM could have Windows 7 installed. This guest of the VM would be Windows
7. In this example, the guest OS (Windows 7) does not interfere with the host OS
(Windows 10) on the host computer.
Host and guest operating systems do not need to be of the same family. For example, the
host OS could be Windows 10, while the guest OS is Linux. This is of benefit for users that
need to increase the functionality of their host computer by running multiple operating
systems at the same time.
The figure displays a logical virtual machine diagram. The bottom gray box represents
the physical computer with its host OS (e.g., Windows 10). Virtual PC and VirtualBox are
examples of virtualization software or emulator that could be used to create and manage
the three VMs shown in the top of the figure.

Logical Virtual Machine

Virtualization and Cloud Migration: Principles, Technologies, and Hands-On Labs 6


1.7 Lab: Installing Oracle VirtualBox and Creating a
Virtual Machine
In this hands-on lab, you will install Oracle VirtualBox, a Type 2 hypervisor, and create
your first virtual machine.

Steps:

1. Download and Install VirtualBox


 Go to [Link]
 Download the appropriate version for your operating system.
 Run the installer and follow the prompts to complete the installation.

2. Download an OS ISO Image


 Choose a Linux distribution such as Ubuntu (or any OS of your choice).
 Visit [Link] and download the ISO.

3. Create a Virtual Machine


 Open VirtualBox and click New.
 Name your VM and choose the type and version (e.g., Linux → Ubuntu 64-bit).
 Allocate memory (RAM) – 2048MB is recommended for Ubuntu.
 Create a virtual hard disk – choose VDI (VirtualBox Disk Image), dynamically
allocated, and at least 20GB.
 Start the VM and select the downloaded ISO as the startup disk.

4. Install the Guest OS


 Follow the OS installation instructions within the VM.

5. Optional: Take a Snapshot


 After the OS is installed and configured, go to Machine → Take Snapshot to save
the state.

Virtualization and Cloud Migration: Principles, Technologies, and Hands-On Labs 7


Chapter 2
Local Virtualization Technologies
2.1 Understanding Hypervisors: Type 1 vs. Type 2
Hypervisors are the core technology that makes virtualization possible. They manage the
distribution of physical hardware resources (CPU, memory, storage, network) to virtual
machines (VMs), allowing multiple OS instances to run independently on a single host.

Type 1 Hypervisors (Bare-Metal)


Definition: Type 1 hypervisors are installed directly onto the physical hardware, without
requiring an underlying operating system. They act as a minimalist OS themselves, with
direct access to the host's hardware.

Characteristics:
 High performance due to lack of overhead.
 Commonly used in data centers and production environments.
 Typically accessed via web interface, SSH, or management tools (e.g., vSphere).

Popular Examples:
 VMware ESXi: Industry standard, known for stability and a broad ecosystem.
 Microsoft Hyper-V Server: Integrated into Windows Server; good for Windows-
heavy environments.
 Proxmox VE: Open-source Debian-based hypervisor with web UI and clustering
features.
 XenServer (now Citrix Hypervisor): Often used in cloud environments.

Type 2 Hypervisors (Hosted)

Definition: Type 2 hypervisors run on top of an existing operating system (e.g., Windows,
Linux, macOS). They are applications that use the host OS to access hardware.

Characteristics:
 Easier to install and use.
 Great for development, testing, or educational labs.
 Slightly reduced performance due to the extra OS layer.
Virtualization and Cloud Migration: Principles, Technologies, and Hands-On Labs 8
Popular Examples:

 Oracle VirtualBox: Free and open-source; supports many OS types.


 VMware Workstation/Fusion: Feature-rich with professional tools.
 Parallels Desktop: Popular on macOS for running Windows.

2.2 Comparing Bare-Metal vs. Hosted Hypervisors


Feature Type 1 (Bare-Metal) Type 2 (Hosted)
Installation Directly on hardware Within an existing OS
Performance High (direct hardware Lower (OS overhead)
access)
Stability Designed for 24/7 uptime Depends on host OS stability
Resource Allocation Efficient, hardware-level Shares with host OS
Use Cases Servers, production, data Development, labs, desktop
centers testing
Examples Proxmox VE, ESXi, Hyper-V VirtualBox, VMware
Server Workstation

2.3 VM Lifecycle
A virtual machine goes through multiple stages from creation to removal. Understanding
this lifecycle helps with managing VM environments effectively.

1. VM Creation
 Allocate CPU, memory, and disk.
 Choose an OS image (ISO).
 Define network type (NAT, Bridged, Host-only).
 Assign a name and description.

2. Configuration
 Install guest OS (Ubuntu, Windows, etc.).
 Install guest additions or tools (enhanced drivers, shared folders).
 Set boot order, enable virtualization extensions (VT-x, AMD-V).

3. Snapshots
 Create point-in-time saves of the VM’s current state.
 Useful before major changes or risky updates.
 Can revert VM to snapshot if something breaks.

4. Cloning
 Full Clone: Duplicates the entire VM.
 Linked Clone: Shares virtual disk with parent (faster, space-saving).

5. Networking Modes
 NAT: VM uses host IP to access the internet (isolated from LAN).
 Bridged: VM gets its own IP on the LAN, acts like a separate computer.
 Host-only: Communication only with host and other host-only VMs.
 Internal: Only VMs within same virtual network can communicate.

Virtualization and Cloud Migration: Principles, Technologies, and Hands-On Labs 9


6. Management & Deletion
 Power on/off, pause, restart, or send shutdown signal.
 Export/import VMs for backup or transfer.
 Delete VM (with or without deleting virtual disk).

2.4 LAB: Install Proxmox VE and Configure a Cluster


with Shared Storage
Lab Objective
You’ll install Proxmox VE, a free Type 1 hypervisor, and then build a simple two-node
VM cluster using shared storage. This simulates enterprise virtualization with high
availability potential.

Part A: Installing Proxmox VE


🛠 Prerequisites:
 Two physical machines (or virtual machines that support nested virtualization).
 USB drive (2GB+).
 Proxmox ISO: [Link]
 Tool like Rufus to create bootable media.

✅ Steps:
1. Download Proxmox VE ISO.
2. Use Rufus to create a bootable USB drive.
3. Boot each physical machine from USB and select Install Proxmox VE.
4. Follow installation prompts:
o Select target disk.
o Set root password and email.
o Assign a static IP address (for easier web access).

5. Complete installation and reboot.


6. Log into the Proxmox Web UI via:
[Link]
(accept the self-signed certificate warning)

Part B: Cluster Setup

1. Create a Cluster on Node 1:


 Navigate to: Datacenter → Cluster → Create Cluster
 Give the cluster a name (e.g., lab-cluster)
 Leave default settings unless needed
 Click Create

2. Join Node 2 to Cluster:


 Copy the Join Information from Node 1
 On Node 2, navigate to: Datacenter → Cluster → Join Cluster
 Paste in the info and root password of Node 1
 Click Join

Note: Nodes should be on the same subnet and be able to ping each other.
Virtualization and Cloud Migration: Principles, Technologies, and Hands-On Labs 10
Part C: Shared Storage Configuration
Shared storage allows all cluster nodes to access the same VM disks — essential for
migration and HA.

Options:
 NFS Share (Network File System)
 iSCSI
 Ceph (more advanced)

Example: NFS Storage


1. Set up an NFS share on a separate machine or NAS.
2. On Proxmox, go to: Datacenter → Storage → Add → NFS
3. Fill in:
o ID (e.g., nfs-storage)
o Server IP and Export path (e.g., /mnt/vmstore)
o Content: Disk Image, ISO, Backup
4. After adding, it should appear under Datacenter → Storage and be accessible to
all nodes.

Bonus: Create and Migrate a VM


1. On Node 1, create a VM and store its disk in the shared storage.
2. From the VM’s More Options, select Migrate → Online to move it to Node 2
(zero downtime if configured right).

Virtualization and Cloud Migration: Principles, Technologies, and Hands-On Labs 11


Chapter 3
Cloud Service Providers
3.1 Introduction to Cloud Computing and IaaS
Cloud computing is a model for enabling on-demand access to shared computing
resources over the internet. It allows organizations and individuals to use computing
services—such as servers, storage, databases, networking, software, analytics—without
owning or maintaining physical infrastructure.

Key Characteristics:
 On-demand self-service
 Broad network access
 Resource pooling
 Rapid elasticity
 Measured service

Focus: Infrastructure as a Service (IaaS)


IaaS provides virtualized computing resources via the internet. Users rent VMs, storage,
and networking infrastructure, gaining flexibility and scalability.

3.2 Comparing Cloud Virtual Machines


Three of the largest IaaS providers are Amazon Web Services (AWS), Microsoft Azure,
and Google Cloud Platform (GCP). Each offers robust virtual machine services:

Provider VM Service Strengths


AWS EC2 (Elastic Largest market share, wide region support, AMI
Compute Cloud) ecosystem
Azure Azure Virtual Seamless Microsoft ecosystem integration, hybrid
Machines cloud features
GCP Google Compute Live migration, custom VM types, network
Engine performance

Feature Comparison Table

Feature AWS EC2 Azure VMs GCP Compute Engine


OS Support Linux, Windows, Linux, Linux, Windows, custom
custom AMIs Windows images
VM Types General, Compute, B, D, E, F, NV General, Memory-
GPU, ARM series optimized, GPU
Auto-scaling Yes Yes Yes
Storage Options EBS, Instance Store Managed Persistent Disks, Local
Disks SSDs
Network Options VPC, ELB, Direct VNet, Load VPC, Cloud Load
Connect Balancer Balancer
Free Tier [Link] (750 B1S (750 f1-micro (select regions)
hrs/mo) hrs/mo)

Virtualization and Cloud Migration: Principles, Technologies, and Hands-On Labs 12


3.3 Understanding Cloud Pricing Models
Common Pricing Models

Model Description Best Use Case


Pay-as-you-go Charged per usage (per Unpredictable workloads
second/hour)
Reserved Instances Commitment of 1–3 years for Long-running production
lower price VMs
Spot/Preemptible Use excess capacity at lower Batch processing,
cost dev/test
Free Tier Limited free usage with sign-up Testing, learning,
prototyping

Example Price Estimates (as of 2024)

 AWS [Link] (Linux): $0 (within free tier)


 Azure B1S VM: ~$0.011/hour
 GCP f1-micro (US regions): ~$0.0076/hour

Tip: Always use the official cost calculators:

 AWS: [Link]
 Azure: [Link]
 GCP: [Link]

3.4 Private Cloud with Proxmox VE


While public cloud services offer ease of use and global availability, they come with
ongoing costs and dependency on internet access. Proxmox Virtual Environment (VE)
provides a free and open-source solution for creating a private cloud.

Why Use Proxmox for Private Cloud?

 No subscription or usage fees


 Full data and infrastructure control
 Internal deployments (no internet required)
 Supports clustering, HA, live migration
 Web-based UI and REST API for automation

Cloud-Like Features with Proxmox:

 Resource pools and user quotas


 VM templates (similar to AMIs)
 Centralized storage with Ceph or NFS
 API-driven provisioning

Virtualization and Cloud Migration: Principles, Technologies, and Hands-On Labs 13


3.5 Lab: Set Up a VM in the Public Cloud
Objectives

 Sign up for a free-tier AWS or Azure account


 Launch and configure a virtual machine
 Attach and manage elastic storage

Step A: Create a Free-Tier Account

AWS:

1. Visit: [Link]
2. Create an AWS account (credit card required for identity verification)
3. Log into AWS Console
4. Navigate to EC2 Dashboard

Azure:

1. Visit: [Link]
2. Sign up using Microsoft credentials
3. Receive $200 credit + 12-month free services
4. Open Azure Portal and go to "Virtual Machines"

Step B: Launch a Virtual Machine

AWS EC2 (Ubuntu 22.04):

1. Navigate to EC2 > Launch Instance


2. Select Ubuntu 22.04 LTS (Free Tier eligible)
3. Choose instance type: [Link]
4. Create or choose SSH key pair
5. Configure storage: 8GB EBS (default)
6. Launch instance

Azure VM (Ubuntu 22.04):

1. Click "Create a resource" > "Virtual Machine"


2. Select Ubuntu 22.04 LTS
3. Choose B1S size (Free Tier)
4. Configure authentication (SSH key)
5. Allow SSH access in networking
6. Review and create

Step C: Attach and Format Storage

AWS:

1. Go to EC2 Dashboard > Volumes > Create Volume


2. Attach volume to running instance
3. SSH into VM:

Virtualization and Cloud Migration: Principles, Technologies, and Hands-On Labs 14


lsblk
sudo mkfs.ext4 /dev/xvdf
sudo mkdir /mnt/data
sudo mount /dev/xvdf /mnt/data

Azure:

1. VM > Disks > Add Data Disk > Create new disk
2. SSH into VM:

lsblk
sudo mkfs.ext4 /dev/sdc
sudo mkdir /mnt/azuredisk
sudo mount /dev/sdc /mnt/azuredisk

Expected Outcome
 You’ve successfully created a cloud-based VM
 You understand how cloud pricing works
 You can extend your VM’s storage as needed

Virtualization and Cloud Migration: Principles, Technologies, and Hands-On Labs 15


Chapter 4
Cloud Computing and Virtualization
4.1 The Role of Virtualization in Cloud Computing
The terms “virtualization” and “cloud computing” are often used interchangeably
although they mean different things.

Virtualization enables a single computer to host multiple independent virtual


computers that share the host computer hardware. Virtualization software separates the
actual physical hardware from the virtual machine (VM) instances. VMs have their own
operating systems and connect to hardware resources through software running on the
host computer. An image of a VM can be saved as a file and then be re-started when
required.

It is important to remember that all the VMs share the resources of the host computer.
Therefore, the limiting factor on the number of VMs that can run at the same time is
directly related to the amount of processing power, memory, and storage.

Cloud computing separates the applications from the hardware. It provides


organizations with on-demand delivery of computing services over the network. Service
providers such as Amazon Web Services (AWS) own and manage the cloud infrastructure
that includes the networking devices, servers, and storage devices and is usually housed
in a data center.

Virtualization is the foundation which supports cloud computing. Providers such as AWS
offer cloud services using powerful servers that can dynamically provision virtual servers
as required.

Without virtualization, cloud computing, as it is most-widely implemented, would not be


possible.

4.2. Cloud Computing Applications


4.2.1 How We Use the Cloud

 Virtual Application Streaming / Cloud-Based Applications: Organization are


using cloud-based applications to provide on-demand software delivery. For
example, Microsoft Office365 provides online versions of Microsoft Word, Excel,
and PowerPoint. When a user requests an application, minimal application code is
forwarded to client. The client pulls additional code from the cloud server as
required. For offline use, the application may be saved locally on the host.

 Cloud-Based Email: Organizations are using cloud-based solutions for their email
requirements. Examples of cloud based email applications include Office 365,
Gmail, iCloud Mail, Outlook, Yahoo, and Exchange Online.

 Cloud File Storage Solutions: Organizations are using cloud-based storage


solutions for their corporate data. Examples of cloud storage solutions include
Google Drive, OneDrive, iCloud Drive, Box, and Dropbox. Some of these solutions
include synchronization applications that are either provided by the vendors or
commercially available applications.

Virtualization and Cloud Migration: Principles, Technologies, and Hands-On Labs 16


 Virtual Desktop Infrastructure (VDI): An organization can use this technology
to deploy entire desktop environments from a server in a data center to clients.
The virtual desktops are created by a VM controlled by a hypervisor. However, all
computing on the VDI is done on servers. VDIs can be persistent which provides
the user with a customizable image that is saved for future use or non-persistent
which reverts the image back to its initial state when a user logs out.

 Windows Virtual Desktop (WVD): This is a virtual desktop enabled edition of


Windows 10 that runs on modern or legacy computers or remotely on Azure
virtual machines. It provides a virtualized Windows 10 experience that is always
up to date and available on any device.

4.3 Cloud Services


Cloud service providers can provide various services tailored to meet customer
requirements. However, most cloud computing services can be categorized into three
main cloud computing services as defined by the National Institute of Standards and
Technology (NIST) in their Special Publication (800-145).

1. Software as a Service (SaaS)


The cloud provider provides access to services, such as email, calendar,
communication, and office tools over the Internet on a subscription basis. Users
access the software using a browser. Advantages include minimal upfront costs
for customers and immediate application availability. SaaS providers include
Salesforce customer management relationship (CRM) software, Microsoft Office
365, MS SharePoint software, and Google G Suite.

 Software applications (e.g., email, office 365, ..) are provided over the
network on a subscription basis
 Typically used by end users

2. Platform as a Service (PaaS)


The cloud provider provides access to operating systems, development tools,
programming languages, and libraries used to develop, test, and deliver
applications. This is useful to application developers. The cloud provider manages
the underlying network, servers, and cloud infrastructure. PaaS providers include
Amazon Web Service, Oracle Cloud, Google Cloud Platform and Microsoft Azure.

 Includes tools and services used to deliver the applications


 Includes OS and applications stack
 Typically requested by application and software developers

3. Infrastructure as a Service (IaaS)


The cloud provider manages the network and provides organizations access to
network equipment, virtualized network services, storage, software, and
supporting network infrastructure. There are many advantages for organizations
to adopt IaaS. Organizations do not need to invest in capital equipment and only
pay for usage on-demand. The provider network includes redundancy and
eliminates a single point of failure in the provider network infrastructure. The
network can also scale seamlessly based on current requirements. IaaS providers
include Amazon Web Service, DigitalOcean, and Microsoft Azure.
Virtualization and Cloud Migration: Principles, Technologies, and Hands-On Labs 17
 Includes network, computers (virtual or dedicated), and storage
 Typically used by organization infrastructure and network architects

4.4 Cloud Types


There are four primary types of clouds: Public clouds, Private clouds, Hybrid clouds, and
Community clouds.

Public Clouds: Cloud-based applications and services offered in a public cloud are made
available to the general population. Services may be free or are offered on a pay-per-use
model, such as paying for online storage. The public cloud uses the internet to provide
services.

Private Clouds: Cloud-based applications and services offered in a private cloud are
intended for a specific organization or entity, such as a government. A private cloud can
be set up using the organization’s private network, though this can be expensive to build
and maintain. A private cloud can also be managed by an outside organization with strict
access security.

Hybrid Clouds: A hybrid cloud is made up of two or more clouds (example: part private,
part public), where each part remains a distinct object, but both are connected using a
single architecture. Individuals on a hybrid cloud would be able to have degrees of access
to various services based on user access rights.

Community Clouds: A community cloud is created for exclusive use by specific entities
or organizations. The differences between public clouds and community clouds are the
functional needs that have been customized for the community. For example, healthcare
organizations must remain compliant with policies and laws (e.g., HIPAA) that require
special authentication and confidentiality. Community clouds are used by multiple
organizations that have similar needs and concerns. Community clouds are similar to a
public cloud environment, but with set levels of security, privacy, and even regulatory
compliance of a private cloud.

4.5 How Virtualization Enables Cloud Services


Virtualization allows cloud providers to:
 Host multiple VMs on a single physical server: Using a hypervisor, one server
can run many isolated virtual machines, maximizing hardware utilization.
 Dynamically allocate resources: Resources like CPU, RAM, and storage can be
adjusted on-the-fly based on VM requirements.
 Quickly replicate and migrate workloads: Virtual machines can be cloned or
moved between servers or data centers with minimal downtime.
 Improve hardware utilization rates: Instead of running a single application on
a dedicated server, multiple VMs share the same hardware efficiently.

Benefits of Virtualization to Cloud Services:

1. Faster Provisioning: Virtualization enables the rapid creation and deployment of


virtual machines (VMs).

Virtualization and Cloud Migration: Principles, Technologies, and Hands-On Labs 18


 What this means: Instead of physically installing operating systems and
applications on hardware (which can take hours or days), virtual machines can
be spun up in minutes using pre-configured templates or automation scripts.

 Why it matters: Organizations can respond faster to changing workloads,


development teams can quickly test software, and services can scale quickly
during peak periods.

2. Greater Scalability: Virtualized environments can scale seamlessly to meet


demand.
 Vertical scalability: Add more CPU, memory, or disk space to an existing VM
(scale up).
 Horizontal scalability: Launch more instances of a VM or container to handle
increased traffic (scale out).
 Why it matters: Applications remain performant and available even during
unexpected demand spikes. This elasticity is crucial for modern web services,
mobile apps, and enterprise workloads.

3. Enhanced Disaster Recovery and Portability: Virtual machines are more


resilient and easier to recover than traditional physical servers.
 Disaster Recovery: VMs can be backed up using snapshots and easily restored
to the same or a different environment. Some platforms support real-time
replication for minimal downtime.
 Portability: A VM is essentially a file (or set of files), so it can be moved
between physical servers, data centers, or even between cloud providers (e.g.,
from on-prem Proxmox to AWS EC2).
 Why it matters: In case of a failure, services can be restored quickly.
Portability also allows for hybrid or multi-cloud strategies, reducing vendor
lock-in.

Technologies Involved:

 Hypervisors (KVM, Hyper-V, VMware)


 Virtual networking (vSwitches, overlay networks)
 Virtual storage (vSAN, Ceph)

4.6 Scalability and Resource Pooling


Scalability and resource pooling are core characteristics of cloud computing, achieved
primarily through virtualization.

4.6.1 Elasticity in the Cloud


Cloud environments use virtualization to automatically scale workloads based on
demand:
 Auto-scaling groups launch or terminate VM instances based on traffic, CPU
utilization, or custom metrics.
 Horizontal scaling (scale-out) adds more VM instances or containers.
 Vertical scaling (scale-up) increases the resources (CPU, RAM) allocated to a
single VM.
Virtualization and Cloud Migration: Principles, Technologies, and Hands-On Labs 19
 Load balancers distribute workloads evenly across resources.

Cloud providers like AWS and Azure offer services like Auto Scaling Groups, Virtual
Machine Scale Sets, and Google Instance Groups to provide automated elasticity.

Key Benefits:

 Cost efficiency: Pay only for what you use


 Rapid responsiveness: Adapt to traffic spikes or drops in real-time
 Fault tolerance: Resources shift automatically during failure

4.6.2 Resource Pooling Techniques


Cloud systems abstract and share physical resources among multiple users via several
methods:

1. Hypervisor-Based Isolation
 Each user or tenant gets separate VM instances
 Resources like CPU and RAM are isolated
 Used in IaaS offerings (e.g., AWS EC2, Azure VMs)

2. Container Orchestration
 Containers are lightweight and faster to launch
 Ideal for microservices and PaaS
 Kubernetes, Docker Swarm, and OpenShift manage large-scale container
clusters with features like:
o Auto-healing (restart failed containers)
o Load balancing
o Rolling updates

3. Network and Storage Abstraction


 Virtual networks isolate tenant traffic securely
 Virtual disks (VHDs, EBS volumes) can be attached, resized, and backed up
independently
 Software-defined networking (SDN) allows programmable control over virtual
routers, firewalls, and switches

4. Resource Tags and Quotas


 Providers group virtual resources with tags for billing and access control
 Admins define quotas to prevent overuse by a single user or team

5. Multi-Tenant Isolation
 VMs and containers are sandboxed
 Encryption at rest/in transit ensures data privacy
 Role-based access control (RBAC) restricts unauthorized access

4.6.2 Tools That Enable Scalability and Pooling


 OpenStack: Open-source IaaS platform with modular components (Nova,
Neutron, Cinder)
 VMware vSphere with DRS: Dynamically balances workloads across clusters

Virtualization and Cloud Migration: Principles, Technologies, and Hands-On Labs 20


 Azure Resource Manager: Automates deployment and management of resources
 Terraform/Kubernetes: Used to orchestrate scalable infrastructure as code
(IaC)

4.7 Migrating On-Premise VMs to the Cloud


Moving workloads from local infrastructure to the cloud helps modernize IT and take
advantage of flexibility and cost benefits.

Migration Use Cases:


 Data center shutdown
 Backup and disaster recovery
 Hybrid-cloud adoption
 Application modernization

Supported Tools:

Platform Tool Description


AWS VM Import/Export Convert and migrate local VMs to EC2
Azure Azure Migrate Central tool for VM discovery,
assessment, and migration
GCP Migrate for Compute Engine Supports vSphere/Hyper-V to GCP VM
migrations

4.8 Lab: Migrate a Local VM to AWS or Azure


Objective

 Use CLI tools to export a local VM image and import it into the cloud

Prerequisites
 A local VM (e.g., from VirtualBox or VMware)
 AWS or Azure account with appropriate IAM roles
 CLI tools:

o AWS CLI & EC2 VM Import permissions


o Azure CLI & Azure Migrate project configured

AWS VM Import Walkthrough

1. Convert local VM to OVA/RAW/VHD format


2. Upload image to S3 bucket:

aws s3 cp [Link] s3://mybucket/vms/[Link]

3. Create an import task:

aws ec2 import-image \

Virtualization and Cloud Migration: Principles, Technologies, and Hands-On Labs 21


--description "Ubuntu VM" \
--disk-containers Format=ova,UserBucket={S3Bucket=mybucket,S3Key=vms/[Link]}

4. Monitor progress:

aws ec2 describe-import-image-tasks

Once complete, the imported image can be launched as a new EC2 instance.

Azure VM Migration Walkthrough

1. Install and log into Azure CLI:


az login

2. Create a resource group:


az group create --name MyResourceGroup --location eastus

3. Create a storage account and upload VHD:


az storage account create --name mystorageacct --resource-group
MyResourceGroup --location eastus --sku Standard_LRS
az storage blob upload --account-name mystorageacct --container-name vhd --
file [Link] --name [Link]

4. Create the VM from the VHD:


az vm create \
--resource-group MyResourceGroup \
--name MyMigratedVM \
--attach-os-disk [Link]
account>.[Link]/vhd/[Link] \
--os-type Linux

Summary
After completing this chapter, you should be able to:

 Explain how virtualization underpins IaaS, PaaS, and SaaS


 Understand cloud scalability and resource pooling concepts
 Perform basic VM migration using AWS and Azure CLI tools

Virtualization and Cloud Migration: Principles, Technologies, and Hands-On Labs 22


Chapter 5
Virtualization Management & Security
5.1 Virtualization Management Tools
Efficient management of virtual environments ensures optimal performance, streamlined
operations, and enhanced resilience. This section covers the industry-standard platforms
used to manage virtualization infrastructures.

Key Management Platforms:

Tool Platform Key Features


vCenter Server VMware Centralized VM management, vMotion (live
migration), DRS (distributed resource
scheduling), snapshots, templates, high
availability configurations
Hyper-V Manager Microsoft GUI-based and PowerShell-enabled VM
management, checkpoints, live migration with
Failover Cluster Manager
Proxmox VE Linux Web-based GUI, support for KVM and LXC
containers, integrated clustering, storage
management (Ceph, ZFS), scheduled backups,
high availability

Functions and Use Cases:

 VM Provisioning and De-provisioning: Rapid creation and deletion of VMs


based on demand
 Performance Monitoring: Graphical dashboards and logs for CPU, memory,
disk, and network metrics
 Access Management: Role-based access controls (RBAC), LDAP/Active
Directory integration
 Automation: Scheduled tasks (e.g., backups, snapshots), lifecycle management,
and API integrations
 Clustering and HA: Failover mechanisms and automatic restart of VMs on
alternate hosts during hardware failures

5.2 Virtualization Security Best Practices


Virtualized environments increase the attack surface due to the shared nature of
hardware and networks. Securing both the host and the guest systems is crucial.

Guest OS Hardening

 Use minimal OS installation (remove unnecessary packages/services)


 Configure firewalls and antivirus software
 Enforce strong authentication policies
 Apply security benchmarks (e.g., CIS Benchmarks, DISA STIGs)
 Encrypt VM disks and sensitive data in transit

Virtualization and Cloud Migration: Principles, Technologies, and Hands-On Labs 23


Network Segmentation and Isolation

 Utilize VLANs and virtual switches to separate traffic types:


o Management traffic
o VM-to-VM (east-west) traffic
o Storage networks (iSCSI/NFS)
 Employ virtual firewalls or micro-segmentation (e.g., VMware NSX, Azure NSG)
 Use separate NICs or virtual interfaces for different network functions
 Implement Zero Trust principles where applicable

Patch and Update Management

 Patch both the hypervisor and the guest OS regularly


 Use central update services (e.g., WSUS for Windows, Spacewalk or Katello for
Linux)
 Automate updates with tools like Ansible, Puppet, or SaltStack
 Maintain a test/staging environment to validate updates before applying to
production

5.3 Resource Optimization in Virtual Environments


Virtual infrastructure must balance the use of physical resources across potentially
dozens or hundreds of VMs.

Key Concepts and Techniques:

Term Description
Load Balancing Dynamic allocation of VMs across hosts to avoid
overloading any single node
Overprovisioning Assigning more virtual resources than physically
available, useful when average load is low
Thin Provisioning Allocates storage space as needed, rather than
reserving it in full upfront
Memory Ballooning Hypervisor technique that adjusts guest memory to
optimize host usage
Dynamic Resource Moves VMs based on current resource demand (e.g.,
Scheduling (DRS) vMotion in VMware)

⚠ Risks and Mitigations:

 Resource Contention: Monitor via dashboards and set limits/shares to


prioritize critical VMs
 Performance Bottlenecks: Use alerts to detect CPU steal time or memory
swapping
 Downtime Risks: Avoid single points of failure by using HA clusters and
redundant storage

Virtualization and Cloud Migration: Principles, Technologies, and Hands-On Labs 24


5.4 Lab: Monitoring and Automating VM Tasks
🎯 Objective
By the end of this lab, learners will:
 Monitor VM performance using native tools in each hypervisor platform
 Configure automatic VM backups and set up alerting mechanisms

Part A: Monitor VM Performance

Proxmox VE:
1. Log into the Proxmox Web UI.
2. Navigate to "Datacenter > Node > VM > Summary" to view:
o CPU usage
o Memory usage
o Disk I/O
o Network throughput
3. Check historical graphs via "Statistics" tab.
4. Use the pveperf command in the shell for host-level metrics.

VMware vCenter:
1. Log into vSphere Client.
2. Navigate to Hosts and Clusters > Select a VM.
3. Click on the "Monitor" tab > "Performance" > "Overview".
4. Add custom counters or export performance data.
5. Configure alarms for CPU, memory, and storage thresholds.

Hyper-V:
1. Open Performance Monitor ([Link]).
2. Add counters:
o Hyper-V Hypervisor Virtual Processor
o Hyper-V Hypervisor Logical Processor
o Hyper-V Dynamic Memory Balancer
3. Configure Data Collector Sets to log usage over time.
4. Use Task Manager or Resource Monitor for real-time feedback.

Part B: Configure Automated Backups and Alerts

Proxmox:
1. Navigate to Datacenter > Backup > "Add" button.
2. Choose backup mode (snapshot, suspend, stop), target storage, and VM list.
3. Set daily or weekly schedule.
4. Enable email notifications under "Datacenter > Notifications" and configure
SMTP.

VMware vCenter:
1. Use vSphere Data Protection or Veeam plugin.
2. Define backup policies and schedules.
3. Set up alert rules: Administration > System Configuration > Alarm Definitions.

Virtualization and Cloud Migration: Principles, Technologies, and Hands-On Labs 25


Hyper-V:
1. Use Windows Server Backup or install Altaro/Veeam backup.
2. Schedule backup tasks using Task Scheduler.
3. Create event-based triggers:

Register-EngineEvent -SourceIdentifier "VMAlert" -Action { Send-MailMessage -To


admin@[Link] }

Summary
After completing this chapter, learners will be able to:

 Use various management tools to administer VMs and hosts


 Apply critical security measures to both host and guest environments
 Recognize the importance of resource balancing and how to implement it
 Monitor VM performance effectively and automate vital protection tasks

Virtualization and Cloud Migration: Principles, Technologies, and Hands-On Labs 26


Chapter 6
Trends & Emerging Technologies
In today's rapidly evolving IT landscape, staying ahead means embracing and adapting to
innovative technologies that redefine traditional infrastructure models. This chapter
explores three pivotal trends shaping the future of computing: Serverless Architecture,
AI-Driven Resource Optimization, and Modern Disaster Recovery strategies. A
hands-on lab component provides practical insights into simulating disaster scenarios
and implementing intelligent resource scaling.

6.1 Serverless Computing


What is Serverless?

Serverless computing is a cloud-native development model that allows developers to


build and run applications without managing infrastructure. Despite the name, servers
are still involved—but provisioning, scaling, and maintenance are abstracted away and
handled by the cloud provider.

Key Benefits

 Automatic Scaling: Resources scale automatically with demand.


 Reduced Operational Overhead: No need to manage server infrastructure.
 Cost Efficiency: Pay only for the compute time consumed.
 Faster Time-to-Market: Focus on application logic, not infrastructure.

Popular Serverless Platforms

 AWS Lambda: Executes code in response to events (e.g., HTTP requests, file
uploads).
 Azure Functions: Offers serverless capabilities within the Microsoft ecosystem
with deep integration into Azure services.

Use Cases

 Real-time file processing (e.g., image resizing)


 Webhooks and API backends
 Scheduled jobs (e.g., report generation, backups)

6.2 AI-Driven Resource Optimization


Artificial Intelligence is revolutionizing infrastructure management by enabling
intelligent, predictive, and automated resource provisioning and tuning.

Core Concepts
 Predictive Scaling: AI models analyze traffic patterns and predict resource needs
before demand spikes.
 Dynamic Load Balancing: AI routes traffic to the most optimal servers in real-
time.
Virtualization and Cloud Migration: Principles, Technologies, and Hands-On Labs 27
 Resource Efficiency: AI helps minimize idle time and optimize usage, reducing
costs.

Key Technologies
 AWS Auto Scaling with AI: Uses ML models to anticipate traffic changes and
adjust EC2 instances or ECS tasks.
 Google Cloud Recommender: Offers optimization suggestions for resource
usage and cost-efficiency.
 Kubernetes + AI (e.g., KEDA): Enables intelligent event-driven autoscaling in
containerized environments.

Benefits

 Improved performance and user experience


 Reduced cloud costs
 Proactive rather than reactive scaling

6.3 Disaster Recovery (DR): RPO/RTO and Failover


Testing
What is Disaster Recovery?
Disaster Recovery (DR) refers to strategies and processes that enable the recovery of IT
systems and data after a catastrophic event—such as cyberattacks, natural disasters, or
system failures.

Key Metrics

 RPO (Recovery Point Objective): The maximum acceptable amount of data loss
measured in time.
 RTO (Recovery Time Objective): The maximum acceptable downtime before
operations must resume.

Metric Definition Example


RPO How much data loss is tolerable 1 hour (can lose up to 1 hour of data)
RTO How long it can take to recover 4 hours (must resume operations
within 4 hours)

Failover Testing

 Purpose: Ensure DR systems work as intended under real-world conditions.


 Types:
o Planned failover: Testing during maintenance.
o Unplanned failover: Simulating real disaster scenarios.

 Best Practices:
o Schedule regular failover drills.
o Monitor system behavior and performance during tests.
o Document findings and update DR plans accordingly.

Virtualization and Cloud Migration: Principles, Technologies, and Hands-On Labs 28


6.4 Lab Exercises
Lab 1: Simulate a Disaster Recovery Failover

Objective: Simulate a failover scenario in either Proxmox or AWS and evaluate the
system's ability to recover.

Steps:

1. Set up a Primary VM/Instance with a running application (e.g., a simple web


server).
2. Configure Backup using Proxmox backup server or AWS snapshots.
3. Introduce Failure: Shut down or corrupt the primary server.
4. Failover Execution:
o Proxmox: Restore VM from backup or replicate to another node.
o AWS: Use Route 53 to redirect traffic to a standby instance in another
region.
5. Monitor RPO/RTO Compliance.
6. Document time taken to restore service and any data loss.

Deliverables:

 A report documenting:
o RPO and RTO observations
o Failover timeline
o Lessons learned and recommendations

Lab 2: Analyze AI-Based Auto-Scaling Policies

Objective: Analyze and interpret the impact of AI-driven scaling decisions on resource
usage and performance.

Setup:

 Use AWS Auto Scaling or Kubernetes with KEDA.


 Deploy a sample web app or container.

Experiment:

1. Apply static scaling rules.


2. Apply AI/ML-based predictive scaling.
3. Generate load using tools like Apache JMeter or Locust.
4. Monitor:
o Response times
o CPU/RAM usage
o Scaling events (timestamps, triggers)

Compare & Analyze:

 Latency before and after auto-scaling


 Number of scaling events
 Cost differences (if available)

Virtualization and Cloud Migration: Principles, Technologies, and Hands-On Labs 29


 Performance stability

Deliverables:

 Graphs/charts showing usage and scaling trends.


 Summary of improvements and potential drawbacks.
 Suggestions for production deployment.

Summary
Chapter 6 provides a deep dive into cutting-edge technologies shaping the future of
infrastructure management. Serverless platforms allow developers to innovate without
worrying about infrastructure, AI is bringing intelligence to resource optimization, and
robust disaster recovery strategies ensure business continuity. The hands-on labs solidify
these concepts by simulating real-world challenges and showcasing how to respond
effectively using modern tools.

Virtualization and Cloud Migration: Principles, Technologies, and Hands-On Labs 30

You might also like