Self Study

Published on June 2016 | Categories: Documents | Downloads: 30 | Comments: 0 | Views: 494
of x
Download PDF   Embed   Report

Comments

Content

STUDY OF VIRTUALISATION AND KERNAL BASED VIRTUAL MACHINES

MADE BY: SHWETA SINGH IT/2K10/063

I would like to express my special thanks of gratitude to my respected teacher Mrs. Ritu Aggarwal as well as our honorable HOD Mr.O.P.Verma who gave me the golden opportunity to do this wonderful project on the topic

“STUDY OF VIRTUALISATION AND KERNAL BASED VIRTUAL MACHINES

”, which also helped me in doing a lot of Research and i came to know about so many new things I am really thankful to them. I am making this project not only for marks but to also increase my knowledge.

ACKNOWLEDGEMENT

KNOWING THE CONCEPT OF

VIRTUALISATION



The common theme of all virtualization technologies is the hiding of technical detail, through encapsulation.
Virtualization creates an external interface that hides an underlying implementation, e.g. by multiplexing access, by combining resources at different physical locations, or by simplifying a control system.



VIRTUALIZATION



Virtualization: Running several OS environments on a single physical system.
Host: The system hosting one or more virtual machines. Host OS: The operating system running on the Host. Guest: A virtual machine environment.



 




Guest OS: The OS running on a particular guest.
Hypervisor: A virtual machine monitor that runs in a layer between the virtual machine(s) and the underlying hardware.

TERMINOLOGY

Single OS Image –Virtuozo™, Vservers, OpenVZ, Zones.  Hard to establish protection zones  Networking sometimes confuses administrators Full Virtualization –Vmware™, VirtualPC™, Virtualbox™, QEMU  Run multiple unmodified guest OSes  Hard to VirtualizeX86 efficiently Para-virtualization –Xen  Run multiple guest Oses ported to a special architecture (Xen/X86)

VIRTUALIZATION TECHNIQUES

Operating system-level virtualization isolates servers

Paravirtualization shares the process with the guest operating system

Full virtualization uses a hypervisor to share the underlying hardware

KERNEL BASED VIRTUAL MACHINES

*Part of Linux Kernel since 2.6.20
*Requires CPUs that include virtualization support.  ◦Must be enabled in your BIOS  ◦vmx(Intel) or svm(AMD) in /proc/sys/cpuinfo„flags‟ *Kernel Modules  ◦One generic (kvm)  ◦One vendor-specific (kvm-inteland kvm-amd) *Allows the Linux Kernel to act as a type 1 hypervisor for guests. *Doesn‟t do emulation itself  Emulation provided by a modified version of QEMU

KVM

HOW TO CREATE
A KERNEL BASED VIRTUAL MACHINE(KVM)

qemu-imgcreate -f qcowfileSize  qcow(copy-on-write) –The most flexible disk image format supported by QEMU  file –Name of the disk image file  size –Size of the disk
 

Example: qemu-imgcreate –f qcowkvm/Fedora.img 10G

CREATING A VIRTUAL DISK

Install your distributions KVM package(s). Create a kvmgroup, if your distribution doesn‟t do that for you when you install the KVM package. Add yourself to the kvmgroup. In /etc/udev/rules.d, add an entry for KVM if it doesn‟t already exist:  ◦KERNEL=="kvm", MODE="0660", GROUP="kvm“ Load the KVM Modules  ◦modprobekvm  ◦modprobekvm-intelormodprobekvm-amd

PREAPARING SYSTEM AS ROOT

sudoqemu-kvmdisk\ –net nic,model=rtl8139\#Emulated NIC -net user #Use simple networking model -soundhwes1370\#Emulated Sound Card -m memory\#VM RAM -cdrominstall-image\#Installation Image -no-reboot\#Re-boot is broken on my system -boot d\#boot from CDROM -daemonize#fork to background disk -Image file created using qemu-img memory -Amount of ram in MB install-image-installation DVD/CD or .isofile
        

INSTALLING AN OS ON VIRTUAL DISK

sudoqemu-kvmdisk\  –net nic,model=rtl8139\#Emulated NIC  -net user #Use simple networking model  -soundhwes1370\#Emulated Sound Card  -m memory\#VM RAM  -no-reboot\#Re-boot is broken on my system  -daemonize#fork to background disk -Image file created using qemu-img memory -Amount of ram in MB


