문서의 이전 판입니다!
RHCS 에서 사용할 수 있는 여러가지의 Resource 들이 있다.
보통은 luci 에서 확인이 가능하지만 luci 의 List 에도 나타나지 않는 Resource 들도 있다.
대표적인 Resource 가 vm 리소스 인데…
내용을 확인해 보면 xen, kvm 을 사용할 수 있지만
나는 kvm 에 대해서만 설명을 하도록 한다.
사용 방법 :
<vm migrate="pause" name="rhel57_mini" restart_expire_time="90" use_virsh="1" xmlfile="/etc/libvirt/qemu/rhel57_mini.xml" status_program="ping -c1 -w1 192.168.102.61"/>
<parameter name="migrate">
<longdesc lang="en">
Migration type (live or pause, default = live).
</longdesc>
<shortdesc lang="en">
Migration type (live or pause, default = live).
</shortdesc>
<content type="string" default="live"/>
</parameter>
<parameters>
<parameter name="name" primary="1">
<longdesc lang="en">
This is the name of the virtual machine.
</longdesc>
<shortdesc lang="en">
Name
</shortdesc>
<content type="string"/>
</parameter>
<parameter name="restart_expire_time" reconfig="1">
<longdesc lang="en">
Restart expiration time. A restart is forgotten
after this time. When combined with the max_restarts
option, this lets administrators specify a threshold
for when to fail over services. If max_restarts
is exceeded in this given expiration time, the service
is relocated instead of restarted again.
</longdesc>
<shortdesc lang="en">
Restart expiration time; amount of time before a restart
is forgotten.
</shortdesc>
<content type="string" default="0"/>
</parameter>
<parameter name="use_virsh">
<longdesc lang="en">
Force use of virsh instead of xm on Xen machines.
</longdesc>
<shortdesc lang="en">
If set to 1, vm.sh will use the virsh command to manage
virtual machines instead of xm. This is required when
using non-Xen virtual machines (e.g. qemu / KVM).
</shortdesc>
<content type="integer" default=""/>
</parameter>
<parameter name="xmlfile">
<longdesc lang="en">
Full path to libvirt XML file describing the domain.
</longdesc>
<shortdesc lang="en">
Full path to libvirt XML file describing the domain.
</shortdesc>
<content type="string"/>
</parameter>
<parameter name="status_program" reconfig="1">
<longdesc lang="en">
Ordinarily, only the presence/health of a virtual machine
is checked. If specified, the status_program value is
executed during a depth 10 check. The intent of this
program is to ascertain the status of critical services
within a virtual machine.
</longdesc>
<shortdesc lang="en">
Additional status check program
</shortdesc>
<content type="string" default=""/>
</parameter>
그 외 세부적인 파라미터를 알고 싶으면 RHCS 패키지 설치 후 File Name : /usr/share/cluster/vm.sh
파일을 참고 하기 바랍니다.
vm Resource 를 사용하게되면 기존 Script 형식의 Resource 와 마찮가지로
하나의 Process(vm) 이 죽게되면 다시 Start 를 시켜주지만 vm 내부에서 발생되는 문제에 대해서는
감지하기가 힘들다
이런경우 status_program 파라미터를 이용하여 ping 을 날린다거나 port 를 체크하여 vm 상태를 체크할 수 있다.