You are on page 1of 17

Aim : To study and implement Hosted Virtualization using VirtualBox & KVM.

Hardware Requirements :
PC with hardware virtualization extensions
Software Requirements :
For Windows Based system Virtual Box & Linux Ubuntu 20.04
For Linux based system only Ubuntu 21
Theory :
Virtualization is very important concept in cloud computing. In cloud computing, a cloud
vendor who will provide cloud services have all physical resources like server, storage device,
network device etc. and these physical services are rented by cloud vendors so that user’s will
not worry about these physical services.
With the help of Virtualization, multiple operating systems and applications can run on the
same machine and its same hardware at the same time, increasing the utilization and flexibility
of hardware making it cost-effective, hardware-reducing, and energy-saving.Virtualization
allows sharing of a single physical instance of a resource or an application among multiple
customers and organizations at one time. It does this by assigning a logical name to physical
storage and providing a pointer to that physical resource on demand. The term virtualization is
often synonymous with hardware virtualization, which plays a fundamental role in efficiently
delivering Infrastructure-as-a-Service (IaaS) solutions for cloud computing. Moreover,
virtualization technologies provide a virtual environment for not only executing applications
but also for storage, memory, and networking.
Benefits of Virtualization
 More flexible and efficient allocation of resources.
 Enhance development productivity.
 It lowers the cost of IT infrastructure.
 Remote access and rapid scalability.
 High availability and disaster recovery.
 Pay peruse of the IT infrastructure on demand.
 Enables running multiple operating systems.
Characteristics of Virtualization
 Increased Security: The ability to control the execution of a guest program in a completely
transparent manner opens new possibilities for delivering a secure, controlled execution
environment. All the operations of the guest programs are generally performed against the
virtual machine, which then translates and applies them to the host programs.
 Managed Execution: In particular, sharing, aggregation, emulation, and isolation are the
most relevant features.
 Sharing: Virtualization allows the creation of a separate computing environment within the
same host.
 Aggregation: It is possible to share physical resources among several guests, but
virtualization also allows aggregation, which is the opposite process.

 Emulation:Guest programs are executed within an environment that is controlled by the


virtualization layer, which ultimately is a program. Also, a completely different
environment with respect to the host can be emulated, thus allowing the execution of guest
programs requiring specific characteristics that are not present in the physical host.

 Isolation : Virtualization allows providing guests—whether they are operating systems,


applications, or other entities—with a completely separate environment, in which they are
executed. The guest program performs its activity by interacting with an abstraction layer,
which provides access to the underlying resources. The virtual machine can filter the
activity of the guest and prevent harmful operations against the host.

 Portability – The concept of portability applies in different ways according to the specific
type of virtualization considered.In the case of a hardware virtualization solution, the guest
is packaged into a virtual image that, in most cases, can be safely moved and executed on
top of different virtual machines. In the case of programming-level virtualization, as
implemented by the JVM or the .NET runtime, the binary code representing application
components (jars or assemblies) can run without any recompilation on any implementation
of the corresponding virtual machine.

 Resource sharing: Virtualization allows multiple virtual machines to share the resources of
a single physical machine, such as CPU, memory, storage, and network bandwidth. This
improves hardware utilization and reduces the need for additional physical servers.

 Flexibility: Virtualization allows IT administrators to quickly and easily create, modify, or


delete virtual machines as needed, without the need to purchase and configure additional
physical hardware.

 Hardware independence: Virtual machines are hardware-independent, which means they


can run on different types of physical hardware and can be easily moved between physical
servers without needing to reconfigure the virtual machine.
 Scalability: Virtualization allows organizations to scale their computing resources up or
down as needed, depending on changing business requirements.

 Management: Virtualization provides centralized management tools that allow IT


administrators to monitor and manage multiple virtual machines from a single console,
making it easier to troubleshoot and maintain the virtualized environment.Virtualization
provides a powerful and flexible technology that can help organizations maximize their
hardware utilization, improve their IT infrastructure scalability, and simplify their IT
management.

Pros of Virtualization in Cloud Computing :


 Utilization of Hardware Efficiently –
