程序代写 Lecture 5: Virtualization Basics

Lecture 5: Virtualization Basics
, IBM Research

Reading Materials

Copyright By PowCoder代写 加微信 powcoder

§ VMWare virtualization concepts: https://www.youtube.com/watch?v=EvXn2QiL3gs
§ Xen: Art of Virtualization: https://www.cl.cam.ac.uk/research/srg/netos/papers/2003-xensosp.pdf
§ RedHat Virtualization: https://www.redhat.com/en/topics/virtualization § https://kubernetes.io/docs/concepts/overview/what-is-kubernetes/

Physical Machines/ Virtual Machines/ Containers

Types of Virtualization
§ Hardware emulation
– Most complex: a hardware VM is created for each instance
§ Full Virtualization
– Uses hypervisor to share underlying hardware across guest VMs – Mediates between guest OS and underlying h/w
§ Paravirtualization
– Differs from full virtualization in that integrates virtualization handling code into OS – thus
the guest OS code is modified
§ Operating system level virtualization
– Virtualizes server on top of operating systems – Single OS that isolates the servers

Hypervisor and VMM
§ Hypervisor runs on bare metal machine
§ Functionality/role of hypervisor is dependent of
type of virtualization
§ So what is required in supporting virtualization, i.e., Hypervisor manages virtual machine monitors
running multiple OS instances on a single
– OS typically has all the privilege, ring 0-3
– Need to somehow not allow all the OS instances to
run at ring 0, but still be able to function as OS
§ Solution
– Hypervisor runs at ring 0
– OS runs at higher layer than ring 0, but lower than
user applications
– OS level instructions that required ring 0 privilege à
need to be now run by hypervisor instead!

Three types of virtualization (for CPU)
§ Depending on how hypervisor handles the critical instructions from OS (ring 0), there are different virtualization methods
– Full virtualization using binary translation
– OS assisted virtualization or Paravirtualization – Hardware assisted virtualization
Full Virtualization
Para Virtualization
H/W Assisted Virtualization

Memory Virtualization
§ Memory virtualization requires further virtualization of OS level virtual memory
– Another level of MMU virtualization that maps multiple MMU into physical memory

Device and I/O Virtualization
§ Requires managing the routing of I/O requests between virtual devices and shared physical hardware
§ Example: Virtual Network Interface and switches § Virtual devices emulate the physical devices

Comparison of Three Virtualization Methods

Iterative Memory Copy for Live Migration

Deconstructing Amazon EC2 request machine API
§ User goes to Amazon EC2 portal and specifies desired parameters for a machine – Resource: CPU, mem, disk
– Stack: OS and possibly with additional software
§ Amazon AWS Cloud manager (resource pool manager) provisions the user request – Finds appropriate physical resource
– Dispatches the request to virtualization manager on the identified resource
– Cloud Manager invokes EC2 API to provisions the request
§ Virtualization manager on physical server
– Copies the pre-built software stack (virtual appliance)
– Provisions a guest VM and configures parameters (IP address, access rules,…) at run/boot time
§ Cloud manager returns login credentials to user
2. Cloud manager processes request
3. Identifies physical server where to instantiate
4. Virtualization mgr on the server launches a VM, copies virtual appliance and boots the VM with appropriate run-time configuration
Physical Resource Pool
1. User requests a machine with a desired Software stack, access rules
6. User is provided instance details
5. Login credentials for user

Key building blocks
§ Cloud manager
§ Virtual machine
§ Virtual appliance
§ Configuring virtual appliance at run to meet the configuration parameters

Another important application of Virtualization
§ Note that virtual machines are created on demand by issuing requests to hypervisor
§ Virtual machines can be moved from one physical server to another in real time!
§ VMWare vMotion management software
lets one move running virtual machines in
real time from one server to another – Opens up lot of interesting scenarios – Zero down-time maintenance and/or
– Dynamic workload balancing
Moving all VMs from server A to server B

Deconstructing Amazon EC2 request machine API
§ User goes to Amazon EC2 portal and specifies desired parameters for a machine – Resource: CPU, mem, disk
– Stack: OS and possibly with additional software
§ Amazon AWS Cloud manager (resource pool manager) provisions the user request – Finds appropriate physical resource
– Dispatches the request to virtualization manager on the identified resource
– Cloud Manager invokes EC2 API to provisions the request
§ Virtualization manager on physical server
– Copies the pre-built software stack (virtual appliance)
– Provisions a guest VM and configures parameters (IP address, access rules,…) at run/boot time
§ Cloud manager returns login credentials to user
2. Cloud manager processes request
3. Identifies physical server where to instantiate
4. Virtualization mgr on the server launches a VM, copies virtual appliance and boots the VM with appropriate run-time configuration
Physical Resource Pool
1. User requests a machine with a desired Software stack, access rules
6. User is provided instance details
5. Login credentials for user

Virtual Appliance
§ How was Amazon EC2 able to start a (virtual) server with a software stack such as Operating System (win203, SUSE linux 32- bit, LAMP stack etc.) almost instantly?
– User is able to choose from a list of available pre-built stack
§ Virtual Appliance
– A virtual machine image file consisting of
pre-built/installed software bundled with
operating system
– Built in a such a manner that virtual
machine boots from this pre-bundled
– Install once and replicate many times
– No need to install the software as long
as same virtual machine technology
– Removes the need for time consuming
installation and configuration of software

VMWare Virtual Appliance Demo
§ http://download3.vmware.com/media/vam/vam_demo.html
VMWare Virtual Appliance Marketplace

Reference Materials
§ ESXi: http://www.vmware.com/products/vsphere-hypervisor/ § vSphere: Mastering VMWare vSphere 5.5 –
§ vCloud: http://www.vmware.com/products/vcloud-suite

Monolith vs Micro-Services

Dockers and Containers
§ More light weight and runs as user space processes § Containers provide the separation

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com