Hello Experts,
We ran in to a similar issue for our Avaya OVA deployments. What we figured out was that there is a race condition between VMware tools service and the Network service during boot up. The simple fix will be to have the VMware tools service start up ahead of the Network Service.
The following bash script goes about implementing this:
-----
VM_TOOLS_CONF=/etc/init/vmware-tools.conf
TOOL_LINK_ARRAY=(\
/etc/rc2.d/S03vmware-tools \
/etc/rc3.d/S03vmware-tools \
/etc/rc5.d/S03vmware-tools \
/etc/rc0.d/K99vmware-tools \
/etc/rc1.d/K99vmware-tools \
/etc/rc6.d/K99vmware-tools \
);
function printHelp() {
echo "Usage: bootSyncFix.sh -enable|-disable|-status"
echo
echo "-enable will enable a workaround for a known VMWare issue during bootup"
echo " where the bootup stalls on network startup and a message in the following"
echo " format is displayed in a loop:"
echo "vmsvc[1234]: [warning] [guestinfo] RecordRoutingInfo: Unable to collect IPv4 routing table."
echo
echo " This change will modify the VMWare tools service to start before"
echo " the network service."
echo "-disable will disable the above workaround and will revert the VMWare"
echo " tools service to the standard VMWare init startup."
echo "-status will display the status of the system (whether the boot sync"
echo " fix is enabled or disabled). This mode will not modify the system."
exit 1
}
# Implement/enable boot sync fix
function enable() {
echo "Enabling boot sync fix..."
# Try to move file so long as it hasn't already been moved
if [ -f /etc/vmware-tools/vmware-tools.conf -a ! -f /etc/init/vmware-tools.conf ]; then
echo "vmware-tools.conf already relocated"
else
# If destination already exists; backup file before overwriting
if [ -f /etc/vmware-tools/vmware-tools.conf ]; then
mv -f /etc/vmware-tools/vmware-tools.conf /etc/vmware-tools/vmware-tools.conf.bak
fi
mv -f /etc/init/vmware-tools.conf /etc/vmware-tools/
fi
for LINK in "${TOOL_LINK_ARRAY[@]}"; do
ln -s /etc/vmware-tools/services.sh $LINK 2>&1 | grep -v "File exists"
done
echo "...done. Any configuration changes will take place on the next bootup"
}
# Revert back to original standard configuration
function disable() {
echo "Disabling boot sync fix..."
# Try to move file so long as it hasn't already been moved
if [ -f /etc/init/vmware-tools.conf -a ! -f /etc/vmware-tools/vmware-tools.conf ]; then
echo "vmware-tools.conf already relocated"
else
# If destination already exists; backup file before overwriting
if [ -f /etc/init/vmware-tools.conf ]; then
mv -f /etc/init/vmware-tools.conf /etc/init/vmware-tools.conf.bak
fi
mv -f /etc/vmware-tools/vmware-tools.conf /etc/init/
fi
for LINK in "${TOOL_LINK_ARRAY[@]}"; do
if [ -L $LINK ]; then
rm -f $LINK
elif [ -f $LINK ]; then
# If file exists and is not a symlink, then print warning but don't delete file
echo "Warning: Not deleting non-symlink $LINK"
fi
done
echo "...done. Any configuration changes will take place on the next bootup"
}
# Return code:
# 0 -- Enabled
# 1 -- Disabled
# 2 -- Partially enabled
function status() {
echo "Checking status of boot sync fix..."
# By default, assume we are partially disabled unless we detect otherwise
STATUS=2
if [ -f /etc/rc2.d/S03vmware-tools -a -f /etc/rc3.d/S03vmware-tools -a -f /etc/rc5.d/S03vmware-tools -a -f /etc/rc0.d/K99vmware-tools -a -f /etc/rc1.d/K99vmware-tools -a -f /etc/rc6.d/K99vmware-tools -a -f /etc/vmware-tools/vmware-tools.conf ]; then
# All files are there; fix is enabled
STATUS=0
elif [ ! -f /etc/rc2.d/S03vmware-tools -a ! -f /etc/rc3.d/S03vmware-tools -a ! -f /etc/rc5.d/S03vmware-tools -a ! -f /etc/rc0.d/K99vmware-tools -a ! -f /etc/rc1.d/K99vmware-tools -a ! -f /etc/rc6.d/K99vmware-tools -a ! -f /etc/vmware-tools/vmware-tools.conf ]; then
# Fix completely not implemented
STATUS=1
fi
case $STATUS in
0) echo "Boot sync fix is enabled";;
1) echo "Boot sync fix is NOT enabled";;
*) echo "Boot sync fix is partially enabled";;
esac
return $STATUS
}
### Script start ###
# Check the current user -- needs to be root level
USER_ID=`id -u`
if [ $USER_ID != "0" ] ; then
echo "This script must be run by a root-level superuser (UID 0)"
echo
exit 1
fi
ARG1=$(echo "$1" | tr A-Z a-z)
case $ARG1 in
-enable) enable;;
-disable) disable;;
-status) status;;
*) printHelp;;
esac