Module 2
Module 2
Module 2
Dr. Jeevitha B K
Associate Professor
Department of Computer Science and Engineering
Vivekananda College of Engineering and Technology
Puttur
October 6, 2024
All the operations of the guest are generally performed aganist the virtual
machine, which then translates and applies them to host.
- this level of indirection allows the virtual machine manager to control
and filter the activity of the guest, thus preventing some harmful
operations from being performed.
Finally, Portability allows having your own system always with you and
ready to use as long as the required virtual machine manager is available.
2 System-level
techniques are implemented directly on hardware and do not require or
require a minimum support from an existing Operating system.
Within these two categories, we can list different techniques which offer to
the guest a different type of virtual computation environment: bare
hardware, operating system, low-level programming langauage, and
application libraries.
The instruction set by the hardware has been divided into different security
classes, which define who can operate with them.
Recent system support only two levels, with Ring 0 for supervisor mode
and Ring 3 for user mode.
All the current systems support atleast two different execution modes
1 Supervisor Mode
first mode
an execution mode where all the isntruction can be executed without
any restrictions.
It is also called as master mode/kernel mode
It is used by the operating system to perform sensitive operations on
hardware-level resources.
2 User Mode
If a code running in user mode invokes the privileged instructions,
hardware interrupts occur and trap the potentially execution of the
instruction.
In this model,
the guest is represented by the operating system,
Host by the physical computer hardware,
Virtual machine by its emulation,
Virtual machine manager by the hypervisor
Type II – Hosted VM
hypervisors require the support
of an operating system to
provide virtualization services.
It emulate the ISA of virtual
hardware for guest operating
systems.
This type of hypervisor is also
called a Hosted Virtual
Machine since it is hosted
within an operating system.
THEOREM 3.1
For any conventional third-generation computer, a VMM may be
constructed if the set of sensitive instructions for that computer is a subset
of the set of privileged instructions.
This theorem establishes that all the instructions that change the
configuration of the system resources should trap from the user mode
and be executed under the control of virtual machine manager.
The theorem always guarantees the resource control property when
the hypervisor is in the most privileged mode (Ring 0).
The non-privikeged instructions must be executed without the
intervention of hypervisor.
Dr. Jeevitha B K (VCET) CC October 6, 2024 32 / 83
Theorems of VMM II
The equivalence property also holds good since the output of the
code is the same in both cases because the code is not changed.
THEOREM 3.2
A conventional third-generation computer is recursively virtualizable if:
It is virtualizable and
A VMM without any timing dependencies can be constructed for it.
Recursive virtualization is the ability to run a virtual machine
manager on top of another virtual machine manager.
This allows nesting hypervisors as long as the capacity of the
underlying resources can accommodate that.
Virtualizable hardware is a pre-requisite to recursive virtualization.
THEOREM 3.3
A hybrid VMM may be constructed for any conventional third-generation
machine in which the set of user-sensitive instructions is a subset of the
set of privileged instructions.
hybrid virtual machine(HVM), which is less efficient than the virtual
machine system.
more instructions are interpreted rather than being executed directly.
All instructions in virtual supervisor mode are interpreted.
Whenever there is an attempt to execute a behavior-sensitive or
control-sensitive instruction, HVM controls the execution directly or
gains the control via a trap.
All sensitive instructions are caught by HVM that are simulated.
Hardware-assisted Virtualization
Hardware provides architectural support to run guest OS.
Originally introduced in IBM system/370
Examples of hardware-assisted virtualization are the extensions to the
x86-64 bit architecture introducted with Intel VT (formerly known as
Vanderpool)and AMD V (formely known as Pacifica).
Full virtualization
Refers to the ability to run a program, most likely an operating
system, directly on top of a virtual machine and without any
modification, as though it were run on the raw hardware.
Virtual machine managers are required to provide a complete
emulation of the entire underlying hardware.
Advantage: complete isolation, which leads to enhanced security.
Challenge: interception of privileged instructions such as I/O
instructions, since they change the state of the resources exposed by
the host.
Solution: to achieve full virtualization is to provide a virtual
environment for all the instructions.
Para virtualization
It is not a transparent virtualization solution that allows implementing
thin virtual machine manager.
Paravirtualization techniques expose a software interface
(allow software to communicate with a hardware device )to the virtual
machine that is slightly modified from the host and, as a
consequence, guests need to be modified.
Aim - is to provide the capability to demand the execution of
performance-critical operations directly on the host.
Partial virtualization
Provides a partial emulation of the underlying hardware, thus not
allowing the complete execution of the guest operating system in
complete isolation.
Partial virtualization allows many applications to run transparently,
but not all the features of the operating system can be supported.
Example: address space virtualization used in time-sharing systems;
this allows multiple applications and users to run concurrently in a
separate memory space, but they still share the same hardware
resources (disk, processor, and network).
Partial virtualization has been an important milestone for achieving
full virtualization and it was implemented on the experimental IBM
M44/44X.
Applications are not installed in the expected runtime environment but are
run as though they were.
The techniques are concerned with partial file systems, libraries, and
operating system component emulation.
- Such emulation is performed by a thin layer — a program or an
operating system component — that is incharge of executing the
application.
2 Network virtualization
3 Desktop virtualization
Users donot have to be worried about the specific location of their data,
which can be identified using a logical path.
This is the particular form of virtualization and serves the same purpose of
storage virtualization.
The primary reason for its wide success is the elimination of technology
barriers that prevented virtualization from being an effective and viable
solution.
Advantages
1 Managed execution and isolation:
Disadvantages
1 Performance degradation: due to VMM as intermediate
This figure shows the architecture of Xen and its mapping on to x86
privilege model – machines and servers.
Xen-based system is managed by the Xen hypervisor, which runs in
the highest privileged mode and controls the access of guest OS to
the network.
Guest OS are executed within domain which represents virtual
machine instances. Specific control software, which has privileged
access to the host and controls all the other guest operating systems
is executed in a special domain called Domain 0.
Many of the x86 implementations support four different security levels
called rings.
Ring 0 - Kernel code - represents the level with highest privileges.
Ring 3 - User application and non-privileged OS code - represents the
level with lowest ones.
Domain 0 and Domain Uruns the guest OS in Ring 1.
End-user environment
VMware supports virtualization of operating system environments and
single applications on end-user computers.
allows installing a different operating systems and applications in a
completely isolated environment from the hosting operating system.
Server Virtualization
Server virtualization was provided by VMWare GSX server, which
replicates the approach used for end-user computers and introduces
remote management and scripting capabilities.
Vmware ESX server and its advanced version Vmware ESXi embeds a
modified version of Linux OS which provides access through a service
console to hypervisor.
ESXi implements a very thin OS layer and replace the service console
with interfaces and services for remote management.
VMKernel which is a thin POSIX complaint OS that provide the
minimal functionality for processes and thread management, file
system, I/O stacks and resource scheduling.
This kernel is accessible through specific APIs.
- these APIs are utilized by all the agents that provide supporting
activities for the management of virtual machines.
Remote management for ESXi server is provided by the CM Broker
- CM broker is a software agent that acts as a gateway to the kernel
for clients by usign Common Information Model (CIM) protocol.
Hyper-V takes control of the hardware, and the host operating system
becomes a virtual machine instance with special privileges, called parent
partition
Parent Partition
has direct access to hardware,
runs the virtualization stack,
Child Partition
Used to host guest OS
Do not have access to h/w
Interaction with h/w is controlled by parent partition or hypervisor
itself.
Parent Partition
Child Partition
Children partitions are used to execute guest OS.