55 - Virtualization Services - 4.1

Virtualization Overview

  • Purpose of Virtualization

    • Allows for efficient management of different systems running simultaneously.

    • Relies on a virtual machine manager (VMM), commonly referred to as the hypervisor.

Hypervisor

  • Definition: The hypervisor is the software responsible for managing the interaction between the virtual systems (virtual machines, VMs) and the physical hardware.

  • Functionality:

    • Allocates resources such as CPU cycles, memory, and networking information to each VM, ensuring separation between them.

    • Utilizes CPU features optimized for virtualization, such as Intel Virtualization Technology (VT) and AMD Virtualization (AMD-V).

Hypervisor Types

  • Type 1 Hypervisor

    • Also known as bare metal hypervisor.

    • Runs directly on the hardware, with no underlying operating system.

    • Examples:

    • VMware's ESXi

    • Microsoft's Hyper-V

  • Type 2 Hypervisor

    • Also termed hosted hypervisor.

    • Runs on top of an existing operating system.

    • Example hypervisors include VMware Workstation, Oracle VirtualBox, and Parallels Desktop.

Block Diagram of Hypervisor Architecture

  • Structure:

    • Hardware (Physical System)

    • Hypervisor (Type 1 or Type 2)

    • Virtual Machines (VMs)

  • Each VM has its own guest operating system and independent applications.

  • Performance Overhead:

    • Starting multiple VMs incurs overhead in terms of CPU, memory, and storage requirements.

Resource Requirements for Virtualization

  • CPU: Need adequate CPU cycles for VMs to operate simultaneously.

  • Memory: Sufficient RAM is required since each VM runs its own complete operating system.

  • Storage: Enough disk space is necessary for storing the operating systems and applications of the VMs.

  • Networking: Configurable options for VM communications inside and outside the hypervisor environment.

Networking in Hypervisors

  • Virtual Networks:

    • Configured internally by the hypervisor, allowing control over VM communication.

  • Network Address Translation (NAT):

    • Hypervisor may handle NAT to allow VMs to communicate externally while maintaining internal subnetting.

  • Bridge Networking:

    • VMs act as if they are part of the same local network without NAT, sharing an IP subnet.

  • Private Addressing:

    • Isolates VMs to only allow communication with specified devices, enhancing security.

Security Implications in Virtualization

  • Security Concerns:

    • Virtualization introduces potential risks; hypervisor security is critical.

    • VM Escape:

    • A significant vulnerability allowing malware in a VM to exploit hypervisor flaws and access other VMs.

  • Mitigating Risks:

    • Traditional security measures should be applied to each VM as though they are standalone systems.

    • Ensure firewalls and anti-malware software are appropriately configured.

  • Malware in Virtual Machines:

    • Be cautious of downloading VMs from the internet as they may come pre-infected with malware.

Virtual Desktop Infrastructure (VDI)

  • Concept: Virtualizes the entire desktop environment, allowing users to operate a VM as their workspace.

  • Benefits:

    • Reduces hardware demands on local machines (can use low-spec devices).

    • Enables remote access to desktops across networks or in cloud environments.

  • Often referred to as Desktop as a Service (DaaS).

Application Containerization

  • Idea: Virtualize applications without requiring a full OS for each app, using containers instead.

  • Characteristics of Containerization:

    • Each application is self-contained and runs in isolation.

    • Containers are more lightweight than full VMs, allowing for quicker transfers and greater portability.

  • Container Management:

    • Typically utilizes a single host operating system for managing multiple applications.

    • Popular software for containerization includes Docker.

Comparison of Virtual Machines and Containers

  • Traditional Virtualized Applications: Each VM has a guest OS.

  • Containerized Applications: Rely on a single shared OS, offering lighter overhead but requiring careful configuration for compatibility across applications.

  • OS Management:

    • Containerization simplifies management with one OS to maintain instead of multiple guest operating systems for VMs.