Experiment No 2 Aim: To Study Virtualization and Install KVM. Virtualization

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 12

Experiment No 2

Aim : To Study Virtualization and install KVM.

Virtualization :
Virtualization means to create a virtual version of advice or resource, such as a server, storage device,
network or even an operating system where the framework divides the resource into one or more
execution environments. Even something as simple as partitioning a hard drive is considered
virtualization because one drive is taken and partition it to create two separate hard drives. Devices,
applications and human users are able to interact with the virtual resource as if it were a real single logical
resource.

Types of Virtualization in Cloud Computing

Network Virtualization
Network virtualization in cloud computing is a method of combining the available resources in a network
by splitting up the available bandwidth into different channels, each being separate and distinguished.
They can be either assigned to a particular server or device or stay unassigned completely — all in real
time. The idea is that the technology disguises the true complexity of the network by separating it into
parts that are easy to manage, much like your segmented hard drive makes it easier for you to manage
files.

Storage Virtualization
Using this technique gives the user an ability to pool the hardware storage space from several
interconnected storage devices into a simulated single storage device that is managed from one single
command console. This storage technique is often used in storage area networks. Storage manipulation in
the cloud is mostly used for backup, archiving, and recovering of data by hiding the real and physical
complex storage architecture. Administrators can implement it with software applications or by
employing hardware and software hybrid appliances.

Server Virtualization
This technique is the masking of server resources. It simulates physical servers by changing their identity,
numbers, processors and operating systems. This spares the user from continuously managing complex
server resources. It also makes a lot of resources available for sharing and utilizing, while maintaining the
capacity to expand them when needed.

Data Virtualization
This kind of cloud computing virtualization technique is abstracting the technical details usually used in
data management, such as location, performance or format, in favor of broader access and more resiliency
that are directly related to business needs.

Desktop Virtualization
As compared to other types of virtualization in cloud computing, this model enables you to emulate a
workstation load, rather than a server. This allows the user to access the desktop remotely. Since the
workstation is essentially running in a data center server, access to it can be both more secure and
portable.

Application Virtualization
Software virtualization in cloud computing abstracts the application layer, separating it from the operating
system. This way the application can run in an encapsulated form without being dependent upon the
operating system underneath. In addition to providing a level of isolation, an application created for one
OS can run on a completely different operating system.

BENEFITS OF VIRTUALIZATION
1.More flexible and efficient allocation of resources.
2.Enhance development productivity.
3.It lowers the cost of IT infrastructure.
4.Remote access and rapid scalability.
5.High availability and disaster recovery.
6.Pay per use of the IT infrastructure on demand.
7.Enables running multiple operating system.
Hypervisor -
Hypervisor is a form of virtualization software used in Cloud hosting to divide and allocate the resources
on various pieces of hardware. The program which provide partitioning, isolation or abstraction is called
virtualization hypervisor. Hypervisor is a hardware virtualization technique that allows multiple guest
operating systems (OS) to run on a single host system at the same time. A hypervisor is sometimes also
called a virtual machine manager(VMM).

Types of Hypervisor –

TYPE-1 Hypervisor:
Hypervisor runs directly on underlying host system. It is also known as “Native Hypervisor” or “Bare
metal hypervisor". It does not require any base server operating system. It has direct access to hardware
resources. Examples of Type 1 hypervisors include VMware ESXi, Citrix XenServer and Microsoft
Hyper-V hypervisor.
TYPE-2 Hypervisor:
A Host operating system runs on underlying host system. It is also known as ‘Hosted Hypervisor".
Basically a software installed on an operating system. Hypervisor asks operating system to make
hardware calls. Example of Type 2 hypervisor include VMware Player or Parallels Desktop. Hosted
hypervisors are often found on endpoints like PCs.
Difference Between Type-1 and Type-2
KVM -
KVM (Kernel-based Virtual Machine) is a virtualization infrastructure for the Linux kernel that turns it into a hypervisor. A
wide variety of guest operating systems work with KVM, including many flavors and versions of Linux, BSD, Solaris,
Windows, Haiku, ReactOS, Plan 9, AROS Research Operating System and OS X.In addition, Android 2.2, GNU/Hurd
(Debian K16), Minix 3.1.2a, Solaris 10 U3 and Darwin 8.0.1, together with other operating systems and some newer versions
of these listed, are known to work with certain limitations. Because it is virtualization software, it is very important to check
below given requirement before.

