STCLOUD_hypervisors, types, benefits, virtual machines, containers
RAW FILE
This note has not been edited yet.
Hypervisors Lecture
- traditional? vs hypervisors
- virtual machines and containers
Recap
- traditional: dedicated
- virtualization: many OS, single machine with use of hypervisor
- hypervisor: translation between hardware and software
Types of Virtualization
analyze the context to find out if (1) it's virtualization, and (2) what type of virtualization it is. analyze it in the use-case perspective
Server virtualization → resource maximization
- compute virtualization
- physical component, one OS, installation requirements
- racking and stacking physical equipment
- flexibility and agility
Network Virtualization → ...
- focused on how we do input/output for the computers
- servers and virtual resources, data in/out via the network (upload, download)
- routers, switches, LAN cables/ports, firewalls ← virtualizing that concept
- hardware independence → not really dependent on physical equipment
Desktop Virtualization → accessibility
- also compute virtualization but more focused on the desktop side
- users are able to access a desktop environment even though they're remote or the company has a BYOD setup (Bring Your Own Device)
- vs Server Virtualization: you have to consider some aspects. not necessarily bc may GUI, automatically na desktop virtualization yan
Storage Virtualization → ...
- storage or memory
- CPU memory I/O, storage in the sense that we have
- SAN Storage Area Networks, NAS, DAS, RAID?? → different storage technologies
- even though we have different kinds of storage (heterogenous), we're able to combine all of them together and call that capacity
Data Virtualization → ...
- not part of the traditional IT resources
- software implementation that focuses on the software abstraction layer
- App, DV??, Data, Location, Format, IoT devices, Sources, etc.
- virtualizing that aspect, you want the data to perform certain queries or analytics, you can just request from the data virtualization platform (a software)
- it will get your query, understand it, fetch the data from various sources, convert the format
- an abstraction layer for the application
Application Virtualization → ...
- also compute virtualization but only virtualizes the app instead of the
- local and remote
- local: app on your local machine, uses your own resources (Wine on Mac)
- remote: either app is open in the cloud or running on a global scale, you use the browser to access Google Docs
- Google Docs abstracts the idea of you installing a word processor, but you are using one via the browser
- there are browser apps that aren't application virtualization
- flash games are on the browser but many of them are running on the computer: the computer downloads the files → it's a browser-based app
- application virtualization can use browsers, not all of them are app virtualization, it could be native
- only when you're actually virtualizing an application, you have to check if it's running natively
Virtualization and Hypervisors
- Virtualization works by abstracting physical hardware and devices from the applications running on that hardware
- virtualization is the technology, hypervisors (or whatever does the translation) make it possible
- Hypervisors make virtualization possible by translating request between the physical and virtual resources
- like a supervisor, it manages
- makes virtualization possible
- Hypervisors support the creation and management of VMs by abstracting (or translating) a computer's software from its hardware
- in a VM accessing memory: request from the hypervisor, and then the hypervisors
- Bare metal hypervisors are sometimes embedded into the firmware (BIOS) to enable the OS of a computer to access and use virtualization software (Intel-VT or AMD-V)
- bare metal: physical computer/devices
- you have to enable or activate the Intel-VT configuration or whatever in order to do virtualization
Hypervisor
- also known as a virtual machine monitor (VMM), is software that creates and runs virtual machines
- allows a host computer to support multiple guest VMs by virtually sharing its resources (i.e. memory)
- recall host is physical, and guest is virtual.
- what if you have a setup like the following:
- server A is the host, and server B is the guest. server B is a host to guest server C. The parents are the hosts, the children are the guests.
- context is important!
- Hypervisors provide greater IT mobility since the guest VMs are independent of the host hardware
- Multiple virtual machines can run on one physical server, reducing space, energy, and maintenance requirements
- Examples: Microsoft Hyper-V (Windows Subsystem for Linux, Docker), ProxMox, Xen Project, VMware ESXi
- Hyper-V is the product that is a hypervisor
- CCSCloud uses ProxMox (open source, free)
Benefits of Hypervisors
hypervisors and virtualization work hand in hand: virtualization has characteristics, hypervisors allow that to happen and gives us these benefits
- Speed - virtual machines can be created instantly, making it easier to provision resources as needed for dynamic workloads
- agility
- dynamic workloads → changing workloads (resource utilization changes as time goes)
- imagine this as like 5 servers. at the green highlight, you're using one server at that certain point in time. sometimes you need more servers depending on the workload and/or time of day.
- Efficiency - running several VMs on a physical machine is more efficient than to run multiple underutilized physical machines
- Flexibility - separates the OS from the underlying hardware, so the software no longer relies on specific hardware devices or drivers
- hardware independence and isolation/proportion
- no longer relying on specific devices
- Portability - multiple OS to reside on the same physical server; VMs in the hypervisor run independently from the physical machine; allows shifting of workloads and allocate resources as needed
- ability to migrate easily
- self contained, easily modified because they're just software
Types of Hypervisors
- Type 1 - Bare Metal or Native Hypervisors → this is dedicated
- lightweight OS directly running on top of the host machine
- isolated from the guest OS, results in better security
- better performance than hosted hypervisors
- mostly used by enterprise for data center computing needs
- Note: a bare-metal server (traditional) will always provide higher performance than a virtual server sharing with other virtual servers → if you hear JUST "bare-metal server", there's no virtualization in that. a physical server does not need a translation layer.
- if you wanna install a native hypervisor on your own laptop, you can but you have to get rid of everything that's installed and it will just exist as the hypervisor.
- if you're a user of the hypervisor, you need to have a separate computer from the HV in order to access it
- using a network transfer of data, the hypervisor is an OS in itself
- Type 2 - Hosted or Client Hypervisor → this is software
- runs as a software (as a guest) on an (host) OS, like other programs
- can still run the same or a different guest OS from the host OS
- have a higher latency than bare metal hypervisors
- you're running it on your own machine
- refresh rate won't be that high
- mostly used by end users and software testing, where higher latency is less of a concern
- ex. vmware, workstation, parallels, virtualbox
- you can just do this on your own computers
A closer look in Hypervisors
- Type 1
- the hypervisor IS the OS
- Hypervisor: Proxmox/ESXi → accessing that will just be a command line
- you install the applications on the guest machines not on the Hypervisor
- hyperV is a hybrid hypervisor → it's installed but attaches itself next to the OS. it becomes the same level as the OS.
- Type 2
- still has a host OS, the hypervisor is an APP
- Hypervisor: VMware player (which is an APP)
- double layer of translation so it's gonna be slower talaga
- virtual resources are in the guest machine
Virtual machines vs Containers
- VMs → you're virtualizing the machine itself, virtualizing the hardware of what a computer is
- each virtual machine can be another OS because it has a guest OS
- Containers → you're virtualizing the OS lang, a different layer in the computer
- the kernel of the container is shared with your actual host OS
- if you're using Linux, you can only do Linux containers
- if you're using Windows, you can only use Windows containers
- You can make a Linux container on WSL because its running an Ubuntu OS on your device
- allows us to separate the applications
- Container Engine manages the containers
Containers | Virtual Machines | |
---|---|---|
better if you need everyone to be on the same OS | better if you need to work with multiple OS, virtualizes the entire hardware of a computer | |
Feature | Shares the host operating system | Has its own kernel |
Operating System | More portable (lightweight), easier to start and shut down because it's using the same kernel | Less portable (has to boot up everything) |
Portability | More portable | Less portable |
Speed | Faster to start up and shut down | Slower to start up and shut down |
Resource usage | Fewer resources | More resources |
Use Cases | Good for portable and scalable application (ex. multiple web servers and db servers for load balancing → you can just open multiple containers) → fast deployment, etc. | Good for isolated applications (sometimes there are applications that needs something from the OS that containers may not be able to provide) |
Web development, Microservices architecture, Continuous integration and delivery, cloud computing | Testing environment, development (OS restrictions, etc.), isolation of resources and physical for security etc., cloud computing, disaster recovery |
Summary
Hypervisor → OS virtualization | Container → Applications |
---|---|
More focused on operating system | More focused on applications |
Allows an operating system to run independently from the underlying hardware using virtual machines. (HV can run containers) | Allow applications to run independently of an operating system |
Can run multiple OS on top of a bare-metal hypervisor or installed on top of the OS of a hosted hypervisor | Can run on any operating system, with only a container engine to run (dependent on your host OS) |
Share virtual computing, storage, memory, and network resources | Are extremely portable since in a container, an application has everything it needs to run (uses the host OS's kernel) |
Used to create and run VMs | Compared to VMs, containers package an app and its services |
More featured and is generally used by end users to enterprise organizations | More lightweight and portable than VMs and used for fast and flexible app development and deployment |