免费注册 查看新帖 |

Chinaunix

广告
  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2625 | 回复: 0
打印 上一主题 下一主题

fence_vmware_ng for rhel5 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-12-11 10:32 |只看该作者 |倒序浏览
Operation example:
[root@mysql agent-itself]# fence_vmware_ng -o off -a 192.168.20.3 -l zhangquan -p vmware -n 'MySQL' -v
fence_vmware_ng_helper --server '192.168.20.3' --username 'zhangquan' --password 'vmware' --operation status --vmname 'MySQL'
MySQL:[sandisk-700GB-IX1000] MySQL/MySQL.vmx:poweredOn:connected
fence_vmware_ng_helper --server '192.168.20.3' --username 'zhangquan' --password 'vmware' --operation off --vmname 'MySQL'
#fence_vmware_ng -o reboot -a 192.168.20.3 -l zhangquan -p vmware -n 'MySQL' -v
ref:
http://sources.redhat.com/cluster/wiki/VMware_FencingConfig
Pre-req
VI Perl API or/and VIX API installed on every node in cluster. This is big difference against older agent, where you don't need install anything, but new agent has little less painful configuration (and many bonuses)
google search keyword: VI Perl API
download addr:
http://www.vmware.com/support/developer/viperltoolkit/
procedure:
1 install VMware-vSphere-SDK-for-Perl
[root@apache ~]# tar -xvf VMware-vSphere-SDK-for-Perl-4.0.0-161974.i386.tar.gz
[root@apache ~]# cd vmware-vsphere-cli-distrib/
[root@apache vmware-vsphere-cli-distrib]# ./vmware-install.pl
2 install fence_vmware_ng
[root@apache ~]# tar -xvf vmware-ng.tar.gz
[root@apache ~]# tree vmware-ng
vmware-ng
|-- agent-itself
|   |-- sbin
|   |   |-- fence_vmware_ng
|   |   `-- fence_vmware_ng_helper
|   `-- usr
|       `-- share
|           `-- man
|               `-- man8
|                   `-- fence_vmware_ng.8
`-- library-forRHEL52
    `-- usr
        `-- lib
            `-- fence
                |-- fencing.py
                `-- telnet_ssl
10 directories, 5 files
[root@apache ~]# cp vmware-ng/agent-itself/sbin/ / -rv
`vmware-ng/agent-itself/sbin/fence_vmware_ng' -> `/sbin/fence_vmware_ng'
`vmware-ng/agent-itself/sbin/fence_vmware_ng_helper' -> `/sbin/fence_vmware_ng_helper'
[root@apache ~]# cp vmware-ng/agent-itself/usr/ / -rv
`vmware-ng/agent-itself/usr/share/man/man8/fence_vmware_ng.8' -> `/usr/share/man/man8/fence_vmware_ng.8'
test whether man for fence_vmware_ng.8 was installed
[root@apache ~]# man fence_vmware_ng
[root@apache ~]# cp vmware-ng/library-forRHEL52/usr/ / -rv
cp: overwrite `/usr/lib/fence/fencing.py'? y
`vmware-ng/library-forRHEL52/usr/lib/fence/fencing.py' -> `/usr/lib/fence/fencing.py'
cp: overwrite `/usr/lib/fence/telnet_ssl'? y
`vmware-ng/library-forRHEL52/usr/lib/fence/telnet_ssl' -> `/usr/lib/fence/telnet_ssl'
[root@apache ~]#
TEST procedure on host Apache:
[root@apache ~]# fence_vmware_ng -o reboot -a 192.168.20.3 -l zhangquan -p vmware -n 'MySQL' -v
fence_vmware_ng_helper --server '192.168.20.3' --username 'zhangquan' --password 'vmware' --operation status --vmname 'MySQL'
MySQL:[sandisk-700GB-IX1000] MySQL/MySQL.vmx:poweredOn:connected
fence_vmware_ng_helper --server '192.168.20.3' --username 'zhangquan' --password 'vmware' --operation off --vmname 'MySQL'
fence_vmware_ng_helper --server '192.168.20.3' --username 'zhangquan' --password 'vmware' --operation status --vmname 'MySQL'
MySQL:[sandisk-700GB-IX1000] MySQL/MySQL.vmx:poweredOff:connected
fence_vmware_ng_helper --server '192.168.20.3' --username 'zhangquan' --password 'vmware' --operation on --vmname 'MySQL'
fence_vmware_ng_helper --server '192.168.20.3' --username 'zhangquan' --password 'vmware' --operation status --vmname 'MySQL'
MySQL:[sandisk-700GB-IX1000] MySQL/MySQL.vmx:poweredOn:connected
Success: Rebooted
[root@apache ~]#



本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/106124/showart_2117295.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP