VMware

From OzmoWiki

I use Tru's VMware Repository of CentOS images for two reasons. Primarily, the VMs are created by the people who compiled CentOS, so I trust them. Secondly, you have the option of a completely minimal install for max use of your resources.

Navigate to the most recent build date of images in Tru's VMware Repository and you'll find has 3 different versions of pre-built VMs (3 for x86, 3 for x64):

  • Minimal Install - Text-only installation with minimal optional packages.
  • LAMP Install - Text-only installation with apache, mysql, and php pre-installed for web development.
  • Desktop Install - Gnome desktop with graphical startup.

My hosts are using the minimal install (CentOS-5.i386.zip under the most recent build date) for the smallest possible image on my VMware Server.

I have a number of custom projects which I have created from the minimal install:

Post Installation Configuration

[root@vm ~]# yum -y update
  • Allow root to login via SSH
[root@vm ~]# vi /etc/ssh/sshd_config
PermitRootLogin yes
[root@vm ~]# service sshd restart
  • Turn SELinux off (not recommended, but easier)
[root@vm ~]# vi /etc/selinux/config
Set SELINUX=disabled
[root@vm ~]# setenforce 0

Disable Unnecessary Services

Most of these services are unneeded in a virtual environment.

for svc in acpid apmd auditd bluetooth conman cpuspeed dhcdbd dund firstboot gpm haldaemon hidd ibmasm irda irqbalance kudzu mcstrans mdmonitor mdmpd multipathd netconsole netplugd nscd oddjobd pand pcscd psacct rdisk rpcgssd rpcsvcgssd smartd; do /sbin/chkconfig $svc off; /etc/init.d/$svc stop; done

If you are protected by an additional firewall and trust your network:

for svc in ip6tables iptables; do /sbin/chkconfig $svc off; /etc/init.d/$svc stop; done

Additional services which do not need to be installed on each VM:

for svc in cups ntpd saslauthd snmptrapd ypbind; do /sbin/chkconfig $svc off; /etc/init.d/$svc stop; done

If you have no need for NFS shares or automounting, you can disable the related services:

for svc in autofs netfs nfs nfslock portmap; do /sbin/chkconfig $svc off; /etc/init.d/$svc stop; done

Install VMware Tools

NOTE: This was true for older versions of VMware Tools and ESXi v3.5. Updates to both VMware Tools and ESXi may have made this section obsolete by actually installing correctly. Your mileage may vary as the minimal install does not have gcc.

From the VMware Infrastructure Client:

  1. Right-Click the Virtual Machine and select Edit Settings...
  2. Select Datastore ISO and click Browse...
  3. Browse to the ISO /vmimages/tools-isoimages/linux.iso

From inside the Virtual Machine:

[root@vm ~]# mkdir /mnt/cdrom
[root@vm ~]# mount /dev/cdrom /mnt/cdrom
[root@vm ~]# rpm -Uvh VMwareTools-3.5.0-64607.i386.rpm
[root@vm ~]# yum -y install gcc
[root@vm ~]# vmware-config-tools.pl

If you are required to build a new driver for your kernel, answer the questions appropriately. Finally, start vmware tools with the new drivers:

[root@vm ~]# service network stop
[root@vm ~]# rmmod pcnet32
[root@vm ~]# rmmod vmxnet
[root@vm ~]# depmod -a
[root@vm ~]# modprobe vmxnet
[root@vm ~]# service network start
[root@vm ~]# service vmware-tools start

11 Rating: 2.5/5 (8 votes cast)

Categories