Monday, 8 February 2016

Setup a minimal CentOS installation on ESXI

After installation we should ensure that VMWare tools is installed - so after mouting the VMWare Tools iso from the bash prompt we should issue:
mkdir -p /mount/cdrom
mount -t auto /dev/cdrom /mount/cdrom
cd /mount/cdrom
cp VMwareTools-9* /tmp
cd /tmp
tar zxvf VMwareTools-9*
cd vmware-tools-distrib
./vmware-install.pl
Although I got a message complaining about perl..

Oh no... It looks like the CentOS 'minimal' does not include any perl interpreter!

Now we could simply install the package with yum - although I opted for the VNXNET3 NIC and hence the NIC will not function on the guest OS until VMware Tools is installed!

So we can either mount a full CentOS and update the yum sources and attempt to install the perl package OR we could simply be lazy and add an oldhat E1000 adapter - configure it and download the relevent perl packages via the internet using yum.

I opted for the latter option and once the NIC has been installed - we can either using dhclient to configure a temporary IP for our uses (that is if there is an DHCP reception!) or manually configure the NIC.

For DHCP:
dhclient enoXXXXXXX
and verify with:
ip addr
To setup a static IP address:
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
NETWORK=10.0.0.0
NETMASK=255.255.255.0
IPADDR=10.0.0.2
USERCTL=no
Setup a default gateway:
vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=linuxbox
GATEWAY=10.0.0.1
and DNS:
vi /etc/resolv.conf 
nameserver 8.8.8.8
nameserver 8.8.4.4
And then install perl (We should also ensure ifconfig utility is installed as it's required by VMware tools!):
yum install perl net-tools
and finally attempt to install VMWare tools again!
cd /tmp/vmware-tools-distrib
./vmware-install.pl
Once installed - give the VMXNET3 a static IP and simply remove the E1000 NIC.


0 comments:

Post a Comment