With the help of Virtualization Hardware is Efficiently used by user as well as Cloud
Service Provider. In this the need of Physical Hardware System for the User is decreases
and this results in less costly.In Service Provider point of View, they will vitalize the
Hardware using Hardware Virtualization which decrease the Hardware requirement from
Vendor side which are provided to User is decreased.
 Availability increases with Virtualization –
It provides advance features which allow virtual instances to be available all the times. It
also has capability to move virtual instance from one virtual Server another Server which is
very tedious and risky task in Server Based System. During migration of Data from one
server to another it ensures its safety. Also, we can access information from any location
and any time from any device.
 Disaster Recovery is efficient and easy –
With the help of virtualization Data Recovery, Backup, Duplication becomes very easy. If
somehow due to some disaster if Server system Damaged then with the tools of
Virtualization real time data backup recovery and mirroring become easy task and provide
surety of zero percent data loss.
 Virtualization saves Energy –
Virtualization will help to save Energy because while moving from physical Servers to
Virtual Server’s, the number of Server’s decreases due to this monthly power and cooling
cost decreases which will Save Money as well. As cooling cost reduces it means carbon
production by devices also decreases which results in Fresh and pollution free
environment.
 Quick and Easy Set up –
With the help of virtualization the setting of Server,hardware,network is done in very less
time which results in productive setup.
 Cloud Migration becomes easy –
It is more cost-effective to shift to cloud services because all the data that is present in their
server’s can be easily migrated into the cloud server and save something from maintenance
charge, power consumption, cooling cost, cost to Server Maintenance Engineer etc.

Cons of Virtualization :
 Data can be at Risk –
Working on virtual instances on shared resources means that our data is hosted on third
party resource which put’s our data in vulnerable condition. Any hacker can attack on our
data or try to perform unauthorized access. Without Security solution our data is in threaten
situation.
 Learning New Infrastructure –
As Organization shifted from Servers to Cloud. They required skilled staff who can work
with cloud easily. Either they hire new IT staff with relevant skill or provide training on that
skill which increase the cost of company.
 High Initial Investment –
It is true that Virtualization will reduce the cost of companies but also it is truth that Cloud
have high initial investment. It provides numerous services which are not required and
when unskilled organization will try to set up in cloud they purchase unnecessary services
which are not even required to them.
Types of Virtualization

Types of Virtualization
1. Application Virtualization
2. Network Virtualization
3. Desktop Virtualization
4. Storage Virtualization
5. Server Virtualization
6. Data virtualization

1. Application Virtualization: Application virtualization helps a user to have remote access to


an application from a server. The server stores all personal information and other
characteristics of the application but can still run on a local workstation through the internet.
An example of this would be a user who needs to run two different versions of the same
software. Technologies that use application virtualization are hosted applications and packaged
applications.
2. Network Virtualization: The ability to run multiple virtual networks with each having a
separate control and data plan. It co-exists together on top of one physical network. It can be
managed by individual parties that are potentially confidential to each other. Network
virtualization provides a facility to create and provision virtual networks, logical switches,
routers, firewalls, load balancers, Virtual Private Networks (VPN), and workload security
within days or even weeks.
3. Desktop Virtualization: Desktop virtualization allows the users’ OS to be remotely stored
on a server in the data center. It allows the user to access their desktop virtually, from any
location by a different machine. Users who want specific operating systems other than
Windows Server will need to have a virtual desktop. The main benefits of desktop
virtualization are user mobility, portability, and easy management of software installation,
updates, and patches.
4. Storage Virtualization: Storage virtualization is an array of servers that are managed by a
virtual storage system. The servers aren’t aware of exactly where their data is stored and
instead function more like worker bees in a hive. It makes managing storage from multiple
sources be managed and utilized as a single repository. storage virtualization software
maintains smooth operations, consistent performance, and a continuous suite of advanced
functions despite changes, breaks down, and differences in the underlying equipment.
5. Server Virtualization: This is a kind of virtualization in which the masking of server
resources takes place. Here, the central server (physical server) is divided into multiple
different virtual servers by changing the identity number, and processors. So, each system can
operate its operating systems in an isolated manner. Where each sub-server knows the identity
of the central server. It causes an increase in performance and reduces the operating cost by the
deployment of main server resources into a sub-server resource. It’s beneficial in virtual
migration, reducing energy consumption, reducing infrastructural costs, etc.

