P3L6 - Virtualization Flashcards
What is virtualization?
A solution created to allow a user to concurrently run diverse workloads on the same physical hardware without requiring that a single operating system be used
T/F: With virtualization, each of the operating systems are deployed on the same physical platform
True
Each operating system plus its applications and virtual resources are known as _____
Virtual Machine (VM)
What is responsible for supporting the coexistence of multiple VMs on a single physical machine
The Virtualization Layer (VMM or hypervisor)
A virtual machine is ____, _____ _____ of a real machine
efficient, isolated duplicate
What are the 3 responsibilities of the VMM
- Must provide an environment that is essentially identical to the original machine
- Programs that run in the VM must show at worst only minor decreases in speed
- Provides safety and isolated among the VMs
What are the benefits of virtualization?
- Virtualization enables consolidation (ability to run multiple VMs on a single platform)
- Makes migration easier
- Helps address availability and reliability
Describe the Bare Metal Virtualization Model
Also known as hypervisor based or type 1 virtualization, VMM manages all the hardware resources and support execution of VMs
What is an issue with the Bare Metal Virtualization Model?
Hypervisor must manage all possible devices
How can the hypervisor battle managing all the possible devices in the Bare Metal Virtualization Model?
It integrates a special virtual machine known as a service VM that runs a standardized OS with full hardware access privileges
Describe the Hosted Virtualization Model
Hosted or type 2 model involves a full fledged host OS that manages all the hardware resources and integrates a VMM which is responsible for providing the VMs with their virtual platform interface
What is one benefit of the hosted virtualization model
It can leverage all of the services and mechanisms that are already developed for the host operating system
How many protection levels are within x86 architecture?
Four known as rings
Describe the rings (protection levels) of x86 architecture
Ring 0 - Hypervisor - Highest priority can access all resources and execute all hardware-supported instructions
Ring 1 - OS
Ring 3 - Applications
Most recent x86 architectures introduce two different protection modes ___ and ____
root and non-root
T/F: Within each protection mode of x86, 4 rings exist
True!
Attempts by the guest OS to perform privileged operations cause traps known as _____
VMExits
What happens when a VMExit occurs?
Trigger switch to root mode, passing control to the hypervisor
T/F: Guest instructions are executed directly by the hardware
True
What happens when a PRIVILEGED instruction is issued by a guest?
Trap to the hypervisor!
How many hardware instructions were privileged but did not cause a trap in early x86 platforms?
17!
What was one way that the problematic hardware instructions were handled?
Write the VM binary such that it never executes those instructions – binary translation
When the guest OS is not modified, this type of virtualization is called ____ ____
full virtualization
An approach which gives up on unmodified guests and instead focuses on performance is known as ______
paravirtualization
Describe paravirtualization
Guest now knows that is running in virtualized environment on top of a hypervisor as opposed native physical resources
A paravirtualized guest OS may not directly try to perform operations that is knows will fail but will instead make explicit calls to the _____ known as ____
hypervisor
hypercalls
In full virtualization, describe the three types of addresses
- Virtual Addresses - Used by applications in the Guest
- Physical Addresses - used by the kernel of the guest
- Machine Address - Corresponding to the actual physical address on the underlying physical platform
How many page tables are there in full virtualization?
Two - One maintained by the guest OS and one maintained by the hypervisor
Describe the passthrough model
The VMM-level driver is responsible for configuring access to a device. Guest VM has exclusive access to a device
T/F: In the passthrough model the VM can directly access the device without interacting with the VMM
True
What are the problems with passthrough?
Makes sharing devices across VMs difficult!
Breaks the decoupling of VM from hardware
In the passthrough model who operations on and controls the device
The Guest VM and the device driver in the guest VM
What is a benefit of virtualization
The guest VMs are decoupled from the physical hardware
Describe the hypervisor direct model
The hypervisor intercepts every device access request
What is a benefit of the hypervisor direct model
VM remains decoupled from the physical platform/device
What is a downside of the hypervisor direct model
Device emulation step adds latency to device access
Describe the Split Device Driver Model
All device accesses are controlled in a way that involves a component that resides in a guest VM and a component that resides in a hypervisor layer