Installing the KVM on system.

Before you proceed with the installation you must confirm that your system supports KVM. As mentioned earlier, it requires
hardware virtualization support in the CPU. Type in the following command to check the compatibility:

“egrep -c '(vmx|svm)' /proc/cpuinfo”


If the output is 0, then KVM won't work as the system does not support VMX nor SVM hardware
virtualization.

If the output is 1 or greater than 1 it means your system is all set and ready to go for KVM installation.

Run the following commands to install KVM:

“sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder


bridge-utils”
The above command includes installation of 4 packages kvm, libvirt-bin, ubuntu-vm-builder and bridge-
utils. You are done with the installation for now. Just make sure your Ubuntu username is added to the
group libvirtd by typing:

“sudo adduser `id -un` libvirtd”


In the next step, I will install a GUI tool for ubuntu which makes the process of setting up a VM easier.
Installing a graphical user interface for KVM -
Install the virt-manager application with apt..

“sudo apt-get install virt-manager”


Creating a KVM guest machine
From here on, we will be using the GUI to work with as the setup of a VM with the terminal is quite
difficult and takes too long for the setup.

After you have installed virt-manager just go ahead and start it by typing:

“virt-manager”
Setup Windows and Ubuntu with the help of their ios files.

Host IP – 172.17.42.1
Guest (Ubuntu) IP - 192.168.122.182

Guest (Windows) IP – 192.168.122.191

Guest(Ubuntu) to Host Pinging -

Guest (Windows) to Host Pinging -


Host to Guest(Ubuntu) Pinging -

Host to Guest(Windows) Pinging -

ag31@ag31-OptiPlex-3020:~/Downloads$ ping 192.168.122.191


PING 192.168.122.191 (192.168.122.191) 56(84) bytes of data.
64 bytes from 192.168.122.191: icmp_seq=1 ttl=64 time=0.127 ms
64 bytes from 192.168.122.191: icmp_seq=2 ttl=64 time=0.177 ms
64 bytes from 192.168.122.191: icmp_seq=3 ttl=64 time=0.190 ms
64 bytes from 192.168.122.191: icmp_seq=4 ttl=64 time=0.211 ms
^C
--- 192.168.122.191 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2999ms
rtt min/avg/max/mdev = 0.127/0.176/0.211/0.032 ms

Host (Windows) to Host(Ubuntu) Pinging-

Host(Ubuntu) to
Host(Windows)
Pinging -
shubham@shubham-standard-PC-i440FX-PIIX-1996:~$ ping 192.168.122.191
PING 192.168.122.191 (192.168.122.191) 56(84) bytes of data.
64 bytes from 192.168.122.191: icmp_seq=1 ttl=64 time=0.127 ms
64 bytes from 192.168.122.191: icmp_seq=2 ttl=64 time=0.177 ms
64 bytes from 192.168.122.191: icmp_seq=3 ttl=64 time=0.190 ms
64 bytes from 192.168.122.191: icmp_seq=4 ttl=64 time=0.211 ms
^C
--- 192.168.122.191 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2999ms
rtt min/avg/max/mdev = 0.127/0.176/0.211/0.032 ms

Perform Virtualizaion -

Running an application on VMWare -

Step 1 : Install Xampp

Step 2 : Create file and run Xampp Server

Step 3 : Use IP address and ping the host system

Step 4 : Run the application on the guest system


Conclusion -
Thus we studied concept of Virtualization and installation of KVM and setting up the operating systems
using KVM and performed Virtualization.

You might also like