Cloud Computing and Security Module 2
Cloud Computing and Security Module 2
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Technical Definition Virtualization is the technical process of creating virtual instances of computing resources—
including servers, storage, networks, or operating systems—on a single physical machine. It facilitates the
simultaneous and independent operation of multiple virtual environments on the same underlying hardware,
thereby significantly improving resource utilisation, scalability, and flexibility.
The Virtualization Process The process involves transforming a machine’s traditional architecture by inserting a
specialized software layer, known as the Virtual Machine Monitor (VMM) or Hypervisor, between the physical
hardware and the operating systems. This layer converts real hardware into virtual hardware, allowing disparate
operating systems, such as Linux and Windows, to coexist on the same physical host. Most virtual processor
instructions execute directly on the physical hardware to maintain efficiency, while sensitive instructions are trapped
and managed by the VMM.
• Maximised Resource Utilisation: Virtualization eliminates the underutilisation common in traditional "one-
server-one-task" models by sharing CPU, RAM, and storage among several Virtual Machines (VMs).
• Cost Efficiency: It leads to lower capital expenditure (CAPEX) on hardware and reduced operational
expenditure (OPEX) regarding power, cooling, and maintenance.
• Isolation and Security: Each VM is logically isolated; if an application crashes or a security breach occurs in
one VM, the impact is contained, and other virtual instances remain unaffected.
• Dynamic Scalability: Resources can be allocated or reallocated dynamically without the need for new
physical hardware acquisitions.
• Disaster Recovery: The use of snapshots and templates allows for rapid recovery and easy maintenance in
the event of system failure.
--------------------------------------------------------------------------------
Technical Definition The virtualization layer is a sophisticated software abstraction that hides the complexities of
physical hardware (CPU, memory, storage, network) and presents them as discrete virtual resources to guest
operating systems and applications. It serves as a critical bridge and mediator between the physical substrate and the
virtual instances.
• Abstraction: It hides the specific details of the underlying hardware, allowing virtual instances to operate
independently of the hardware manufacturer's specifications.
• Isolation: It implements strict boundaries ensuring that processes in one container or VM do not interfere
with those in another.
• Resource Allocation: It dynamically distributes physical resources based on the real-time demands of the
guest environments.
• Portability: It encapsulates the state of a VM, allowing it to be moved seamlessly across different physical
hosts.
Benefits The layer ensures compatibility, allowing different operating systems to run on the same machine, and
facilitates disaster recovery through easy snapshots and migrations. It consolidates multiple workloads onto fewer
physical nodes, further driving data centre efficiency.
--------------------------------------------------------------------------------
What is a VMM? A Virtual Machine Monitor (VMM), or Hypervisor, is the specific software or hardware component
responsible for creating, managing, and running virtual machines on a host system. It provides the essential
abstraction and resource partitioning required for multiple VMs to share physical hardware.
VMM Design Requirements According to standard VTU terminology, a VMM must satisfy three key criteria:
1. Equivalent Environment: It must provide an execution environment essentially identical to the original
physical machine.
2. Performance Efficiency: It must minimise performance overhead, ensuring most instructions execute directly
on hardware.
3. Resource Control: It must maintain absolute control over all system resources.
Technical A specific component (software/hardware) The broader abstraction layer virtualising all
Definition that manages VMs. resources.
Role Directly responsible for managing VM Encompasses the VMM plus APIs, drivers, and
hardware access. management tools like SDN/SDS.
Scope Focused strictly on the lifecycle of VMs. Operates at multiple levels: hardware, OS, storage,
and networks.
Components Virtual CPUs, device emulation, virtual VMM, management tools (vCenter), virtual switches,
memory management. and drivers.
--------------------------------------------------------------------------------
4. Levels of Virtualization Implementation
Virtualization can be implemented across five abstract levels, each with different performance and flexibility trade-
offs.
1. Instruction Set Architecture (ISA) Level Virtualization occurs at the ISA level through instruction set emulation.
This allows code written for one architecture (e.g., MIPS) to run on another (e.g., x86) by interpreting instructions
one-by-one or using Dynamic Binary Translation to cache translated blocks of code.
2. Hardware Abstraction Layer (HAL) Level This level virtualises hardware components directly on physical resources.
Bare-metal hypervisors (Type 1) operate here without a host OS, providing near-native performance for virtual
machines.
3. Operating System Level Implemented at the OS kernel layer, this creates isolated containers or Virtual Private
Systems (VPS). All containers share the same underlying OS kernel, making this a lightweight approach with minimal
overhead, though it limits containers to the same OS family.
4. Library Support Level Virtualization intercepts the interface between an application and the OS by remapping API
or Application Binary Interface (ABI) calls. It allows "alien" programs to run on different platforms without virtualising
the entire OS.
5. User-Application Level Also called process-level virtualization, it treats individual applications as virtualised
entities. High-Level Language (HLL) Virtual Machines provide an abstraction layer for running code written in specific
languages.
--------------------------------------------------------------------------------
• WABI: Middleware that translates Windows system calls into Solaris calls, enabling Windows apps to run on
Solaris.
• Lxrun: An emulator allowing Linux applications designed for x86 to run on various UNIX systems.
• WINE: Provides library support to virtualise x86 processors, facilitating the execution of Windows
applications on UNIX-based systems.
• Visual MainWin: A compiler-based system that allows Windows applications to be compiled for and run on
UNIX hosts.
• vCUDA: A specialised virtualization solution for GPGPUs, enabling applications in a guest OS to access
hardware GPU resources on the host via a client-server model (vCUDA Library and vCUDA Stub).
The vCUDA framework operates on a client-server model consisting of three primary technical components:
o Its primary function is to intercept and redirect CUDA API calls from the application to the host
machine.
o It is responsible for managing the Virtual GPUs (vGPUs) visible to the guest environment.
o Acts as an abstraction of the actual GPU hardware, providing a uniform and consistent interface to
the application.
o Manages device memory allocation by mapping virtual addresses in the Guest OS to real device
memory in the Host OS.
o It tracks and stores the flow of CUDA API calls to ensure they are executed in the correct sequence on
the physical hardware.
o It receives the redirected API requests from the vCUDA library in the Guest OS.
o It creates the necessary execution contexts for these calls and directly manages the physical GPU
resources through the host's native device drivers.
--------------------------------------------------------------------------------
Operational Workflow
The execution of a CUDA task in this architecture follows a specific four-step sequence:
• Step 1: The CUDA application running on the Guest OS issues an API call to the vCUDA library.
• Step 2: The vCUDA library intercepts the call and redirects it across the VM boundary to the vCUDA stub on
the Host OS.
• Step 3: The vCUDA stub interprets the request, executes the task on the physical GPU, and collects the
output.
• Step 4: The results are returned from the Host OS back to the Guest OS application.
--------------------------------------------------------------------------------
• Benefit: Enables GPU acceleration in virtualized environments without requiring complex hardware-level VM
modifications.
• Challenge: Performance is heavily dependent on the efficiency of the API call redirection and the overhead
of the client-server communication between the Guest and Host OSes
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Technical Definition: A Virtual Machine Monitor (VMM), also known as a Hypervisor, is a software layer or hardware
component that mediates access between the physical hardware and multiple Guest Operating Systems. It is the core
engine of virtualization, responsible for creating, managing, and isolating Virtual Machines (VMs).
VMM Design Requirements (Potential 10-Mark Question): According to standard virtualization theory, a VMM must
satisfy three critical requirements:
1. Equivalent Environment: The VMM must provide an execution environment that is essentially identical to
the original physical machine.
2. Performance Efficiency: To be practical, the VMM must minimize performance overhead. Most virtual
processor instructions should execute directly on physical hardware without VMM intervention.
3. Complete Resource Control: The VMM must maintain absolute control over system resources, including CPU,
memory, and I/O devices.
Classes of VM Architectures: VMM architectures are typically categorized into three classes based on their
placement in the system stack:
• Hypervisor Architecture (Type 1): The hypervisor operates directly on the hardware layer, acting as the
primary virtualization layer. Examples include VMware ESX and Xen.
• Para-Virtualization: This architecture involves a modified Guest OS that collaborates with the virtualization
layer to reduce overhead.
• Host-Based Virtualization (Type 2): The virtualization layer runs as an application on top of a Host OS (e.g.,
VMware Workstation). It is easier to implement but less efficient due to the extra OS layer.
--------------------------------------------------------------------------------
Technical Distinction of Hypervisors: Hypervisors are classified based on their internal structure:
• Micro-Kernel Hypervisor: Includes only essential functions like memory management and scheduling.
Drivers are kept outside the hypervisor (e.g., Microsoft Hyper-V).
• Monolithic Hypervisor: Integrates all functionalities, including device drivers, within the hypervisor itself
(e.g., VMware ESX).
The Xen Architecture (8-Mark Specialization): Xen is a prominent open-source microkernel hypervisor. Its
architecture is defined by its use of "Domains":
• Domain 0 (Dom0): A highly privileged guest VM that is the first OS to load. It has direct hardware access and
is responsible for managing other guest VMs (I/O, resource allocation).
• Security Insight: Because Dom0 controls the entire system, its security is paramount; a compromise in Dom0
allows an attacker to control all virtual machines.
--------------------------------------------------------------------------------
Technical Mechanism: Full Virtualization allows a Guest OS to run completely unmodified. Since the Guest OS is
unaware it is being virtualized, the VMM must handle "critical" instructions that could compromise the system.
• Binary Translation: The VMM traps critical instructions issued by the Guest OS and translates them into safe,
emulated instructions on the fly.
• Native Execution: To maintain performance, non-critical instructions execute directly on the hardware.
• Protection Rings: In this model, the VMM typically operates at Ring 0 (most privileged), while the Guest OS is
forced to operate at Ring 1.
Performance Merits:
--------------------------------------------------------------------------------
Technical Mechanism: Para-virtualization optimizes performance by modifying the Guest OS kernel. It replaces non-
virtualizable privileged instructions with Hypercalls.
• Hypercalls: These are specialized calls that allow the Guest OS to communicate directly with the hypervisor
to carry out the virtualization process.
• Compiler Support: An "intelligent compiler" is used during the development of the Guest OS to identify and
replace these instructions with hypercalls.
• Efficiency: Because it avoids the overhead of binary translation, para-virtualization allows VM execution to be
much closer to native performance.
• Disadvantage: Lower "Application Flexibility" because the Guest OS must be modified. It cannot run
unmodified operating systems like legacy Windows unless hardware-assisted virtualization is present.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
1. Guest OS Level: Maps Virtual Memory (VA) to Physical Memory (PA), which is the VM's view of
memory.
2. VMM Level: Maps the Guest's Physical Memory (PA) to the actual Machine Memory (MA) on the
hardware.
• Shadow Page Tables (SPT): This is a software-based solution where the VMM maintains a "shadow" version
of the guest's page tables. The SPT maps the Guest VA directly to the Machine MA to avoid a double lookup
during execution. While it reduces guest overhead, it increases the VMM's memory consumption and
implementation complexity.
• Extended Page Tables (EPT): Intel’s hardware-assisted solution that replaces SPTs. It uses a four-level page
table hierarchy and an EPT TLB to cache translations, significantly reducing memory lookup time and
offloading the translation task to the hardware.
• "Discuss the technical challenges in memory virtualization. Compare the operation and performance of
Shadow Page Tables versus Intel’s Extended Page Tables (EPT)." (10 Marks).
--------------------------------------------------------------------------------
Detailed Explanation: I/O virtualization allows multiple VMs to share physical hardware devices efficiently while
maintaining isolation.
• Full Device Emulation: The VMM emulates well-known hardware devices. The Guest OS interacts with this
virtual device, and the VMM remaps and routes these requests to the real physical hardware. This supports
unmodified guest OSes but has high overhead due to software emulation.
• Para-Virtualization (Split Driver Model): Used in systems like Xen, this model uses a Frontend driver in the
Guest OS (Domain U) and a Backend driver in the hypervisor (Domain 0). Communication occurs through
shared memory, offering better performance than emulation but requiring a modified guest OS.
• Direct I/O Virtualization: This allows a VM to access a physical device directly, bypassing the VMM. It
provides near-native performance and lower CPU overhead but makes reclaiming devices after a VM
migration very difficult.
• Hardware-Assisted I/O (VT-d): Intel technology that supports DMA remapping and interrupt remapping,
enabling unmodified guest OSes to access I/O resources with high efficiency.
• "Compare the three main methods of I/O virtualization: Full Device Emulation, Para-virtualization (Split
Driver), and Direct I/O. What are the advantages of hardware-assisted I/O (VT-d)?" (10 Marks).
--------------------------------------------------------------------------------
Detailed Explanation: As processors move toward multi-core and many-core designs, virtualizing these resources
introduces new complexities.
2. Task Scheduling: High-efficiency algorithms are required to distribute tasks across cores while
balancing performance and power consumption.
3. Dynamic Heterogeneity: Managing chips that combine different types of cores (e.g., "fat" CPU cores
and "thin" GPU cores) makes resource allocation highly complex.
• Implementation Mechanisms:
1. Virtual Processor Cores (VCPUs): These abstract the hardware management, allowing the system to
expose more virtual CPUs to the software than there are physical cores actually present.
2. Virtual Hierarchies: These adapt the cache and coherence structures to optimize workload
distribution, which reduces cache misses and improves the isolation between different VMs.
• "What are the unique challenges faced when virtualizing multi-core processors? Explain how Virtual
Processor Cores (VCPUs) and Virtual Hierarchies help in managing these resources." (10 Marks).
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Technical Explanation: The fundamental difference between these two lies in how resources are partitioned and
managed.
• Physical Cluster: A collection of stand-alone physical servers (nodes) interconnected via a high-speed
network (LAN or SAN) to function as a single integrated computing resource.
• Virtual Cluster: A logical cluster formed by Virtual Machines (VMs) that are spread across multiple physical
machines. These VMs are interconnected through a virtual network.
1. Dynamic Mapping: VMs can be assigned to physical nodes dynamically based on resource availability.
2. Heterogeneity: Each VM in a virtual cluster can run a different Operating System (e.g., one node on Linux,
another on Windows) regardless of the host OS.
3. Elasticity: Virtual clusters can expand or shrink in size (add or remove VMs) dynamically to meet workload
demands.
4. Fault Isolation: If a physical host fails, only the VMs residing on that specific host are affected; the rest of the
virtual cluster continues to operate.
--------------------------------------------------------------------------------
Technical Explanation: Live migration is the process of moving a running VM from one physical host (Source) to
another (Target) with nearly zero downtime. This is a core mechanism for load balancing and disaster recovery in
clouds.
1. Start Migration: The system identifies the VM to move and selects the target host based on load.
2. Memory Transfer: The VM’s memory is copied to the target in multiple rounds. Using Shadow Page Tables,
the VMM tracks "dirty pages" (modified memory) during this transfer.
3. Suspend and Final Copy: The VM is briefly paused (Downtime) to transfer the remaining dirty pages, CPU
states, and network buffers.
4. Commit and Activate: The target host loads the state and resumes the VM.
5. Redirect Network: An unsolicited ARP is generated to notify the network of the VM's new physical location.
• Precopy: Transfers memory first, then stops the VM to copy final changes. This minimizes downtime.
• Postcopy: Starts the VM on the target immediately and fetches memory pages as needed. This has higher
downtime during the initial fetch.
--------------------------------------------------------------------------------
Detailed Explanation: In virtualized data centers, managing VM images and data efficiently is a significant challenge
due to storage bottlenecks.
Key Technologies:
1. Copy-on-Write (COW): Instead of duplicating an entire 10GB disk image for a new VM, COW allows multiple
VMs to share a single base "template". Only the changes (writes) made by each specific VM are stored in a
private disk layer.
2. Parallax Storage System: A distributed storage architecture that uses per-host storage appliances. It provides
Virtual Disk Images (VDIs) that appear as single-writer block devices to VMs.
3. Snapshotting: High-performance storage allows for rapid "snapshots" (point-in-time copies) of a VM's state,
which is vital for disaster recovery.
--------------------------------------------------------------------------------
Technical Explanation: Dynamic deployment enables "on-demand" cluster environments that adapt to changing
resource requirements.
1. COD (Cluster-on-Demand): Developed at Duke University, it uses a web interface to allow users to
dynamically request and resize virtual clusters. It relies on the Sun GridEngine for workload scheduling.
2. Cellular Disco: A Stanford project focused on deploying virtual clusters on large shared-memory
multiprocessor systems using a specialized VMM.
3. VIOLIN: A Purdue University project that utilizes Live VM Migration to move VMs between clusters
automatically. It significantly increases resource utilization with minimal execution overhead (around 1%).
4. GRAAL: An INRIA project designed to evaluate parallel algorithms in Xen-enabled virtual clusters, proving
that high performance can be achieved using only a fraction of total physical resources.
Exam Tip: For a 10-mark question on this, ensure you list all four projects and briefly describe the goal and result of
each as listed above
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Technical Explanation: Server consolidation is an optimization strategy that uses virtualization to reduce the number
of physical servers while improving the utilization of hardware resources. In traditional data centers, servers are often
statically allocated to specific tasks to meet peak demand, which leads to massive underutilization and wasted costs
in hardware, physical space, and power.
i. Categorization of Workloads: Data centers must handle two primary types of heterogeneous workloads:
• Chatty Workloads: These involve services with heavily fluctuating demands, such as web video services.
• Noninteractive Workloads: These are typically high-performance computing (HPC) tasks that require
consistent and sustained resource allocation.
• Enhanced Hardware Utilization: By running multiple VMs on a single host, underutilized servers are
consolidated, maximizing the efficiency of every physical node.
• Agile Resource Provisioning: Virtualization allows for the rapid deployment and scaling of VMs to meet
changing workload demands.
• Reduced Operational Expenditure (OPEX): Significant savings are achieved in power consumption, cooling
requirements, maintenance, and cabling.
• Business Continuity: VMs are isolated; a crash in one virtual instance does not impact others or the host,
ensuring high availability.
iii. Optimization and Management Strategies: To achieve effective consolidation, data centers employ several
technical layers:
• Resource Scheduling: Multi-level schedulers are used to balance utilization with Quality of Service (QoS)
requirements.
• Two-Level Management: Global server controllers manage the overall data center allocation, while local VM
controllers adjust resources dynamically based on real-time VM demand.
• Power Budgeting: VM-aware power management schemes are implemented to reduce energy consumption
without compromising performance, even in heterogeneous hardware environments.
• "Define Server Consolidation. Discuss the benefits and technical challenges of using virtualization for data
center automation." (10 Marks)
--------------------------------------------------------------------------------
Technical Explanation: For a data center to function as a cloud provider, it must utilize a Cloud OS or Virtual
Infrastructure (VI) Manager. These platforms provide the software stack necessary to manage virtualized resources,
including CPU, memory, storage, and networking, as an elastic pool for users.
i. Comparison of Key VI Managers : The industry relies on several open-source and proprietary platforms:
• Nimbus & OpenNebula: Open-source tools that support Xen and KVM hypervisors, primarily used for
building IaaS clouds. OpenNebula is notable for supporting dynamic resource provisioning via advance
reservations.
• Eucalyptus: An open-source system designed for private cloud infrastructure that emulates AWS EC2 and S3
APIs.
• vSphere 4: A proprietary commercial Cloud OS from VMware that integrates compute, storage, and network
virtualization with advanced data protection.
ii. Deep Dive: Eucalyptus Architecture: Eucalyptus utilizes a component-based web services architecture with three
primary resource managers:
• Instance Manager (IM): Resides on each node to manage VM execution, inspection, and termination.
• Group Manager (GM): Acts as a cluster controller, handling VM scheduling and virtual network management.
• Cloud Manager (CM): The central entry point for users; it queries nodes and makes global scheduling
decisions.
iii. Deep Dive: VMware vSphere 4 Architecture : vSphere 4 provides a comprehensive suite divided into
Infrastructure and Application services:
• Infrastructure Services: Includes vCompute (ESX/ESXi hypervisors), vStorage (Thin provisioning and VMFS),
and vNetwork (Distributed switching).
• Application Services: Focuses on high availability (VMotion, Fault Tolerance), security (vShield Zones), and
scalability (DRS - Distributed Resource Scheduler).
• "Compare different VI managers and Cloud OSes used for virtualizing data centers. Explain the architecture of
Eucalyptus or vSphere 4 in detail." (10 Marks)
--------------------------------------------------------------------------------