0% found this document useful (0 votes)
35 views14 pages

Types of Virtual Machines and Implementations

cloud computing

Uploaded by

shalini.26it
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views14 pages

Types of Virtual Machines and Implementations

cloud computing

Uploaded by

shalini.26it
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Types of Virtual Machines and Implementations

▪ Many variations as well as HW details


• Assume VMMs take advantage of HW features
 HW features can simplify implementation, improve performance
▪ Whatever the type, a VM has a lifecycle
• Created by VMM
• Resources assigned to it (number of cores, amount of memory,
networking details, storage details)
• In type 0 hypervisor, resources usually dedicated
• Other types dedicate or share resources, or a mix
• When no longer needed, VM can be deleted, freeing resources
▪ Steps simpler, faster than with a physical machine install
• Can lead to virtual machine sprawl with lots of VMs, history and
state difficult to track
Types of VMs – Type 0 Hypervisor
▪ Old idea, under many names by HW manufacturers
• “partitions”, “domains”
• A HW feature implemented by firmware
• OS need to nothing special, VMM is in firmware
• Smaller feature set than other types
• Each guest has dedicated HW
▪ I/O a challenge as difficult to have enough devices, controllers to
dedicate to each guest
▪ Sometimes VMM implements a control partition running daemons that
other guests communicate with for shared I/O
▪ Can provide virtualization-within-virtualization (guest itself can be a VMM
with guests
• Other types have difficulty doing this
Type 0 Hypervisor
Types of VMs – Type 1 Hypervisor

▪ Commonly found in company datacenters


• In a sense becoming “datacenter operating systems”
 Datacenter managers control and manage OSes in new,
sophisticated ways by controlling the Type 1 hypervisor
 Consolidation of multiple OSes and apps onto less HW
 Move guests between systems to balance performance
 Snapshots and cloning
Types of VMs – Type 1 Hypervisor (Cont.)

▪ Special purpose operating systems that run natively on HW


• Rather than providing system call interface, create run and manage
guest OSes
• Can run on Type 0 hypervisors but not on other Type 1s
• Run in kernel mode
• Guests generally don’t know they are running in a VM
• Implement device drivers for host HW because no other
component can
• Also provide other traditional OS services like CPU and memory
management
Types of VMs – Type 1 Hypervisor (Cont.)

▪ Another variation is a general purpose OS that also provides VMM


functionality
• RedHat Enterprise Linux with KVM, Windows with Hyper-V,
Oracle Solaris
• Perform normal duties as well as VMM duties
• Typically less feature rich than dedicated Type 1 hypervisors

▪ In many ways, treat guests OSes as just another process


• Albeit with special handling when guest tries to execute
special instructions
Types of VMs – Type 2 Hypervisor
▪ Less interesting from an OS perspective
• Very little OS involvement in virtualization
• VMM is simply another process, run and managed by host
 Even the host doesn’t know they are a VMM running guests
• Tend to have poorer overall performance because can’t take
advantage of some HW features
• But also a benefit because require no changes to host OS
 Student could have Type 2 hypervisor on native host, run
multiple guests, all on standard host OS such as Windows,
Linux, MacOS
Types of VMs – Paravirtualization
▪ Does not fit the definition of virtualization – VMM not presenting an exact
duplication of underlying hardware
• But still useful!
• VMM provides services that guest must be modified to use
• Leads to increased performance
▪ Xen, leader in paravirtualized space, adds several techniques
• For example, clean and simple device abstractions
 Efficient I/O
 Good communication between guest and VMM about device I/O
 Each device has circular buffer shared by guest and VMM via
shared memory
Xen I/O via Shared Circular Buffer
Types of VMs – Paravirtualization (Cont.)
▪ Xen, leader in paravirtualized space, adds several techniques (Cont.)
• Memory management does not include nested page tables
 Each guest has own read-only tables
 Guest uses hypercall (call to hypervisor) when page-table
changes needed
▪ Paravirtualization allowed virtualization of older x86 CPUs (and
others) without binary translation
▪ Guest had to be modified to use run on paravirtualized VMM
▪ But on modern CPUs Xen no longer requires guest modification ->
no longer paravirtualization
Types of VMs – Programming Environment
Virtualization
▪ Also not-really-virtualization but using same techniques, providing similar
features
▪ Programming language is designed to run within custom-built virtualized
environment
• For example Oracle Java has many features that depend on running in
Java Virtual Machine (JVM)
▪ In this case virtualization is defined as providing APIs that define a set of
features made available to a language and programs written in that language
to provide an improved execution environment
▪ JVM compiled to run on many systems (including some smart phones)
▪ Programs written in Java run in the JVM no matter the underlying system
▪ Similar to interpreted languages
Types of VMs – Emulation
▪ Another (older) way for running one operating system on a different OS
• Virtualization requires underlying CPU to be same as guest was
compiled for
• Emulation allows guest to run on different CPU
▪ Necessary to translate all guest instructions from guest CPU to native CPU
• Emulation, not virtualization
▪ Useful when host system has one architecture, guest compiled for
other architecture
• Company replacing outdated servers with new servers containing
different CPU architecture, but still want to run old applications
▪ Performance challenge – order of magnitude slower than native code
• New machines faster than older machines so can reduce slowdown
▪ Very popular – especially in gaming where old consoles emulated on new
Types of VMs – Application Containment
▪ Some goals of virtualization are segregation of apps, performance and
resource management, easy start, stop, move, and management of them
▪ Can do those things without full-fledged virtualization
• If applications compiled for the host operating system, don’t need full
virtualization to meet these goals
▪ Oracle containers / zones for example create virtual layer between OS and
apps
• Only one kernel running – host OS
• OS and devices are virtualized, providing resources within zone with
impression that they are only processes on system
• Each zone has its own applications; networking stack, addresses, and
ports; user accounts, etc
• CPU and memory resources divided between zones
 Zone can have its own scheduler to use those resources
Solaris 10 with
Two Zones

You might also like