OS - Virtualization
VMM(Virtual Machine Manager) = Hypervisor
QEMU is the default VMM of KVM, but can be replaced.
Type-1: bare metal hypervisor
- hypervisor runs directly on the host's hardware.
- e.g. XEN, Hyper-V(used in Windows 10), VMware ESX/ESXi
Type-2: hosted hypervisor
- hypervisor runs on a conventional operating system, a guest operating system runs as a process on the host.
- e.g. VMware Workstation, VirtualBox, QEMU
KVM, as name suggests, is kernel-based, so can be considered as both Type-1 and Type-2.
OCI, Open Container Initiative, defined 2 specs, so different tools can be used to pack/unpack and run by different runtimes:
Container = Operating system level virtualization
- Docker initially used
liblxcbut later changed
- Linux Containers (LXC): on top of cgroups. operating system–level virtualization technology for running multiple isolated Linux systems (containers) on a single control host (CoreOS instance).
- cgroups: provides namespace isolation and abilities to limit, account and isolate resource usage (CPU, memory, disk I/O, etc.) of process groups
- LXD is built on top of LXC, using
- Paravirtualization: guest OS knows that it is running on a hypervisor instead of base hardware,recognizes that other virtual machines are running on the same machine
- Hardware Virtual Machine (HVM): guest OS thinks that it is running directly on the hardware
Xen supports 2 virtualization types, ( Meaning Amazon supports 2 types as it runs on Xen )
- Xen Para-virtulaization ( PV )
- Xen Full virtualization ( HVM )
HVM stands for Hardware-assited Virtual Machine.
Para-virtulaization ( PV )
- An OS or Kernel called Hypervisor is installed on the hardware.
- Dom0 is called the “privilged domain” which can issue commands to the hypervisor.
- Stability/Performance is close to the real servers and hardware virtualization.
- Overhead is very low
- Implementation is tough.
- Both the host & guest kernels has to be patched.
- Supports Linux only
- can’t change the OS options during install.
- Can’t compile and install a custom kernel
Stands for Hardware-assisted virtual machine. It provides complete hardware isolation. The hardware provides support to run independently for each OS
- Can run Linux and Windows
- Complete secure hardware isolation
- Resembles close to a physical server.
- Greater stability
- Low performance, because of the overheads at the hardware level