Hello out there
Atm I'm working on a vMA specially for APC's PCNS.
So far everything works fine but if the vMA itself reboots I have to run a vifptarget -s manually, otherwise PCNS won't be able to shutdown the ESXi.
It would be really cool if I could put this in a script which runs automated on every boot.
So far I have read that vifptarget isn't designed to be used in a script, but it seems that there are some tricks to use it.
What I have done so far:
I created a script in /etc/init.d/
#! /bin/bash
#
# vifptarget
#
# chkconfig: 3456 20 80
# description: Adds ESXi host as target
source /opt/vmware/vma/bin/vifptarget -s <IP>
ln -s /etc/init.d/vifptarget /etc/rc5.d/vifptarget
chkconfig --add <script>
chkconfig <script> on
chkconfig --list
vifptarget 0:off 1:off 2:on 3:on 4:on 5:on 6:off
I'm not so familar with centos and chkconfig, so I'm not sure if it was right.
I found several threads about the vifptarget in a script but alway in combination to create switches or something like that for more than one host.
So maybe you can help me out.
Regards