Virtualization Essentials Notes

Virtualization Essentials Notes

Matthew Portnoy

Virtualization Essentials, Third Edition, Sybex, A Wiley Brand.

Copyright Information

Copyright © 2023 by John Wiley & Sons, Inc. Includes information regarding copyrights, trademarks, limit of liability/disclaimer of warranty, and contact information for customer care and errata submissions. Website: www.wiley.com.

Dedication

To friends and family.

Acknowledgments

Thanks to Scott Lowe, Mark Milow, Mike Szfranski, Nick Gamache, Tony Damiano, Kenyon Brown, Kristi Bennett, Ryan Wilson, Melissa Burlock, Kim Wimpsett, Christine O’Connor, Agatha Kim, family, Lucas, Noah, and Elizabeth.

About the Author

Matthew Portnoy has 30+ years of IT experience in companies like NCR, Sperry/Unisys, Stratus Computer, Oracle, VMware, and Splunk. He's experienced with PCs, client-server computing, fault tolerance, the Internet, and virtualization. He has spoken at VMworld and user group meetings and taught virtualization/database classes at Wake Tech Community College.

Contents at a Glance

Covers virtualization, hypervisors, virtual machines, creation, Windows & Linux installation, CPU/Memory/Storage/Networking management, copying VMs, additional devices, availability & applications.

Chapter 1: Understanding Virtualization

  • Describing Virtualization

    • Virtualization abstracts a physical component into a logical object to gain utility from the resource.

    • Virtual machine (VM) virtualizes hardware resources.

    • Virtual machine monitor (VMM), or hypervisor, provides the environment for VMs.

    • VMM Properties (Popek & Goldberg):

      • Fidelity: Identical environment to the physical machine.

      • Isolation/Safety: Complete control of system resources by VMM.

      • Performance: Minimal performance difference between VM and physical.

  • Microsoft Windows Drives Server Growth

    • Windows became the primary OS for PCs, leading businesses to run applications on Windows servers.

    • Challenges arose due to resource contention, leading to a "one server, one application" practice.

    • Corporate politics led to departments wanting control of their infrastructure, increasing costs.

    • Business demand and hardware improvements drove down hardware costs.

    • Data centers emerged with raised floors, power, cooling, cabling, and fire suppression.

    • The Internet's growth led to more servers for web-enabled applications.

    • Energy use by data centers doubled between 2000 and 2006, expected to double again.

  • Explaining Moore’s Law

    • Moore’s Law: Processing power doubles roughly every 18 months.

    • Applies to processing power, memory capacity, and digital camera megapixels.

    • Servers are routinely replaced (every 3-5 years).

    • Replacement servers are more powerful than the original, leading to increased headroom.

    • Data centers averaged 10-15% utilization, with most servers <5% utilized.

  • Understanding the Importance of Virtualization

    • Virtualization allows multiple OS workloads to run on the same server hardware with functional isolation.

    • Server consolidation: Condensing multiple physical servers into fewer servers.

      • Consolidation ratio: Number of VMs on a server (e.g., 8 VMs = 8:1 ratio).

    • Reduced data center footprint, power, cooling, and hardware maintenance costs.

    • Studies show that the total cost of ownership for a server is 3-10 times the server's cost over 3 years.

  • Examining Today’s Trends

    • Virtual servers outnumbered physical servers by 2009.

    • Containment: Virtualizing server workloads instead of purchasing new hardware.

    • Infrastructure services and older servers are the initial focus of virtualization.

    • Virtualization-first policies: New projects use virtual resources unless proven otherwise.

    • Test and development servers are moved to the virtual infrastructure.

    • Linux can be virtualized, leading companies to migrate critical workloads to a more flexible environment.

    • Virtualization enables availability, scalability, and manageability.

  • Virtualization and Cloud Computing

    • Virtualization drives cloud computing by transforming data centers into self-managing resource pools.

    • Cloud computing creates a virtual data center with on-demand resources.

    • Simplifies application delivery and accelerates deployments.

  • Hyperconverged Infrastructure

    • Hardware vendors create servers optimized for hypervisors (converged infrastructure).

    • Prebuilt blocks allow rapid scalability.

    • Examples: Cisco UCS, VCE, Oracle Exadata, IBM PureSystems, and Nutanix.

  • Understanding Virtualization Software Operation

    • Server virtualization involves a hypervisor that abstracts the physical layer for virtualized servers to use.

    • Virtual desktops and applications are also virtualized.

    • Virtualizing Servers

      • Hypervisor is installed directly onto a server, without any OS between it and the physical devices.

      • Virtual machines contain OS, applications, network connections, access to storage, and other resources but are packaged as data files.

    • Virtualizing Desktops

      • Virtual desktops run on servers in the data center and are accessed through thin clients.

      • Cost savings in hardware, power, and management.

    • Virtualizing Applications

      • Application virtualization enables ease of deployment and mitigates application conflicts.