Types of Server Virtualization

There are three main types of server virtualization: full-virtualization, para-virtualization, and
OS-level virtualization.

 Full-Virtualization

A hypervisor is a specialized type of software that is necessary for full server virtualization.
There are many different hypervisors available, so make sure to compare your requirements with
available features before finalizing a purchase. Hypervisors function by communicating with
servers to monitor disk space and CPU usage. The software can then allocate resources as needed
across multiple virtual server deployments. Computing power can even be shared across various
operating systems with ease without sacrificing efficiency. Hypervisors do require a set amount
of dedicated server resources to operate, limiting overall server power. When utilizing full
virtualization, the separate server instances will not need to be aware of each other.

 Para-Virtualization

The major difference between full and para-virtualization is that each OS on the server is aware
of each other's presence. This allows for an entire network to work together to manage resources.
The most significant benefit of para-virtualization is that the hypervisor doesn't require nearly as
many resources to operate because different virtual servers are aware of each other and thus can
more efficiently share physical resources.

 OS-Level Virtualization

The most basic form of server virtualization is OS-level virtualization. There are limitations
when using this method, but it can be implemented and maintained with fewer resources than
para- or full- virtualization. When using OS-level virtualization, there is no need for a
hypervisor. The duty of managing resources and separating virtual machines is instead handled
by the physical server’s operating system. The drawback to this solution is that each virtual
machine will have to run the same operating system, because the OS is acting as a hypervisor.

6. Data Virtualization: This is the kind of virtualization in which the data is collected from
various sources and managed at a single place without knowing more about the technical
information like how data is collected, stored & formatted then arranged that data logically so
that its virtual view can be accessed by its interested people and stakeholders, and users
through the various cloud services remotely. Many big giant companies are providing their
services like Oracle, IBM, At scale, Cdata, etc.

Uses of Virtualization
 Data-integration
 Business-integration
 Service-oriented architecture data-services
 Searching organizational data

Virtualization is generally achieved through the hypervisor. A hypervisor enables the separation
of operating systems with the underlying hardware. It enables the host machine to run many
virtual machines simultaneously and share the same physical computer resources.

There are two methods through which virtualization architecture is achieved described below:
 Type one: The first hypervisor type is termed a bare-metal hypervisor. They directly
run over the top of the hardware of the host system. They deliver effective resource
management and ensure the high availability of resources. It delivers direct access to the
hardware system, ensuring better scalability, performance, and stability.
 Type two: The second hypervisor type is the hosted hypervisor. This is installed on the
host operating system, and the virtual operating system runs directly above the
hypervisor. It is the kind of system that eases and simplifies system configuration.

KVM hypervisor
KVM (Kernel-based Virtual Machine) is the leading open source virtualisation technology for
Linux. It installs natively on all Linux distributions and turns underlying physical servers into
hypervisors so that they can host multiple, isolated virtual machines (VMs). KVM comes with no
licenses, type-1 hypervisor capabilities and a variety of performance extensions which makes it
an ideal candidate for virtualisation and cloud infrastructure implementation. But what are the
benefits of KVM hypervisor and how do you get started?

In the following blog, we present the beginner’s guide to KVM on Ubuntu.


KVM hypervisor enables full virtualisation capabilities. It provides each VM with all typical
services of the physical system, including virtual BIOS (basic input/output system) and virtual
hardware, such as processor, memory, storage, network cards, etc. As a result, every VM
completely simulates a physical machine.

KVM is available as a Linux kernel module. It plugs directly into the kernel’s code and allows it
to function as a hypervisor. Every VM runs as a separate Linux process under systemd, with
dedicated virtual hardware resources attached. KVM can only be used on a processor with
hardware virtualisation extensions, such as Intel-VT or AMD-V.

KVM hypervisor benefits

The main benefit of the KVM hypervisor is its native availability on Linux. Since KVM is part
of Linux, it installs natively, enabling straightforward user experience and smooth integration.
But KVM brings more benefits compared to other virtualisation technologies. Those include:

 Performance – One of the main drawbacks of traditional virtualisation technologies is


