Unit 2 CC (R20)
Unit 2 CC (R20)
Unit 2 CC (R20)
UNIT 2
Table 3.2 compares four hypervisors and VMMs that are in use today.
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.
Although VEs can be customized for different people, they share the same
operating system kernel. Therefore, OS-level virtualization is also called
single-OS image virtualization. Figure 3.3 illustrates operating system
virtualization from the point of view of a machine stack.
Advantages of OS Extensions
Disadvantages of OS Extensions
CLOUD COMPUTING LECTURE NOTES [B20 CS4101]
The main disadvantage of OS extensions is that all the VMs at operating system
level on a single container must have the same kind of guest operating system.
That is, although different OS-level VMs may have different operating system
distributions, they must pertain to the same operating system family. For
example, a Windows distribution such as Windows XP cannot run on a
Linux-based container. However, users of cloud computing have various
preferences. Some prefer Windows and others prefer Linux or other operating
systems. Therefore, there is a challenge for OS-level virtualization in such cases.
In general, there are three typical classes of VM architecture. Figure 3.1 showed
the architectures of a machine before and after virtualization. Before
virtualization, the operating system manages the hardware. After virtualization,
CLOUD COMPUTING LECTURE NOTES [B20 CS4101]
between the hardware and the OS. A number of vendors are in the process of
developing commercial Xen hypervisors, among them are Citrix XenServer and
Oracle VM.
The core components of a Xen system are the hypervisor, kernel, and
applications. The organization of the three components is important. Like other
virtualization systems, many guest OSes can run on top of the hypervisor.
However, not all guest OSes are created equal, and one in particular controls the
others. The guest OS, which has control ability, is called Domain 0, and the
others are called Domain U. Domain 0 is a privileged guest OS of Xen. It is first
loaded when Xen boots without any file system drivers being available. Domain 0
is designed to access hardware directly and manage devices. Therefore, one of
the responsibilities of Domain 0 is to allocate and map hardware resources for
the guest domains (the Domain U domains).
Full Virtualization
With full virtualization, noncritical instructions run on the hardware directly while
critical instructions are discovered and replaced with traps into the VMM to be
emulated by software. Both the hypervisor and VMM approaches are considered
full virtualization. Why are only critical instructions trapped into the VMM? This is
because binary translation can incur a large performance overhead. Noncritical
CLOUD COMPUTING LECTURE NOTES [B20 CS4101]
instructions do not control hardware or threaten the security of the system, but
critical instructions do. Therefore, running noncritical instructions on hardware
not only can promote efficiency, but also can ensure system security.
Host-Based Virtualization
CLOUD COMPUTING LECTURE NOTES [B20 CS4101]
1. 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. This will simplify the VM design and ease its
deployment.
2. The host-based approach appeals to many host machine configurations.
Compared to the hypervisor/VMM architecture, the performance of the
host-based architecture may also be low.
Para-Virtualization Architecture
The guest OS running in a guest domain may run at Ring 1 instead of at Ring 0.
This implies that the guest OS may not be able to execute some privileged and
sensitive instructions. The privileged instructions are implemented by hypercalls
to the hypervisor. After replacing the instructions with hypercalls, the modified
guest OS emulates the behavior of the original guest OS. On an UNIX system, a
system call involves an interrupt or service routine. The hypercalls apply a
dedicated service routine in Xen.
Virtualization of CPU
1. Privileged instructions
2. Control sensitive instructions
3. Behaviour sensitive instructions
Processors with virtualization technology have extra instruction set called virtual
machine extensions or VMX.
There are two modes to run under virtualization: root operation and non-root
operation. Usually only the virtualization controlling software, called Virtual
Machine Monitor (VMM), runs under root operation, while operating systems
running on top of the virtual machines run under non-root operation. Software
running on top of virtual machines is also called ‛guest software‚.
Memory Virtualization
Page tables within guest OS: Translate from virtual to physical addresses.
Traditional way is to have the VMM maintain a shadow of the VM’s page table.
The shadow page table controls which pages of machine memory are assigned to
a given VM. When OS updates it’s page table, VMM updates the shadow.
I/O Virtualization
The technology enables one physical adapter card to appear as multiple virtual
network interface cards (vNICs) and virtual host bus adapters (vHBAs). Virtual
NICs and HBAs function as conventional NICs and HBAs, and are designed to be
compatible with existing operating systems, hypervisors, and applications. To
networking resources (LANs and SANs), they appear as normal cards.
In the physical view, virtual I/O replaces a server’s multiple I/O cables with a
single cable that provides a shared transport for all network and storage
connections. That cable (or commonly two cables for redundancy) connects to an
external device, which then provides connections to the data center networks.
• The failure of any physical nodes may disable some VMs installed on the
failing nodes. But the failure of VMs will not pull down the host system.
● If one user finishes using his system, the corresponding virtual cluster
should shut down or suspend quickly to save the resources to run other
VMs for other users.
Basically, there are four steps to deploy a group of VMs onto a target cluster:
preparing the disk image, configuring the VMs, choosing the destination nodes,
and executing the VM deployment command on every host.
2. Host-based manager supervises the guest systems and can restart the guest
system on another physical machine. A good example is the VMware HA
system that can restart a guest system after failure.
3. Independent cluster manager on both the host and guest systems. This will
make infrastructure management more complex, however.
4. Integrated cluster on the guest and host systems. This means the manager
must be designed to distinguish between virtualized resources and physical
resources. Various cluster management schemes can be greatly enhanced
when VM life migration is enabled with minimal overhead.
1. negligible downtime,
2. the lowest network bandwidth consumption possible,
CLOUD COMPUTING LECTURE NOTES [B20 CS4101]
Live migration techniques mainly use the precopy approach, which first transfers
all memory pages, and then only copies modified pages during the last round
iteratively. The VM service downtime is expected to be minimal by using iterative
copy operations. When applications’ writable working set becomes small, the VM
is suspended and only the CPU state and dirty pages in the last round are sent
out to the destination.
Postcopy is introduced for live migration of VMs. Here, all memory pages are
transferred only once during the whole migration process and the baseline total
migration time is reduced. But the downtime is much higher than that of precopy
due to the latency of fetching pages from the source node before the VM can be
resumed on the target. We can exploit these copious CPU resources to compress
page frames and the amount of transferred data can be significantly reduced.
Memory compression algorithms typically have little memory overhead.
Decompression is simple and very fast and requires no memory for
decompression.
Memory Migration
Moving the memory instance of a VM from one physical host to another can be
approached in any number of ways. But traditionally, the concepts behind the
techniques tend to share common implementation paradigms. The techniques
employed for this purpose depend upon the characteristics of
application/workloads supported by the guest OS. Memory migration can be in a
range of hundreds of megabytes to a few gigabytes in a typical system today,
and it needs to be done in an efficient manner.
Another way is to have a global file system across all machines where a VM
could be located. This way removes the need to copy files from one machine to
another because all files are network- accessible. A distributed file system is
used in ISR serving as a transport mechanism for propagating a suspended VM
state.
The actual file systems themselves are not mapped onto the distributed file
system. Instead, the VMM only accesses its local file system. The relevant VM
files are explicitly copied into the local file system for a resume operation and
taken out of the local file system for a suspend operation. However, this
decoupling means that the VMM has to store the contents of each VM’s virtual
disks in its local files, which have to be moved around with the other state
information of that VM.
Network Migration
storage (NAS), is employed. Only memory and CPU status need to be transferred
from the source node to the target node.
1. Chatty workloads may burst at some point and return to a silent state at
some other point. A web video service is an example of this, whereby a lot
of people use it at night and few people use it during the day.
2. Noninteractive workloads do not require people’s efforts to make progress
after they are submitted. High-performance computing is a typical example
of this.
It is common that most servers in data centers are underutilized. A large amount
of hardware, space, power, and management cost of these servers is wasted.
Server consolidation is an approach to improve the low utility ratio of hardware
resources by reducing the number of physical servers.
CLOUD COMPUTING LECTURE NOTES [B20 CS4101]
1. VM images
2. Application data.
The VM images are special to the virtual environment, while application data
includes all other data which is the same as the data in traditional OS
environments. The most important aspects of system virtualization are
encapsulation and isolation.
The main purposes of the research are to make management easy while
enhancing performance and reducing the amount of storage occupied by the VM
images. Parallax is a distributed storage system customized for virtualization
environments. Content Addressable Storage (CAS) is a solution to reduce the
total size of VM images, and therefore supports a large set of VM-based systems
in data centers.
For each physical machine, Parallax customizes a special storage appliance VM.
The storage appliance VM acts as a block virtualization layer between individual
VMs and the physical storage device. It provides a virtual disk for each VM on
the same physical machine. Parallax itself runs as a user-level application in the
storage appliance VM.
It provides virtual disk images (VDIs) to VMs. A VDI is a single-writer virtual disk
which may be accessed in a location-transparent manner from any of the
physical hosts in the Parallax cluster. The VDIs are the core abstraction provided
CLOUD COMPUTING LECTURE NOTES [B20 CS4101]
by Parallax. Parallax uses Xen’s block tap driver to handle block requests and it
is implemented as a tapdisk library. This library acts as a single block
virtualization service for all client VMs on the same physical host. In the Parallax
system, it is the storage appliance VM that connects the physical hardware
device for block and network access.
These VI managers are used to create VMs and aggregate them into virtual
clusters as elastic resources. Nimbus and Eucalyptus support essentially virtual
networks. OpenNebula has additional features to provision dynamic resources
and make advance reservations. All three public VI managers apply Xen and
KVM for virtualization. vSphere 4 uses the hypervisors ESX and ESXi from
CLOUD COMPUTING LECTURE NOTES [B20 CS4101]
Encapsulated machine state can be copied and shared over the network and
removed like a normal file, which proposes a challenge to VM security.
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. The IDS log service is based on the operating system kernel. Thus, when
an operating system is invaded by attackers, the log service should be
unaffected.
Besides IDS, honeypots and honeynets are also prevalent in intrusion detection.
They attract and provide a fake system view to attackers in order to protect the
real system. In addition, the attack action can be analysed, and a secure IDS
can be built. A honeypot is a purposely defective system that simulates an
operating system to cheat and monitor the actions of an attacker. A honeypot
can be divided into physical and virtual forms. The host operating system and
VMM must be guaranteed to prevent attacks from the VM in a virtual honeypot.