Chapter 2: Understanding Hypervisors

  • Describing a Hypervisor

    • Hypervisor is an arbiter of resources, residing between physical hardware and VMs.

    • Provides virtual environment, enables virtual networks and offers clustering for high availability.

    • Hypervisor is a layer of software below VMs and above hardware.

  • Exploring the History of Hypervisors

    • First virtualization on IBM mainframes in the 1960s to manage memory resources.

    • Virtual Machine Monitors (VMMs) used for development/debugging of OSs.

    • VMMs evolved to run multiple environments concurrently, carving hardware resources into virtual servers.

  • Understanding Type 1 Hypervisors

    • Type 1 hypervisor runs directly on server hardware (bare-metal implementation).

    • More efficient due to direct communication with hardware.

    • Considered more secure because guests cannot affect the hypervisor.

    • Less processing overhead, allowing more VMs per host.

  • Understanding Type 2 Hypervisors

    • Type 2 hypervisor is an application that runs atop a traditional operating system.

    • Supports a broader range of hardware.

    • Easy to install and deploy.

    • Less efficient due to extra layer between hypervisor and hardware.

    • Less reliable due to more points of failure.

    • Uses more physical resources.

    • Typically used in desktop development environments.

  • Understanding the Role of a Hypervisor

    • Provide an environment identical to the physical environment.

    • Provide that environment with minimal performance cost.

    • Retain complete control of the system resources.

    • Guest OS believed to see and directly interact with physical devices of host.

  • Holodecks and Traffic Cops

    • Hypervisor abstracts hardware from each virtual guest. Also Balances workload

  • Resource Allocation

    • The hypervisor acts as a traffic cop, controlling resource flow.

    • Hypervisor handles storage, network, memory, and CPU work for all guests.

    • Resource scheduling process ensures all requested resources are serviced, and important applications can receive preferential treatment.

    • Physical hardware should have resources available for periodic spikes, growth, and hypervisor usage.

  • Comparing Today’s Hypervisors

    • Solutions presented represent close to 100% of server virtualization market share.

    • VMware ESX

      • First commercially available x86 virtualization solution.

      • VMware holds close to 70% of the market.

      • VMotion allows the migration of a running virtual machine from one physical host to another.

    • Citrix Hypervisor (Xen)

      • Began as a research project at the University of Cambridge.

      • Development for Xen would become a Linux Foundation Collaborative Project, returning development to the open-source community.

      • Requires a special guest called Domain 0 (Dom0) that manages the hardware for rest of the guests.

      • Less than a 5 percent share of the commercial market.

    • Microsoft Hyper-V

      • Released in 2008 as an installable part of the Windows Server 2008 operating system.

      • Type 1 hypervisor, requiring a special root partition that has direct access to the hardware resources.

      • Roughly 20 percent of the market.

    • Other Solutions

      • Oracle Offers both built and acquired virtualization solutions.

      • Red Hat also offers a few different permutations over time.

Chapter 3: Understanding Virtual Machines

  • Describing a Virtual Machine

    • VM supports an OS and is configured with resources.

    • Many VMs can run simultaneously on a single physical server, running different operating systems and applications.

    • A VM is a set of files (configuration file and virtual disk files).

    • Virtual machines have access to various hardware resources, abstracted into virtual devices by the hypervisor.

    • Virtual devices are standard, portable across platforms and vendors.

  • Two Views of a VM

    • Host: can see resources available via system devices.

    • OS: The guest (OS/app) view is same a physical machine.

  • Examining CPUs in a Virtual Machine

    • VMs are configured with one or more processors, and the hypervisor schedules CPU cycles on the host's available CPUs.

    • The host does not reserve a CPU solely for the use of a particular VM.

  • Examining Memory in a Virtual Machine

    • VM is allocated a specific amount of memory, and can be reconfigured.

  • Examining Network Resources in a Virtual Machine

    • VM communicates with the outside world through virtual NICs connected to a virtual network with virtual switches.

    • VM-to-VM communications are possible across a virtual switch without leaving the physical host, building security.

  • Examining Storage in a Virtual Machine

    • What gets presented to the virtual machine and what the virtual machine believes it is seeing are very different.

  • Understanding How a Virtual Machine Works

    • Hypervisor allows decoupling OSs from hardware.

    • Hypervisor acts as transporter and regulator of resources.

    • Native OS manages hardware:

      • Program requests data from a file through a language command.

      • OS passes request to device manager, which works with the physical disk I/O controller and storage device.

  • Working with Virtual Machines

    • Running VMs can be managed and monitored like physical servers.

    • VMs exist as data files, which enables file management features.

  • Understanding Virtual Machine Clones

    • Cloning involves copying the files that make up an existing server.

  • Understanding Templates

    • Virtual machine templates rapidly deliver fully configured virtual servers.

    • A template is a preconfigured, preloaded virtual machine used to stamp out copies of a commonly used server.

    • Unlike a clone, when a VM is converted to a template, the VM it is created from is gone.

  • Understanding Snapshots

    • Capturing a VM’s state at a particular point in time.

    • Preserves state, data, and hardware configuration.

    • Changes go to a delta disk.

    • Snapshots are not a substitute for proper backups.

  • Understanding OVF

    • Open Virtualization Format; A standard to bundle up virtual machines into one or more files that can be easily transported from one virtualization platform to another.

  • Understanding Containers

    • Containers offer a platform-independent package to bundle, deliver, and deploy applications.

    • Containers abstract at the OS level, wrapping multiple workloads in a single receptacle.

  • Virtual Appliaces

    • A specialized virtual machine that contained an operating system and a preloaded and preconfigured application that was designed for a particular function.