Dr. M. Sri Devi Sameera Associate Professor Dept of CSE Dhanekula Inst of Eng & Tech
Dr. M. Sri Devi Sameera Associate Professor Dept of CSE Dhanekula Inst of Eng & Tech
UNIT-2
UNIT- II: Virtual Machines and Virtualization of Clusters and Data Centers
3. Virtualization of CPU,
• Hardware resources (CPU, memory, I/O devices, etc.) or software resources (operating
system and software libraries) can be virtualized in various functional layers.
Advantage:
• Has minimal starup/shutdown cost, low resource and high
• In this scenario, the virtualization layer sits as an application program on top of the
operating system, and the layer exports an abstraction of a VM that can run programs
written and compiled to a particular abstract machine definition.
• Any program written in the HLL and compiled for this VM will be able to run on it.
• The Microsoft .NET CLR and Java Virtual Machine (JVM) are two good examples of this
class of VM.
• It enables multiple isolated VMs within a single operating system kernel. This
kind of VM is often called a virtual execution environment (VE), Virtual
Private System (VPS), or simply container.
• From the user’s point of view, VEs look like real servers.
• This means a VE has its own set of processes, file system, user accounts,
network interfaces with IP addresses, routing tables, firewall rules, and other
personal settings.
• For an OS level VM, the VM and its host environment can synchronise state changes.
• This is the other name for Library-level Virtualization and is also known as user-
level Application Binary Interface or API emulation.
• Full virtualization does not need to modify the host OS. It relies on binary translation to
trap and to virtualize the execution of certain sensitive, non-virtualizable instructions.
• The guest OSes and their applications consist of noncritical and critical instructions.
• Both the hypervisor and VMM approaches are considered full virtualization.
• This host OS is still responsible for managing the hardware. The guest OSes are installed and
run on top of the virtualization layer.
• the user can install this VM architecture without modifying the host OS.
• The virtualizing software can rely on the host OS to provide device drivers and other
low-level services.
• The virtualization layer can be inserted at different positions in a machine software stack.
• A hypercall is based on the same concept as a system call. System calls are used by an
application to request services from the OS and provide the interface between the
application or process and the OS. Hypercalls work the same way, except the
hypervisor is used.
• To support virtualization, processors such as the x86 employ a special running mode and
instructions, known as hardware-assisted virtualization.
• Thus, unprivileged instructions of VMs run directly on the host machine for higher efficiency.
• Other critical instructions should be handled carefully for correctness and stability.
• The critical instructions are divided into three categories: privileged instructions, control
sensitive instructions, and behavior- sensitive instructions.
• Privileged instructions execute in a privileged mode and will be trapped if executed outside this
mode.
• Intel and AMD add an additional mode called privilege mode level (some people call it
Ring-1) to x86 processors.
• Therefore, operating systems can still run at Ring 0 and the hypervisor can run at Ring -1.
• All the privileged and sensitive instructions are trapped in the hypervisor automatically.
• All modern x86 CPUs include a memory management unit (MMU) and a translation lookaside buffer (TLB) to
optimize virtual memory performance.
• A translation lookaside buffer (TLB) is a memory cache that is used to reduce the time taken to access a user
memory location. It is a part of the chip's memory-management unit (MMU). The TLB stores the recent
translations of virtual memory to physical memory and can be called an address-translation cache.
• However, in a virtual execution environment, virtual memory virtualization involves sharing the physical
system memory in RAM and dynamically allocating it to the physical memory of the VMs.
• Emulation is using software to provide a different execution environment or architecture. For example,
you might have an Android emulator run on a Windows box. The Windows box doesn't have the same
processor that an Android device does so the emulator actually executes the Android application
through software.
• In para-VZ, the frontend driver runs in Domain-U; it manages the requests of the guest OS.
The backend driver runs in Domain-0 and is responsible for managing the real I/O devices.
This methodology (para) gives more performance but has a higher CPU overhead.
• This lets the VM access devices directly; achieves high performance with lower costs.
Currently, it is used only for the mainframes.
• Virtual clusters is that they consist of many of the same server, all divided up the same
way. Big jobs are handled by adding more virtual instance to the workflow.
• The virtual cluster nodes can be either physical or virtual (VMs) with different operating systems.
• A VM runs with a guest OS that manages the resources in the physical machine.
• The purpose of using VMs is to consolidate multiple functionalities on the same server.
• VMs can be replicated in multiple servers to promote parallelism, fault tolerance and disaster
discovery.
• The failure of some physical nodes will slow the work but the failure of VMs will cause no
harm (fault tolerance is high).
• It also has a drawback – a VM must stop working if its host node fails. This can
be lessened by migrating from one node to another for a similar VM.
• We can use a guest-based manager, by which the cluster manager resides inside a
guest OS.
• We can bring out a host-based manager which itself is a cluster manager on the
host systems.
• An independent cluster manager, which can be used onboth the host and the
guest–making the infrastructure complex.
• Finally, we might also use an integrated cluster (manager), on the guest and host
operating systems; here the manager must clearly distinguish between physical and
virtual resources.
8/16/2024 Cloud Computing/ Unit-2
VM STATES
• Inactive State: This is defined by the VZ platform, under which the VM is not enabled.
• Active State: This refers to a VM that has been instantiated at the VZ platform to
perform a task.
• Paused State: A VM has been instantiated but disabled temporarily to process a task
or is in a waiting state itself.
• Suspended State: A VM enters this state if its machine file and virtual resources are
stored back to the disk.
• Step 2: Transfer memory (transfer the memory data + recopy any data that is changed
during the process). This goes on iteratively till changed memory is small enough to be
handled directly.
• Step 3: Suspend the VM and copy the last portion of the data.
• Steps 4 and 5: Commit and activate the new host. Here, all the data is recovered, and
the VM is started from exactly the place where it was suspended, but on the new host.
8/16/2024 Cloud Computing/ Unit-2
8/16/2024 Cloud Computing/ Unit-2
Migration of Memory, Files, and Network
Resources
• File system migration refers to the system management operations related to stopping
access to a file system, and then restarting these operations to access the file system from
a different computer system.
• Server consolidation is an approach to improve the low utility ratio of hardware resources by
reducing the number of physical servers.
• This approach runs multiple platforms and diverse applications on a single server
(or cluster).
• This technique uses partitioning and virtualization to run many "virtual servers"
on a single machine.
• This makes efficient use of system resources while minimizing upkeep tasks.
1. VM images and
2. Application data.
• The VM images are special to the virtual environment.
• The application data includes all other data which is the same as the data in
traditional OS environments.
• CAS makes data retrieval straightforward by storing it in such a way that an object
cannot be duplicated or modified once it has been stored; thus, its location is
unambiguous.
• Its purpose is to build private clouds that can interact with end users through Ethernet
or the Internet.
• The system also supports interaction with other private clouds or public clouds over
the Internet.
• Intrusions are unauthorized access to a certain computer from local or network users
network or devices for suspicious activities and helps to detect intrusions. Typically, an IDS is
connected to Security Information and Event Management (SIEM) system, which collects
outputs from various security systems and filters out malicious activities report them.
• An intrusion detection system (IDS) is a system that monitors network traffic for suspicious
activity and issues alerts when such activity is discovered. While anomaly detection and
reporting is the primary function, some intrusion detection systems are capable of taking actions
when malicious activity or anomalous traffic is detected, including blocking traffic sent from
suspicious IP addresses.
• Virtualization-based intrusion detection can isolate guest VMs on the same hardware platform.
Even some VMs can be seized successfully; they never influence other VMs, which is similar to the
way in which a NIDS operates. Furthermore, a VMM monitors and audits access requests for
hardware and system software. This can avoid fake actions and possess the merit of a HIDS.
2.the IDS is integrated into the VMM and has the same privilege to access the hardware as well as
the VMM
• The policy framework can monitor events in different guest VMs by operating system
interface library and PTrace indicates trace to secure policy of monitored host.
• Therefore, an analysis of the intrusion action is extremely important after an intrusion occurs.
• Thus, when an operating system is attacked by attackers, the log service should be unaffected.