0% found this document useful (0 votes)
3 views23 pages

Virtualization Lecture2

This document outlines Unit 2 of a course on Virtual Systems & Services, focusing on hypervisors and virtual machines. It compares major hypervisor platforms such as VMware ESXi, Microsoft Hyper-V, and Citrix Xen, detailing their architectures, features, and market shares. Additionally, it explains the workings of virtual machines, including their components, resource management, and operational processes.

Uploaded by

Affia Zafar
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)
3 views23 pages

Virtualization Lecture2

This document outlines Unit 2 of a course on Virtual Systems & Services, focusing on hypervisors and virtual machines. It compares major hypervisor platforms such as VMware ESXi, Microsoft Hyper-V, and Citrix Xen, detailing their architectures, features, and market shares. Additionally, it explains the workings of virtual machines, including their components, resource management, and operational processes.

Uploaded by

Affia Zafar
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

Unit 2

Comparing Hypervisors
& Understanding
Virtual Machines

VMware ESX · Citrix Xen · Microso4 Hyper-V · VM Internals · Clones · Snapshots ·


OVF · Containers

BS Informa+on Technology • 8th Semester • AGS University • Virtual Systems & Services
Lecture Outline – Unit 2

01 Comparing Today's Hypervisors 06 Storage in a VM & How a VM Works

02 VMware ESX / ESXi Deep Dive 07 Working with VMs

03 Citrix Xen & Microso? Hyper-V 08 Clones & Templates

04 Describing a Virtual Machine 09 Snapshots

05 CPUs, Memory & Network in a VM 10 OVF & Containers

AGS University | Virtual Systems & Services | BS IT 8th Semester


Comparing Today's Hypervisors
VMware ESX · Citrix Xen · Microsoft Hyper-V · Other Solutions

BS IT 8th Semester • AGS University


The Modern Hypervisor Landscape Comparing Hypervisors

Four major plaNorms dominate enterprise virtualizaPon. Each has disPnct architecture, licensing models, and ideal use cases.

🔵 🟦 🟩 🟧

VMware ESXi Microso3 Citrix KVM / Other


/ vSphere Hyper-V Xen / XenServer Open-Source

~62% ~21% ~9% ~8%


Market Share Market Share Market Share Market Share

Enterprise Grade Enterprise Grade Enterprise Grade Enterprise Grade


Type 1 Hypervisor Type 1 Hypervisor Type 1 Hypervisor Type 1 Hypervisor

Source: IDC Virtualiza2on Market Report (approximate figures). KVM increasingly used in OpenStack/public cloud environments.
AGS University | Virtual Systems & Services | BS IT 8th Semester
VMware ESX & ESXi – The Industry Leader Comparing Hypervisors

ESXi Architecture Key Facts

Originally ESX (2001)


VM 1 | VM 2 | VM 3 | VM N
Had a Service Console (Linux-based). ESXi replaced it — 'i' = installable, smaller
footprint (~150 MB).

VMkernel (Hypervisor Core)


VMkernel
Proprietary microkernel managing CPU scheduling, memory, storage I/O and
VMware vCenter (Management) networking for all VMs.

vSphere Suite
Physical Hardware (x86 Server)
ESXi is the hypervisor; vSphere adds vCenter, vMoTon, HA, DRS, vSAN for
enterprise management.

vMoKon – Live MigraKon


Move running VMs between physical hosts with ZERO downTme — a VMware
breakthrough innovaTon.

Licensing
ESXi free (limited). vSphere Enterprise Plus needed for advanced features.
Acquired by Broadcom in 2023.

AGS University | Virtual Systems & Services | BS IT 8th Semester


Citrix XenServer – Open-Source Roots Comparing Hypervisors

Origin: Xen hypervisor was developed at the University of Cambridge (2003) and released as open source. Citrix acquired XenSource in 2007,
creaPng XenServer. Now conPnued as XCP-ng (open source) and Citrix Hypervisor (commercial).

Xen Architecture – ParavirtualizaCon Key Features & Use Cases

