Popular Posts

Friday, 17 February 2012

KVM Configuration

KVM Installation and configuration
1. Install the RHEL FOR 64Bit.
2. Create the Yum Server For RHEL 64Bit.
3. Now check the virtualization flag
[root@vijay ~]# egrep '(vmx|svm)' --color=always /proc/cpuinfo
4. To install KVM and virtinst (a tool to create virtual machines), we run
[root@vijay ~]# yum install kvm* qemu* libvirt* python-virtinst*
5. Then start the libvirt daemon:
[root@vijay ~]# /etc/init.d/libvirtd start
6. To check if KVM has successfully been installed, run
[root@vijay ~]# virsh -c qemu:///system list
It should display something like this:
Id Name
State
----------------------------------
7. To do this, we install the package bridge-utils...
[root@vijay ~]# yum install bridge-utils*
8. I disable NetworkManager and enable "normal" networking. NetworkManager is good
for desktops where network connections can change (e.g. LAN vs. WLAN), but on a server
you usually don't change network connections:
[root@vijay ~]# /etc/init.d/NetworkManager stop
[root@vijay ~]# chkconfig NetworkManager off
[root@vijay ~]# /etc/init.d/network restart
9. To configure the bridge, create the file /etc/sysconfig/network-scripts/ifcfg-br0 (please
use the BOOTPROTO, DNS1 (plus any other DNS settings, if any), GATEWAY, IPADDR,
NETMASK and SEARCH values from the /etc/sysconfig/network-scripts/ifcfg-eth0 file):
[root@vijay ~]# vim /etc/sysconfig/network-scripts/ifcfg-br0
################################################################
DEVICE=br0
TYPE=Bridge
VIJAY SINGH
BOOTPROTO=static
GATEWAY=192.168.0.1
IPADDR=192.168.0.100
NETMASK=255.255.255.0
ONBOOT=yes
################################################################
10. Modify /etc/sysconfig/network-scripts/ifcfg-eth0 as follows (comment out
BOOTPROTO, DNS1 (and all other DNS servers, if any), GATEWAY, IPADDR,
NETMASK, and SEARCH and add BRIDGE=br0):
[root@vijay ~]# vim /etc/sysconfig/network-script/ifcfg-eth0
##############################################################
DEVICE=eth0
#BOOTPROTO=none
#DNS1=145.253.2.75
#GATEWAY=192.168.0.1
HWADDR=00:1e:90:f3:f0:02
#IPADDR=192.168.0.100
#NETMASK=255.255.255.0
ONBOOT=yes
TYPE=Ethernet
IPV6INIT=no
USERCTL=no
BRIDGE=br0
##############################################################
11. Then reboot the system:
[root@vijay ~]# init 6
12. Now install the “virt-manager”
[root@vijay ~]# yum install virt-manager*
13. Now run the following command to start virtual machine.
[root@vijay ~]# virt-manager
And Install Your KVM VIRTUAL MACHINE

No comments:

Post a Comment