How to Add KVM Guest on Redhat Cluster as a Service?

Answer

Redhat Cluster Node names : uagl1h, uagl2h (OS: Redhat Linux 6.3)
KVM virtual Machine Name: VMG (OS: Redhat Linux 6.3)
Cluster Name: hacl1
Service Name:VMG1. Login to luci console and navigate to cluster.

 

1-Make sure you have configured the failover domain with two cluster nodes.
It just simple that by clicking the add button.Here the failover the domain name is “HAVM”.

 

2-From the services tab,click “+” to add the new service.Enter the service name as “VMG” and click the failover domain as “HAVM”. You can also select the recovery ploicy as you desired. Its up to you to provide the details about Maximum number of restart and length of time in seconds.Once its done, then click on “Add a resource” tab.

3-Click on the “Global resources” drop down list and select “Virtual Machine” from that list.

4-Enter the shared volume name in “Path to XML file use  to create VM”.

5-Click on submit to complete the KVM guest addition in to redhat cluster.

6-By default , the service(VMG) will be in disabled state.The above image was taken after enabling the service from redhat cluster.

7-Let us see the status from the command line.

 

 

[root@uagl1 ~]# clustat 
Cluster Status for uacl1 @ Thu Oct 24 19:36:44 2013
Member Status: Quorate
Member Name ID Status
------ ---- ---- ------
uagl1h 1 Online, Local, rgmanager
uagl2h 2 Online, rgmanager

Service Name Owner (Last) State
------- ---- ----- ------ -----
vm:VMG (uagl1h) disabled

 


8-Start the “VMG” service on uagl1h node .

 

# clusvcadm -e vm:VMG -m uagl1

Member uagl1h trying to enable vm:VMG...Success

vm:VMG is now running on uagl1h

[root@uagl1 ~]#

 


9-Check the cluster status again from using clustat command.

 

[root@uagl1 ~]# clustat 
Cluster Status for uacl1 @ Thu Oct 24 19:39:46 2013
Member Status: Quorate
Member Name ID Status
------ ---- ---- ------
uagl1h 1 Online, Local, rgmanager
uagl2h 2 Online, rgmanager

Service Name Owner (Last) State
------- ---- ----- ------ -----
vm:VMG uagl1h started

 


10-Verify the cluster machine status using KVM commands.

 

[root@uagl1 New Volume]# virsh list 
Id Name State
----------------------------------------------------
26 VMG running
[root@uagl1 New Volume]# ssh uagl2h virsh list
Id Name State
----------------------------------------------------
[root@uagl1 New Volume]#


We have successfully added the KVM guest in to redhat cluster and started the virtual machine via redhat cluster.

All RED HAT Questions

Ask your interview questions on red-hat

Write Your comment or Questions if you want the answers on red-hat from red-hat Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---