Check Installing CentOS 6.2 on VMware post.
Adding Hostname to Linux server
vi /etc/hosts
# add
127.0.0.1 localhost.localdomain localhost
192.168.126.128 centos6.vmware.local
vi /etc/sysconfig/network
#change
HOSTNAME=centos6.vmware.local
hostname centos6.vmware.local