Total Pageviews

Saturday, March 26, 2011

Adding RHEL Host in RHEV Manager

How to use RHEL Host as an Hypervisor in  RHEV 2.2?


You can use either RHEV-H or RHEL5 Update 4 and Later as an Hypervisor on your RHEV.  To add RHEL Host in a RHEV , Ensure that Red Hat Enterprise Linux 5.5 is correctly installed and configured on the physical host. if you are running RHEV 2.2 and you can use RHEL5.4 for RHEV 2.1. Refer to theRed Hat Enterprise Linux Installation Guide for more information.

Only the Base package group is required. All other packages can be removed or not selected.

Note: While doing an Fresh Host installation Do not select any Virtualization or KVM Package.

Ensure the host is correctly subscribed to the appropriate Red Hat Network channels.

Red Hat Enterprise Virt Management Agent (v.5 for x86_64)

RHEL Virtualization (v. 5 for 64-bit x86_64)

Once  the above channels are subscibed Log in to the Host and run the below command to verify it and you will get Similar output as like below on your host.


# yum repolist

Loaded plugins: rhnplugin, security
rhel-x86_64-rhev-mgmt-agent-5                                                             | 1.3 kB     00:00
rhel-x86_64-rhev-mgmt-agent-5/primary                                                     | 3.7 kB     00:00
rhel-x86_64-rhev-mgmt-agent-5                                                                              22/22
rhel-x86_64-server-vt-5                                                                   | 1.4 kB     00:00
rhel-x86_64-server-vt-5/primary                                                           | 105 kB     00:03
rhel-x86_64-server-vt-5                                                                                  386/386
repo id                            repo name                                                      status
rhel-x86_64-rhev-mgmt-agent-5      Red Hat Enterprise Virt Management Agent (v.5 for x86_64)      enabled:     22
rhel-x86_64-server-5               Red Hat Enterprise Linux (v. 5 for 64-bit x86_64)              enabled: 11,118
rhel-x86_64-server-vt-5            RHEL Virtualization (v. 5 for 64-bit x86_64)                   enabled:    386
repolist: 11,526



Install the below required packages

yum install bridge-utils fence-agents kvm-qemu-img

In case if there is any xen or libvirt packages , Remove the xen, kernel-xen and libvirt packages using below command.

 yum remove xen kernel-xen libvirt

Then edit the /etc/hosts file entry and add your rhev manager ip and hostname entry as relevant to your environment , so that RHEV Manager will  enable vdsm and other services to connect properly to the host while adding the Host to the RHEV Manager as well as Point your /etc/resolv.conf to the proper DNS entry, so that both forward and reverse look up works properly .

 Append /etc/hosts and add below entries

yourhostip          yourhostfqdn
yourrhevmanagerip   yourhevmanagerfqdn


Then we need to create a Network Bridge called "rhevm" as prerequest on the Host manaully . You can check my below blog  to see how to create a bridge interface on stand alone kvm hypervisor , replace bridge name with rhevm.

http://rcritical.blogspot.com/2010/12/setting-up-bridge-networking-on-kvm.html

Sample Configuration

# cat ifcfg-rhevm
DEVICE=rhevm
TYPE=Bridge
ONBOOT=yes
IPADDR=IP
NETMASK=255.255.255.0
GATEWAY=GATEWAYIP
DELAY=0
PEERNTP=yes
DNS1=yourprimarydns ip

# cat ifcfg-eth1
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
HWADDR=00:25:B3:AD:61:13
BRIDGE=rhevm


Once your bridge is up and running and the Host registered to the RHN or local youm repository , Now its is the time to add a Host from the RHEV Manager UI . Un like RHEV-H , RHEL Host won't comes up for approval , you need to manully add the host to the DC from the RHEV Manager UI.

 Log into RHEV Manager UI-->Host-->New, feed all the details and Click on Ok


 As like RHEV-H Registration , RHEVManager will Validate the RHEL Host as well  , You will See all the Logs on the Under the Events Tab .


And if in case failed with some error check the Events tab first  on RHEVM UI and then log in to the host from ssh and check   vds_installer.xxx.log , vds_bootstrap.xxx.log under /tmp/ for RHEL host and bootstrap logs under /var/log/vdsm-reg/ in case of RHEV-H.

If ever thing succeeds it will go for a reboot, after the reboot cycle  RHEL Host will Comes into Up state in the RHEV Manager UI. Now you can create a new virtual machine or Live Migrate the existing Virtual Machine from other Hypervisors in the same to cluster to his new Host.






Note: Add Host button is only to add RHEL as a HOST , not for RHEV-H


Reference Link: http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Virtualization_for_Servers/2.2/html/Administration_Guide/Administration_Guide-Create_Objects-Add_Server.html

No comments: