Thursday, April 25, 2013

Resizing (Shrinking) Guest Hard Drive Sizes With VMware Standalone Converter (vSphere 5) ESXi Server 5.1



If you want to shrink your guest hard drive size then you can use VMware Converter standalone converter

1. Installing VMware converter is pretty straightforward, run the install file and accept all the defaults. Install the converter on same machine (Virtual) that you want to resize.



2. Run the application


3. Choose Open> convert machine> choose this local machine


4. Choose the destination type (in this case choose VMware Infrastructure virtual machine) and enter the credentials for ESXi Server


5. Customize the size of disk, CPU, RAM what you want, (We are working on decreasing the size of disk)



6. Confirm the size and go for convert, it will take some time according to the machine size and configuration




7. Delete the source machine as you have now less disk size virtual machine on ESXi Server.

Friday, April 12, 2013

Configuring Network Time Protocol (NTP) on ESX/ESXi 4.1 and ESXi 5.0 hosts using the vSphere Client


To configure NTP on ESX/ESXi 4.1 and ESXi 5.0 hosts:

  1. Connect to the ESX/ESXi host using the vSphere Client.
  2. Select a host in the inventory.
  3. Click the Configuration tab.
  4. Click Time Configuration.
  5. Click Properties.
  6. Click Options.
  7. Click NTP Settings.
  8. Click Add.
  9. Enter the NTP Server name. For example, 0.pool.ntp.org and 1.pool.ntp.org.
  10. Click OK.
  11. Click the General tab.
  12. Click Start automatically under Startup Policy.
  13. Click Start and click OK.
  14. Click OK to exit.

Wednesday, April 10, 2013

Installation of VMware Tools in a Linux guest (CentOS 6.3)


To install VMware Tools in a Linux guest operating system using Compiler:
Ensure that your Linux virtual machine is powered on.
If you are running a GUI interface, open a command shell.

Note: Log in as a root user, or use the sudo command to complete each of these steps.

Click VM in the virtual machine menu, then click Guest > Install/Upgrade VMware Tools and click OK.
To create a mount point, run:

mkdir /mnt/cdrom

To mount the CDROM, run:

mount /dev/cdrom /mnt/cdrom

To copy the Compiler gzip tar file to a temporary local directory, run:

cp /mnt/cdrom/VMwareTools-<version>.tar.gz /tmp/

Where <version> is the VMware Tools package version.

To determine the version of VMware tools, run:

ls /mnt/cdrom

You see an output similar to:

# VMwareTools-5.0.0-12124.tar.gz

To change to the tmp directory and extract the contents of the tar file into a new directory called vmware-tools-distrib, run:
cd /tmp
tar -zxvf VMwareTools-<version>.tar.gz

To change directory to vmware-tools-distrib and run the vmware-install.pl PERL script to install VMware Tools, run:
cd vmware-tools-distrib
./vmware-install.pl

Notes:
Follow the screen prompts to install the VMware Tools. Options in square brackets are default choices and can be selected by pressing Enter.
To compile VMware Tools successfully, you need gcc Compiler and Linux Kernel sources provided by your Linux distribution. Consult your Linux distribution documentation for details on how to install these packages.
It is normal for the console screen to go blank for a short time during the installation when the display size changes.
Some warnings or errors are normal, like when a files does not exist.
Depending on the Linux distribution, your network service might restart after installation. VMware recommends that you invoke this command from the console and not remotely.

If you are running a GUI interface, restart your X Window session for any mouse or graphics changes to take effect.
To start VMware Tools running in the background during an X Window session, run:

/usr/bin/vmware-toolbox &

Depending on your environment you may need to unmount the CDROM. To unmount the CDROM, run:

umount /mnt/cdrom

Depending on your environment, you may need to manually end the VMware Tools installation. To end the VMware Tools install, click VM in the virtual machine menu, then click Guest > End VMware Tools Install.
To remove VMware Tools installation packages, run:
cd
rm /tmp/VMwareTools-<version>.tar.gz
rm -rf /tmp/vmware-tools-distrib

Thursday, April 4, 2013

Installing tomcat7 on CentOS 6.3


Java should be installed before installing tomcat, please read my previous blog to install java
Download apache tomcat from here
#wget http://apache.techartifact.com/mirror/tomcat/tomcat-7/v7.0.39/bin/apache-tomcat-#7.0.39.tar.gz
#tar -xvf apache-tomcat-7.0.39.tar.gz
#mv apache-tomcat-7.0.39 tomcat-7.0.39
#mv tomcat-7.0.39/ /usr/share/
cd /usr/share/tomcat-7.0.39/
Now create tomcat service and set it to start on boot
#vim /etc/init.d/tomcat and paste the below on to that
#!/bin/bash
# description: Tomcat Start Stop Restart
# processname: tomcat
# chkconfig: 234 20 80
export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH
export PATH
CATALINA_HOME=/usr/share/tomcat7
case $1 in
start)
sh $CATALINA_HOME/bin/startup.sh
;;
stop)
sh $CATALINA_HOME/bin/shutdown.sh
;;
restart)
sh $CATALINA_HOME/bin/shutdown.sh
sh $CATALINA_HOME/bin/startup.sh
;;
esac
exit 0 
#chkconfig --add tomcat
#chkconfig --level 234 tomcat on
#chkconfig --list tomcat
Now you can start stop tomcat by executing the below command
#service tomcat stop
#service tomcat start
This should work fine now.

Installing Redis on Linux (CentOS 6.3)


Download redis from redis.io
#wget https://redis.googlecode.com/files/redis-2.4.17.tar.gz
#tar -xvf redis-2.4.17.tar.gz
#cd /opt/redis-2.4.17/src
#make install
now this copy redis-server, redis-cli and conf file to /usr/local/bin
open the port in firewall for redis
now make this service run on start up add the below line in rc.local
#vim /etc/rc.local
nohup /usr/local/bin/redis-server &
Close the editor and now the server will start at boot, check by redis-cli
#cd /usr/local/bin
#./redis-cli
redis 127.0.0.1:6379>
It is installed and working now.