Application Virtualization and Container Virtualization
Summary
Virtualization runs many isolated workloads on shared hardware. A hypervisor runs full virtual machines, each with its own operating system; containers share the host's kernel and package only the application and its dependencies, so they are lighter and start faster. Application virtualization delivers apps to users without installing them locally.
In plain words
Application virtualization streams or hosts individual apps on a server instead of running a whole virtual desktop. Containers (such as Docker) package code, libraries and configuration together so the app runs the same way everywhere. Hypervisors run whole virtual machines: Type 1 runs on bare metal (ESXi, Hyper-V); Type 2 runs on top of a host OS (VirtualBox, VMware Workstation).
Detailed explanation
-
Hypervisor: Software that creates and runs virtual machines and keeps them isolated. Also called a virtual machine monitor.
- Type 1 hypervisor: Runs directly on hardware, such as VMware ESXi, Microsoft Hyper-V or KVM; used in datacenters and clouds.
- Type 2 hypervisor: Runs as an application on a host operating system, such as VirtualBox or VMware Workstation.
- Virtual machine (VM): A complete emulated computer with its own operating system.
-
Container: An isolated user space that shares the host kernel and packages an application with its dependencies, such as Docker containers.
- Security: Weaker isolation than VMs because of the shared kernel; use minimal trusted images, scan images and avoid running containers with excess privileges.
- Application virtualization: Running an application on a server and streaming it to clients, or packaging it to run isolated on the client.
- VM escape: An attack in which code in a guest breaks out to the hypervisor or other guests; prevented by patching hypervisors.
- VM sprawl: Uncontrolled growth of VMs that nobody manages or patches.
Important terms
taken from the text above- Hypervisor
- Software that creates and runs virtual machines and keeps them isolated. Also called a virtual machine monitor.
- Type 1 hypervisor
- Runs directly on hardware, such as VMware ESXi, Microsoft Hyper-V or KVM; used in datacenters and clouds.
- Type 2 hypervisor
- Runs as an application on a host operating system, such as VirtualBox or VMware Workstation.
- Virtual machine (VM)
- A complete emulated computer with its own operating system.
- Container
- An isolated user space that shares the host kernel and packages an application with its dependencies, such as Docker containers.
- Application virtualization
- Running an application on a server and streaming it to clients, or packaging it to run isolated on the client.
- VM escape
- An attack in which code in a guest breaks out to the hypervisor or other guests; prevented by patching hypervisors.
- VM sprawl
- Uncontrolled growth of VMs that nobody manages or patches.
Examples & real-world scenarios
- Citrix or App-V delivering one app to users' browsers.
- A Docker container running a web API with all its dependencies.
- VirtualBox on a laptop for a personal practice lab.
Scenario
A developer's app works on their laptop but fails on the server because of a different library version. Packaging it as a container removes the dependency mismatch.
Common mistakes
- Mixing up Type 1 (bare metal) and Type 2 (hosted) hypervisors.
- Thinking containers are full VMs. They share the host's kernel.
Practical skills
- Pick application virtualization, containers or VMs for a need.
- Build a small Type 2 hypervisor lab for your own practice.
What I should remember
- Type 1 hypervisor: Bare metal; used for servers and cloud.
- Type 2 hypervisor: Hosted on an OS; used on desktops.
- Container: Shares the host kernel; lighter than a VM.
- VM escape: Breaking out of a guest into the host.