performance degradation compared to physical machines. Since KVM is the type-1
hypervisor, it outperforms all type-2 hypervisors, ensuring near-metal performance. With
KVM hypervisor VMs boot fast and achieve desired performance results.
 Scalability – As a Linux kernel module, the KVM hypervisor automatically scales to
respond to heavy loads once the number of VMs increases. The KVM hypervisor also
enables clustering for thousands of nodes, laying the foundations for cloud infrastructure
implementation.
 Security – Since KVM is part of the Linux kernel source code, it benefits from the
world’s biggest open source community collaboration, rigorous development and testing
process as well as continuous security patching.
 Maturity – KVM was first created in 2006 and has continued to be actively developed
since then. It is a 15-year old project, presenting a high level of maturity. More than
1,000 developers around the world have contributed to KVM code.
 Cost-efficiency –The cost is a driving factor for many organisations. Since KVM is open
source and available as a Linux kernel module, it comes at zero cost out of the box.
Businesses can optionally subscribe to various commercial programmes, such as UA-I
(Ubuntu Advantage for Infrastructure) to receive enterprise support for their KVM-
based virtualisation or cloud infrastructure.
LAB 1 : Creating and running virtual machines on Hosted Hypervisor like Virtual Box and KVM
1) Hosted Virtualization on Oracle Virtual Box Hypervisor

Step 1: Download Oracle Virtual box from https://www.virtualbox.org/wiki/Downloads

Step 2: Install it in Windows, Once the installation has done open it.

Step 3:-:Create Virtual Machine by clicking on NewLOD COMPUTING LAB MANUAL


COMPILED BY PROF. BHUSHAN JADHAV CONTACT -:9702868662
Step 4-: Specify RAM Size, HDD Size, and Network Configuration and Finish the wizard

Step 5-: To Select the media for installation Click on start and browse for iso file
CLOUD COMPUTING LAB MANUAL COMPILED BY PROF. BHUSHAN JADHAV CONTACT -:9702868662

Step 6:Complete the Installation and use it.

Step 7: To Connect OS to the network change network Mode to Bridge Adaptor


CLOUD COMPUTING LAB MANUAL COMPILED BY PROF. BHUSHAN JADHAV CONTACT -:9702868662
2) Hosted Virtualization on KVM Hypervisor
The Steps to Create and run Virtual machines in KVM are as follows

1) Check whether CPU has hardware virtualization support.

KVM only works if your CPU has hardware virtualization support – either Intel VT-x or AMD
V. To determine whether your CPU includes these features, run the following command:

#sudo grep -c "svm\|vmx" /proc/cpuinfo

A 0 indicates that your CPU doesn’t support hardware virtualization, while a 1 or more indicates
that it does.

2) Install KVM and supporting packages.


Virt-Manager is a graphical application for managing your virtual machines.you can use the kvm
command directly, but libvirt and Virt-Manager simplify the process.

#sudo apt-get install qemu-kvm libvirt-bin bridge-utils virt-manager

CLOUD COMPUTING LAB MANUAL COMPILED BY PROF. BHUSHAN JADHAV CONTACT -:9702868662

3) Create User.

Only the root user and users in the libvirtd group have permission to use KVM virtual machines.
Run the following command to add your user account to the libvirtd group:

#sudo adduser tsec


#sudo adduser tsec libvirtd

After running this command, log out and log back in as tsec

4) Check whether everything is working correctly.

Run following command after logging back in as tsec and you should see an empty list of virtual
machines.
This indicates that everything is working correctly.
#virsh -c qemu:///system list

5)Open Virtual Machine Manager application and Create Virtual Machine


#virt-manager

6) Create and run Virtual MachinesCLOUD COMPUTING LAB MANUAL CO

PILED BY PROF. BHUSHAN JADHAV CONTACT -:9702868662

COMPUTING LAB MANUAL COMPILED BY PROF. BHUSHAN JADHAV CONTACT -:9702868662


CLOUD COMPUTING
LAB MANUAL COMPILED BY PROF. BHUSHAN JADHAV CONTACT -:9702868662

You might also like