
vcmcommand --vcmurl //${LOGIN}:${VCM_PW}@${VCM_IP} show server | grep ${pname} > /dev/null
2>/dev/null
if [[ $? -ne 0 ]]
then
echo "HP Virtual Connect profile $pname not found!"
exit -2
fi
nblade=`vcmcommand --vcmurl //${LOGIN}:${VCM_PW}@${VCM_IP} show server | grep ${pname} | awk
'{print $3}'`
iloIP=`oacommand --oaurl //${LOGIN}:${OA_PW}@${OA_IP} show server info ${nblade} | grep "IP
Address" | awk '{print $3}'`
rawMAC=`vcmcommand --vcmurl //${LOGIN}:${VCM_PW}@${VCM_IP} show profile ${pname} | grep
public | awk '{print $5}'`
#implement a semaphore to verify name and IP are unique
while [[ -e /tmp/AvailNameIP ]] ; do sleep 1; done
touch /tmp/AvailNameIP
IPname=`/root/resources/GetAvailRhelh.sh | awk '{print $1}'`
IPnum=`/root/resources/GetAvailRhelh.sh | awk '{print $2}'`
# Create cobbler system entry
echo -e "\nCreating cobbler system entry ...\n"
cobbler system add --name=${IPname} --profile=${RHELH_PROFILE} --mac=${rawMAC//-/:} --ip=$
{IPnum} --hostname=${IPname} --dns-name=${IPname} --kopts="console=ttyS0,115200 nostorage"
cobbler sync
#Remove semaphore
/bin/rm /tmp/AvailNameIP
# Present storage to hosts
echo -e "\nPresenting storage to host ${pname} ...\n"
/root/resources/prep_stor_host.sh ${pname}
# Update cluster configuration for NFS presentation
# create a semaphore for unique client names
while [[ -e /tmp/UpdateNFSClient ]] ; do sleep 1; done
touch /tmp/UpdateNFSClient
#Get next available client name
nfsClient=`/root/resources/GetAvailNFSClient.sh`
# add the export to the cluster configuration
addnfsexport -v -H ${MGMT1_IP} rhev-nfs-fs ${nfsClient} ${IPname} rw 1
127 www.redhat.com
Komentarze do niniejszej Instrukcji