RUNNING A VIRTUAL MACHINE

If you run a distribution like Fedora 8 that has a virtual-manager that supports QEMU and QEMU-kvm,you can do all of this as shown below…











The most recent news out of Linux is the incorporation of the KVM into the Linux kernel (2.6.20). KVM is a full virtualization solution that is unique in that it turns a Linux kernel into a hypervisor using a kernel module. This module allows other guest operating systems to then run in user-space of the host Linux kernel.(as shown next) The KVM module in the kernel exposes the virtualized hardware through the /dev/kvm character device. The guest operating system interfaces to the KVM module using a modified QEMU process for PC hardware emulation.

Linux KVM (Kernel Virtual Machine)

Linux KVM (Kernel Virtual Machine)



The KVM module introduces a new execution mode into the kernel. Where vanilla kernels support kernel mode and user mode, the KVM introduces a guest mode. The guest mode is used to execute all non-I/O guest code, where normal user mode supports I/O for guests.



The introduction of the KVM is an interesting evolution of Linux, as it represents the first virtualization technology that is part of the mainline Linux kernel . When run on hardware that supports virtualization, Linux (32-and 64-bit) and Windows (32-bit) guests are supported.



All data center resources can be virtualized to create a Virtual Infrastructure.
The components described in the chart below provide the foundation to create virtual servers. A virtual server consists of 32 or 64-bit CPUs, memory, disks, network adapters, fibre channel adapters, keyboard, video, and mouse. A virtual server can run standard Linux and Windows operating systems and applications.





Virtual Infrastructure

Physical Resource Industry standard Intel and AMD servers upon which the virtualization layer is automatically deployed
Each server can have multiple gigabit Ethernet cards (NICs) to provide required throughput and availability iSCSI, SAN and NAS storage technologies are used for reliable persistent storage

Virtual Infrastructure A Virtualized Node consists of a collection of CPUs and RAM that can be allocated to a virtual server
Virtual servers connect through virtual NICs to physical or virtual networks

A collection of storage resources can be partitioned and allocated to virtual servers using raw mappings or virtual hard disks

COMPONENTS TO CREATE VIRTUAL INFRASTRUCTURES

VIRTUALISATION PRODUCTS AND THEIR PROS AND CONS

Product

Requires special host kernel
Yes

Supports unmodified Guests

Pros

Cons

SingleOS Products

No

Minimal Cost per additional VM Slick tools for managing Guests Broad emulation Good Performance. Supported by your distribution

Guests must run the same OS as the Host. Guest OS crash kills Host and all Guests. Restrictive License. Narrow host OS support Poor Performance (even with kqemu) A little flakey yet. Requires more memory per VM than Xen.

VMware No ™ Server QEMU No

Yes

Yes

KVM

No

Yes(requires Pacifica or Vanderpool)

WHERE DOES “KVM” FITS…

Product Single-OS Products

Best Fit You want the minimum cost per VM

VMware Server

You are willing to run an OS that is supported by VMware and/or you use VMware commercial products.
You want flexibility in your host OS and host graphics hardware ; performance is not so important and/or your CPU doesn’t have virtualization support (kqemu can help performance) You want flexibility in your host OS and host graphics hardware ; you want good performance and your CPU has virtualization support

QEMU

KVM



In the VMware space, Virtual Center is the management tool of choice for ESX Server.
Other products, like Hewlett-Packard's Virtual Machine Management or IBM's Director modules, are adding functionality to deal with virtual machine [VM] environments. The problem is that most of these tools that are snap-ins lack much of the simple functionality you get in Virtual Center. Most companies will end up buying both Virtual Center and the vendor's tool and use both depending on what they are doing.







THINGS TO KNOW

THESE RESOURCES HAVE BEEN USED IN SUCCESSFUL MAKING OF THIS PROJECT
http://www.qumranet.com/art_images/files/8/KVM_Wh itepaper.pdf http://kvm.qumranet.com/kvmwiki/Guest_Support_Sta tus http://www.shorewall.net/pub/shorewall/contrib/kvm/k vm http://www.shorewall.net/pub/shorewall/contrib/VM

BIBILOGRAPHY

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close