Tweaking OEL 6.3

I setup a VM host with several VMs as a test bed. The VM host is running Slackware 14 RC4, I'll upgrade to 14GA when the DVD arrives. I'm using VMWare Player to create/manage the VMs. The VMWare Guest is configured with Bridged networking giving the guest it's own IP address and allowing other hosts to connect to it. Most of the guest VMs are Oracle Enterprise Linux 6.3 (OEL 6.3) because much of the software I'm testing is from Oracle (Database, Weblogic).

The first thing I did was change the name of the host:
Modify /etc/sysconfig/network and change the HOSTNAME to whatever you want.

My first problem was that the VMs did not initialize the network interface. This confused me because I had other VMs on the same server that worked just fine. Must be an Oracle thing. A hint at the solution came from

/var/log/messages:
Oct 16 17:38:39 vm_weblogic kernel: udev: renamed network interface eth0 to eth1

I don't understand why this happens, the work around is to clone the eth0 config file as eth1 and then change 3 entries. You'll need to get your ethernet hardware address for this:

ifconfig eth1 | grep HWaddr
eth1 Link encap:Ethernet HWaddr00:0C:29:5B:4E:75

Then:

cd /etc/sysconfig/network-scripts
cp ifcfg-eth0 ifcfg-eth1

Modify the lines in ifcfg-eth1:

DEVICE="eth0" ==> DEVICE="eth1"
HWADDR=xx:xx:xx:xx:xx:xx ==> HWADDR=00:0C:29:5B:4E:75
NAME="System eth0" ==> NAME="System eth1"

You can either reboot or use ifup eth1

My DNS/DHCP server is using Simon Kelly's excellent dnsmasq program to hand out IP addresses. When I looked at the DHCP lease file (default location: /var/lib/misc/dnsmasq.leases) I saw that the VMs didn't have names:

1350574211 00:0c:29:5b:4e:75 192.168.1.150 * *
1350574240 00:0c:29:4b:b2:98 192.168.1.149 * *
1350542538 00:1a:4d:5a:c1:a9 192.168.1.133 vmhost *

That will make it much harder for the machines to connect to each other.

The solution is to add a line to

/etc/sysconfig/network-scripts/ifcfg-eth1:
DHCP_HOSTNAME="vm_weblogic"

A final reboot makes sure the VM changes persist and it's all good. You should now be able to ping your vm