IT 3300 : Virtualization

Virtualization Concepts

Driving forces

  • Underutilized hardware — a physical server sat mostly idle
  • Space — fewer physical boxes in the rack
  • Energy — power and cooling cost real money
  • Administration — manage images, not screwdrivers

Categories of virtualization

  • Client — VMware Workstation, VirtualBox, Parallels
  • Server — our focus this semester
  • Storage — SAN, NAS
  • Network — SDN (software-defined networking)

Types of virtualization

  • OS-level virtualization (containers)
  • Hardware emulation / full virtualization
  • Paravirtualization

We'll define each, because the differences explain the whole course.

OS-level virtualization

  • Isolated environments that each think they own the whole OS
  • Each has its own file system, process tree, network, libraries
  • They share the host kernel
  • This is what containers are: LXC, Docker, jails

OS-level: pros

  • Files shared by many containers are stored once
  • Best performance of any virtualization approach
  • Highest density (most environments per machine)
  • Great for isolating applications; often cheaper to license

OS-level: cons

  • Every container shares the host's kernel
    • Same kernel version, same patches, same OS family
    • Can't run a Windows container on a Linux kernel
  • If the host kernel dies, every container goes with it

Hardware virtualization (full)

  • A hypervisor emulates hardware for each guest
  • Guests run on "virtual" hardware, not the physical machine
  • The guest OS has no idea it is virtualized
  • Images can migrate between hypervisors, even across machines

Hypervisors

  • A.k.a. Virtual Machine Manager (VMM)
  • Intercepts guest calls to hardware and mediates them
  • "Hypervisor" = the supervisor of the supervisors (the kernels)

Hypervisor types

  • Type 1 (bare metal) — runs directly on hardware
    • VMware ESXi, Microsoft Hyper-V, Proxmox/KVM, Xen
  • Type 2 (hosted) — runs on top of a host OS
    • VirtualBox, VMware Workstation, QEMU

Hardware VZ: trade-offs

  • Pro: run dissimilar OSes; excellent for server consolidation
  • Con: slight overhead — everything passes through the hypervisor
  • Con: hardware support limited to the hypervisor's drivers

Paravirtualization

  • Hardware is not fully emulated
  • The guest OS knows it is virtualized and cooperates
  • Guest issues efficient API calls instead of trapped hardware calls
  • Less overhead; drivers come from the guest, not the hypervisor
  • Example: Xen (paravirtualized guests)

Putting it together

  • Full VZ — guest is unaware; best isolation & portability; some overhead
  • Paravirtualization — guest cooperates with the hypervisor; less overhead
  • OS-level (containers) — least overhead, highest density, shared kernel

Where this course lives

  • Proxmox gives us full/para virtualization (KVM) and OS-level (LXC)
  • Docker is OS-level virtualization for applications
  • Kubernetes orchestrates those containers at scale