Monday 8 August 2016

How to install VMware tools on linux based vm


vSphere needs VMware tools to detect the IP of the vm. Following are the steps to install the VMware tools:

# To see the installed version 

vmware-toolbox-cmd -v
                             

# To see the currently installed packages

sudo apt --installed list | grep tools



# Steps to remove open-vm-tools

sudo apt-get remove --purge open-vm-tools
sudo apt-get -f install
sudo apt-get autoremove



# Steps to add vmware vm-tools 

sudo add-apt-repository "deb http://packages.vmware.com/tools/esx/6.0u1/ubuntu precise main"
sudo apt-get update
sudo apt-get install vmware-tools-core
sudo apt-get install vmware-tools-services
sudo apt-get install vmware-tools-esx-nox



# See the latest installed packages  

sudo apt --installed list | grep tools

           

# Verify latest version is installed

vmware-toolbox-cmd -v


Bash script to monitor uptime, cpu, memory, swap memory, load average of linux system

#!/bin/bash

# Print system resources
echo "HOSTNAME: "`hostname`
echo "SYSTEM: "`uname -a`
echo "IP ADDRESS: "; ifconfig eth0
echo "ROUTE TABLE:"; route -n
echo ""


# Start monitoring the system resources
while true
do
    echo ------ `date` ------
    top -b n1 | head -n 6
    sleep 60
done