Paravirtualization (PV)
Dom0 (Privileged Domain) Guest OS is modified to be aware of the hypervisor — gives near-naAve
Host OS – Controls Hardware Access performance without hardware-assist.

Hardware Virt. (HVM)


DomU (Guest VMs) Full virtualizaAon using Intel VT-x / AMD-V. Runs unmodified guest OSes (Windows,
Full Virt. (HVM) or Para-Virt. (PV) standard Linux).

Dom0 / DomU model


Xen Hypervisor (Thin Layer) Dom0 is the privileged control domain. Guest VMs (DomU) are unprivileged —
strong isolaAon.

XenMoKon
x86 / x86-64 Hardware
Live migraAon of VMs between hosts, similar to VMware vMoAon. Requires shared
storage.

Amazon AWS Roots


AWS originally ran on Xen hypervisor for EC2. Now transiAoning to KVM-based Nitro
hypervisor.

AGS University | Virtual Systems & Services | BS IT 8th Semester


MicrosoE Hyper-V – Windows-NaHve Hypervisor Comparing Hypervisors

Hyper-V is Microso?'s Type 1 hypervisor, built into Windows Server 2008 R2+ and Windows 10/11 Pro. It uses a microkernel architecture with
a privileged parent parPPon (equivalent to Xen's Dom0).

Hyper-V Architecture Key Features

Parent ParKKon Integrated with Windows


No separate install needed on Windows Server — enable the role. Free with Server
(Windows Server / Win 10+) license.

Live MigraKon
Child Partitions (VMs) Move running VMs between Hyper-V hosts — similar to vMoAon. Requires Failover
Guest OSes (Win/Linux) Cluster.

Hyper-V Replica
Async replicaAon of VMs to a secondary site for disaster recovery — built-in, no
Hyper-V Hypervisor extra cost.

Azure IntegraKon
Hyper-V is the hypervisor beneath Microso[ Azure. Seamless hybrid cloud
Physical Hardware scenarios.

GeneraKon 1 vs 2
Gen 2 VMs use UEFI, Secure Boot, SCSI boot — faster and more secure than Gen 1
(BIOS).

Free Hyper-V Server


Standalone free Hyper-V Server SKU available (limited GUI, CLI-managed).

AGS University | Virtual Systems & Services | BS IT 8th Semester


Side-by-Side Hypervisor Comparison Comparing Hypervisors

Feature VMware ESXi Citrix Xen Microsoft Hyper-V KVM (Linux)

Type Type 1 (Bare-Metal) Type 1 (Bare-Metal) Type 1 (Bare-Metal) Type 1 (Kernel Module)

Host OS Needed No No (Dom0 = Linux) Yes (Windows) Yes (Linux kernel)

Guest OS Win, Linux, macOS Win, Linux (HVM/PV) Win, Linux Win, Linux, BSD

Live Migration vMotion XenMotion Live Migration KVM live migration

Management UI vCenter (paid) XenCenter / Xen-API Hyper-V Manager oVirt / Cockpit / CLI

License Commercial (costly) Open Source / Commercial Free (with Windows) Fully Open Source

Best For Enterprise Data Center Cloud / Open Source Microsoft Shops Linux / OpenStack Cloud

Cloud Usage Private cloud vSphere AWS (historically) Microsoft Azure Red Hat Cloud / OpenStack

AGS University | Virtual Systems & Services | BS IT 8th Semester


Understanding Virtual Machines
Describing VMs · CPUs · Memory · Network · Storage · How a VM Works

BS IT 8th Semester • AGS University


Describing a Virtual Machine Virtual Machines

DefiniKon: A Virtual Machine (VM) is a so?ware-based computer that emulates a physical machine. It runs its own operaPng system
and applicaPons, completely isolated from other VMs and the underlying physical host, sharing physical hardware resources managed
by the hypervisor.

Anatomy of a Virtual Machine What Makes a VM Special?

Stored as Files
ApplicaKons
📁 A VM is just a set of files (.vmdk, .vmx) on a disk. Move files = move the
enTre computer.

Guest OperaKng System (e.g. Windows 11 / Ubuntu) Fully Isolated


🔒 VMs cannot see each other's memory or disk. One crash never affects
siblings or host.
Virtual Hardware
(vCPU · vRAM · vNIC · vDisk) Hardware Independent
🔄 A VM runs on any compaTble host. Eliminate hardware compaTbility
concerns permanently.
Hypervisor (VMM) – Manages Virtual Hardware
Near-NaKve Performance
⚡ Modern CPUs (VT-x / AMD-V) allow VMs to run most workloads at near-
Physical Server Hardware naTve speeds.

Snapshoaable
📸 Capture the entire VM state in seconds. Restore instantly if anything
goes wrong.
AGS University | Virtual Systems & Services | BS IT 8th Semester
Examining CPUs in a Virtual Machine Virtual Machines

vCPU (Virtual CPU): A virtual processor presented to the guest OS. The hypervisor maps vCPUs to physical CPU cores using a scheduler.
A VM 'sees' vCPUs as real processors.

vCPU to pCPU Mapping CPU Overcommitment


Each vCPU is scheduled to run on a physical CPU core by the hypervisor You can assign more vCPUs to all VMs than physical cores exist. Works well if
scheduler. MulTple VMs share physical cores via Tme-slicing. A 4-core host can VMs are not all 100% busy simultaneously. Ratio of 4:1 to 8:1 (vCPU:pCPU) is
run VMs with more total vCPUs than 4 (overcommit). common in production.

Hardware-Assisted Virt. CPU Affinity & Reservations


Intel VT-x and AMD-V are CPU extensions that allow VMs to run privileged Admins can pin a vCPU to a specific physical core (affinity), or reserve CPU
instrucTons directly on hardware (ring -1). This replaces slower binary MHz/GHz for criTcal VMs to guarantee minimum performance regardless of
translaTon used before 2005. host load.

NUMA Awareness CPU Hot-Add


On mulT-socket servers, Non-Uniform Memory Access (NUMA) means memory Some hypervisors support adding vCPUs to a running VM without rebooting.
access speed varies. Hypervisors try to keep a VM's vCPUs and vRAM in the Requires the guest OS to support CPU hot-plug (most modern Linux/Windows
same NUMA node for best performance. do).

AGS University | Virtual Systems & Services | BS IT 8th Semester


Examining Memory in a Virtual Machine Virtual Machines

vRAM is the virtual RAM presented to a guest OS. The hypervisor maps guest physical memory to real host memory using a translaPon layer
(Extended Page Tables / Nested Paging for performance).

Memory TranslaCon Layers Memory Management Techniques

Guest Virtual Memory Transparent Page Sharing (TPS)


(App sees this) Hypervisor scans RAM of all VMs. IdenAcal memory pages are deduplicated — one
copy shared. Saves 10–30% RAM in homogeneous environments.
↓ maps to
Memory Ballooning
A balloon driver in the guest inflates/deflates to reclaim underused guest RAM.
Guest Physical Memory
Hypervisor redistributes it to VMs that need it more.
(Guest OS manages this)

↓ maps to Memory Swapping


Last resort: hypervisor swaps guest RAM to a swap file on disk. Very slow — avoid by
not overcommitting memory aggressively.
Host Physical Memory
(Hypervisor maps here) Memory ReservaKons
Guarantee a fixed amount of physical RAM for criAcal VMs (e.g. databases). Host will
↓ maps to
never swap reserved memory to disk.

Physical DRAM Hot-Add Memory


(Server RAM sKcks) Add RAM to a running VM without reboot. Guest OS must support memory hot-
plug. Useful for producAon database VMs.

AGS University | Virtual Systems & Services | BS IT 8th Semester


Examining Network Resources in a Virtual Machine Virtual Machines

Virtual Networking Architecture Virtual Network Concepts

vNIC (Virtual NIC)


Each VM gets one or more virtual network adapters. Guest OS sees it as a real
Ethernet card (e.g. VMXNET3, E1000e).

Virtual Switch (vSwitch)


So[ware switch inside the hypervisor. Routes traffic between VMs on same host, and
forwards to physical network via uplink.

Port Groups / VLANs


Organize VMs into logical networks using VLANs. A port group tags/untags VLAN IDs
VM 1 VM 2 VM 3 for traffic segmentaAon and security.
vNIC vNIC vNIC
Network Modes
Bridged: VM on physical LAN. NAT: VM behind host IP. Host-Only: VM talks only to
host. Used in VMware WorkstaAon.
Virtual Switch (vSwitch)
Connects VMs & uplinks to physical network Distributed vSwitch
vSphere Distributed Switch spans multiple ESXi hosts — centralized network policy
management across the entire cluster.

SR-IOV & DPDK


Physical NIC (pNIC) – Uplink to Physical Network
High-performance opAons: SR-IOV bypasses hypervisor for near bare-metal NIC
performance. Used for latency-sensiAve workloads.

AGS University | Virtual Systems & Services | BS IT 8th Semester


Examining Storage in a Virtual Machine Virtual Machines

VMs use virtual disks — files stored on a host file system or shared storage (SAN/NAS). The guest OS sees a standard virtual disk controller
and interacts with it like physical hardware.

Virtual Storage Stack Key Storage Concepts

Guest OS File System Thin vs Thick Provisioning


(NTFS, ext4, ZFS) Thin: disk grows as data is wrieen (saves space). Thick Eager: all space pre-allocated
(beeer performance). Thick Lazy: space reserved but not zeroed.

Virtual Disk Controller Virtual Disk Formats


(SCSI / SATA / NVMe virtual) .vmdk (VMware) · .vhd/.vhdx (Microsoft) · .qcow2 (KVM/QEMU). Formats determine
features like snapshots, compression, encryption.

Shared Storage (SAN/NAS)
Virtual Disk File
(.vmdk / .vhd / .qcow2) MulAple ESXi hosts share a common datastore over iSCSI, FC, or NFS. Required for live
migraAon (vMoAon) and HA clustering.

vSAN (HCI Storage)
Datastore / Storage Pool
VMware vSAN pools local SSD/HDD from mulAple hosts into a shared datastore —
(SAN · NAS · vSAN · Local)
eliminates dedicated SAN hardware.

Storage vMoKon
Physical Storage Hardware Migrate a running VM's virtual disks to a different datastore without downAme.
(SSD · HDD · NVMe · SAN Array) EssenAal for storage maintenance and Aering.
AGS University | Virtual Systems & Services | BS IT 8th Semester
Understanding How a Virtual Machine Works Virtual Machines

Step-by-Step: What Happens When You Power On a VM

VM Files Loaded Virtual BIOS/UEFI Runs

1 2
Hypervisor reads the VM configuraTon file (.vmx/.xml). Allocates The VM's virtual firmware initializes virtual hardware — just like a
vCPUs, vRAM, virtual disks, and vNICs as specified. physical PC BIOS POST. Loads bootloader from virtual disk.

Guest OS Boots CPU InstrucCon ExecuCon

3 4
Guest OS kernel loads into vRAM. Detects virtual hardware (virtual Guest vCPUs execute most instrucTons naTvely on physical cores (via
CPU, disk controller, NIC). Installs hypervisor drivers (VMware Tools / VT-x). Privileged instrucTons are intercepted & emulated by
Guest Additions). hypervisor.

Memory Access I/O (Disk & Network)

5 6
Guest accesses vRAM. Hypervisor EPT maps guest physical→host Guest I/O requests go to virtual device drivers → hypervisor I/O stack
physical addresses. TLB used for fast repeated lookups. → physical hardware. Hypervisor queues and schedules requests
across VMs.

AGS University | Virtual Systems & Services | BS IT 8th Semester


Working with Virtual Machines Virtual Machines

Day-to-Day VM Operations Administrators Perform

Power On / Off / Suspend Console Access


▶ Start, stop, hibernate a VM. Suspend saves RAM state to disk — like 📋 Open a virtual monitor/keyboard. Access VM even when network is
closing a laptop. Resumes instantly. down. vSphere Web Console, VMRC, or RDP.

Install Guest Tools Live Migration


📦 VMware Tools / VirtualBox Guest AddiTons improve performance
(VMXNET3 NIC, PVSCSI) and enable features like drag-drop, shared
↔ Move a running VM to another host (vMoTon/XenMoTon/Live
MigraTon). Zero downTme. Requires shared storage or shared-
clipboard. nothing migraTon.

Edit VM Hardware Monitor Performance


⚙ Add/remove vCPUs, vRAM, disks, NICs without or with shutdown. 📊 View CPU Ready, memory balloon, disk latency, and network
throughput. vCenter, Hyper-V Manager, or Xen XenCenter provide
Hot-add requires guest OS support.
dashboards.

Snapshots Delete / Archive VM


🔒 Point-in-Tme captures for before/aner tesTng or patching. Revert in 🗑 Remove VM files from datastore or export/archive to OVF/OVA for
seconds. (Covered in detail next.) long-term storage or portability.

AGS University | Virtual Systems & Services | BS IT 8th Semester


Clones, Templates, Snapshots & OVF
VM Management Features · Rapid Deployment · Portability

BS IT 8th Semester • AGS University


Understanding Virtual Machine Clones Clones & Templates

Clone: An exact copy of a virtual machine at a specific point in time. The clone is an independent VM with its own unique identity (MAC
address, UUID). Changes to the clone do not affect the original.

📦 Full Clone 🔗 Linked Clone

• Complete copy of the enPre virtual disk • Shares a common base disk with parent (snapshot)
• Fully independent — no dependency on source VM • Only stores the differences from the parent (delta)
• Occupies the same storage as the original VM • Creates very quickly — minimal disk space used
• OperaPons on clone don't affect source at all • Requires parent VM to remain accessible
• Best for: long-term standalone deployments • Best for: dev/test labs, VDI pools, rapid tesPng
• Slower to create (must copy enPre disk) • Performance may degrade as delta disk grows
• Recommended for producPon VM duplicates • Instant provisioning — seconds vs minutes

AGS University | Virtual Systems & Services | BS IT 8th Semester


Understanding Templates Clones & Templates

Template: A master image of a VM that has been converted into a non-runnable, read-only gold image. New VMs are instantly
deployed from templates — like a stamp that produces identical VMs each time.

Template Workflow

2 3 4 5
1
Build Master VM → Install OS & → Sysprep/Seal → Convert to → Deploy New
Apps (Remove unique IDs) Template VMs from Template

Why Use Templates? Template vs Clone vs Snapshot

• Deploy new VMs in seconds — no manual OS install Template


• Enforce standardized, hardened configuraPons across all VMs Gold image, not runnable, used to deploy new VMs
• Ensure consistent patch levels for all deployed systems
Full Clone
• Sysprep removes SID, hostname — each clone gets unique idenPty
Running, independent copy of source VM
• EssenPal for VDI (Virtual Desktop Infrastructure) pools
Snapshot
Point-in-time state capture — not a new VM

AGS University | Virtual Systems & Services | BS IT 8th Semester


Understanding Snapshots Snapshots

Snapshot: A point-in-Pme capture of a VM's complete state — including memory contents, disk state, and VM sefngs. The hypervisor
creates a delta disk to track subsequent changes. ReverPng erases all changes made a?er the snapshot.

Snapshot Chain (How Snapshots Work)

Base Disk Snapshot 1 Delta Disk 1 Snapshot 2 Delta Disk 2


(Original VM) → (Before Patch) → (Changes a[er snap1) → (A[er Patch OK) → (Ac\ve – current changes)

← Revert goes backward | Dele4ng snapshot merges delta into parent →

✅ Good Uses for Snapshots ⚠ Snapshot AnC-PaZerns

• Before applying OS patches or so?ware updates • DON'T keep snapshots long-term — delta disks grow and slow I/O
• Before making risky configuraPon changes • DON'T use as a backup — they are NOT a backup soluPon
• Short-term tesPng in dev/test environments • DON'T snapshot databases without quiescing (data integrity risk)
• Quick rollback in case something breaks • Keep snapshot chains to 2–3 maximum for performance

AGS University | Virtual Systems & Services | BS IT 8th Semester


Understanding OVF – Open VirtualizaHon Format OVF & Portability

OVF (Open VirtualizaKon Format): An open, vendor-neutral standard (DMTF) for packaging and distribuPng virtual appliances. Defines VM
hardware, OS, and so?ware configuraPon in a portable, interoperable format usable across different hypervisors.

OVF Package Contents OVF vs OVA & Use Cases

Descriptor file (XML). Contains VM metadata — hardware OVF vs OVA


.ovf config, network, disk references.
OVF = folder with mulTple files (.ovf + .vmdk + .mf). OVA = single compressed
.tar archive containing all OVF files — easier to transfer as one file. OVA is the
most common distribuTon format.
Virtual disk image(s). The actual disk content of the VM being
.vmdk exported.
VM Portability
Export a VM from VMware, import into VirtualBox or KVM — same OVA file.

.mf Manifest file. SHA hashes of all files for integrity verificaTon. Virtual Appliances
Vendors distribute pre-built servers (routers, firewalls, apps) as OVA files.

Optional certificate for signing — verifies publisher Cloud Migration


.cert authenticity. Import OVF/OVA to AWS, Azure, GCP or on-prem cloud plajorms.

Backup & Archiving


OVA exports provide a portable, self-contained VM backup for long-term storage.

AGS University | Virtual Systems & Services | BS IT 8th Semester


Understanding Containers Containers

Container: A lightweight, portable unit of so?ware that packages an applicaPon and all its dependencies (libraries, configs) into a single
bundle. Containers share the host OS kernel — unlike VMs which need a full guest OS.

VM vs Container Architecture

Virtual Machines Containers

App A App B App C


App A App B App C
+Deps +Deps +Deps
Guest OS Guest OS Guest OS
vs

Hypervisor Container RunCme (Docker / containerd)

Host OS + Hardware Host OS Kernel (Shared) + Hardware

Size Start Time Isola\on Portability


CT: Seconds / CT: Process-level CT: Any OS with same
VM: GBs (full OS) CT: MBs (app+libs only) VM: Minutes VM: Strong (full OS) VM: Hypervisor-+ed
milliseconds isola+on kernel

Docker · Kubernetes · Podman Docker · Kubernetes · Podman Docker · Kubernetes · Podman Docker · Kubernetes · Podman

AGS University | Virtual Systems & Services | BS IT 8th Semester


Summary

Key Takeaways – Unit 2


01 VMware ESXi leads the market; Hyper-V dominates Windows shops; Xen/KVM power open-source clouds

02 A VM is a so?ware computer stored as files, with vCPU, vRAM, vNIC and vDisk managed by the hypervisor

03 vCPUs can be overcommitted; Intel VT-x / AMD-V enables hardware-assisted virtualization for performance

04 Memory techniques: TPS deduplicaPon, ballooning, swapping, and reservaPons manage vRAM efficiently

05 vSwitches connect VMs internally; port groups & VLANs segment traffic; pNICs are shared uplinks

06 Thin/thick provisioning trade storage efficiency vs. performance; vMoPon needs shared storage

07 Full Clone = independent copy; Linked Clone = delta sharing parent; Template = gold image for deployment

08 Snapshots = point-in-Pme state — great for patching safety, NOT a backup; keep chains short

09 OVF/OVA = open portability standard; Containers share kernel, start in ms, weigh MBs vs VM GBs

BS Information Technology • 8th Semester • AGS University • Virtual Systems & Services

You might also like