tip on vmware ethernet mapping problem

-----Original Message-----
From: CS526 Class Mailing List [mailto:cs526-l@uccs.edu] On Behalf Of Edward
Chow
Sent: Thursday, February 28, 2008 11:40 AM
To: CS526 Class Mailing List
Subject: [cs526-l]FW: Ubuntu ethernet address/interface binding

Chuck,

Great that you solve this puzzle and potential avoid a lot of confusion
and mistakes your classmates may run into.

For lvs1rs3 (guest ubuntu), I found that
/etc/udev/rules.d/70-persistent-net.rules contains

root@lvs1rs3:/etc/udev/rules.d# ls
00-init.rules                75-cd-aliases-generator.rules
05-options.rules             75-persistent-net-generator.rules
20-names.rules               80-programs.rules
30-cdrom_id.rules            85-alsa.rules
40-permissions.rules         85-hdparm.rules
45-fuse.rules                85-hwclock.rules
60-symlinks.rules            85-ifupdown.rules
65-persistent-input.rules    85-pcmcia.rules
65-persistent-storage.rules  90-modprobe.rules
70-persistent-cd.rules       99-udevmonitor.rules
70-persistent-net.rules      README
root@lvs1rs3:/etc/udev/rules.d# vi 70-persistent-net.rules 
# This file was automatically generated by the /lib/udev/write_net_rules
# program, probably run by the persistent-net-generator.rules rules
file.
#
# You can modify it, as long as you keep each rule on a single line.

# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:0c:29:bd:5f:db",
NAME="eth0"

# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:0c:29:bd:5f:e5",
NAME="eth1"

# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:0c:29:7f:e3:fc",
NAME="eth2"

# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:0c:29:7f:e3:06",
NAME="eth3"

# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:0c:29:ed:22:e0",
NAME="eth4"

# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:0c:29:ed:22:d6",
NAME="eth5"

# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:0c:29:12:41:be",
NAME="eth6"

# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:0c:29:12:41:c8",
NAME="eth7"

# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:0c:29:1b:72:a5",
NAME="eth8"

# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:0c:29:1b:72:9b",
NAME="eth9"

The lvs1rs3's vmx configuration file on sis.csnet.uccs.edu contains

ide0:0.redo = ""
ethernet0.addressType = "generated"
ethernet1.addressType = "generated"
uuid.location = "56 4d c9 93 36 9a 40 19-19 ff b1 41 0c 1b 72 9b"
uuid.bios = "56 4d c9 93 36 9a 40 19-19 ff b1 41 0c 1b 72 9b"
ethernet0.generatedAddress = "00:0c:29:1b:72:9b"
ethernet0.generatedAddressOffset = "0"
ethernet1.generatedAddress = "00:0c:29:1b:72:a5"
ethernet1.generatedAddressOffset = "10"

verify that ...72:9b and ...72:a5 are new mac address created for the
vm.

I believe the 9 mac addresses were generated each time vmware detects
the vm folder contains files that were/maybe copied and will promp the
user to generate a unique ID. When user confirms, it also generates new
mac address for eth0 and eth1. When the new vm is run, its OS detects
the new mac addresses and consider they are new interfaces and create
new ethn number for it. That is probably what happens.  

Here is what did to correct lvs1rs3:

Since ...72:9b is ethernet0 and ...72:a5 is ethernet1 on vmx file 
I remove the entries from eth0 to eth7 and rename eth9 as eth0 and eth8
as eth1.
Note that I also need to edit /etc/network/interface to change the
primary network interface and 2ndary interface to eth0 and eth1.
I also change /etc/sysctl.conf 
from
net.ipv4.conf.eth9.arp_ignore = 1
net.ipv4.conf.eth9.arp_announce = 2
to
net.ipv4.conf.eth0.arp_ignore = 1
net.ipv4.conf.eth0.arp_announce = 2


reboot and the eth0 is assigned with  128.198.61.153.
run lvs/rs_dr.sh to set up the real server and the ssh access to vip
128.198.61.131 works.
Note that rs_dr.sh does not need to be modified. I did remove the "route
add default gw 128.198.61.129" from rs_dr.sh since the entry already
exist.

By being able to modify the /etc/udev/rules.d/70-persistent-net.rules
and consistently binding eth0 and eth1 to the external vm's mac address,
we do not have change the shell scripts, /etc/network/interfaces, and
the /etc/sysctl.conf files for configuration the cluster. It is a better
less messy solution.

Edward



-----Original Message-----
From: Charles Short [mailto:cshort@uccs.edu] 
Sent: Thursday, February 28, 2008 7:59 AM
To: Edward Chow
Subject: Ubuntu ethernet address/interface binding


Hi Dr. Chow,

FYI: Here is the file that contains the ethernet address/interface 
binding in Ubuntu:

/etc/udev/rules.d/70-persistent-net.rules

It contains entries such as below:

# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:0c:29:06:72:8b", 
NAME="eth0"

# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:0c:29:06:72:4b", 
NAME="eth1"

I edited this file, deleted the eth0 entry, which referenced the 
address of my original machine, then changed the entry with 
NAME="eth1" to NAME="eth0"

After rebooting I was able to use eth0.

I found this information on the following site:
http://www.ericmmartin.com/running-ubuntu-710-in-vmware-player/





-----Original Message-----
From: CS526 Class Mailing List [mailto:cs526-l@uccs.edu] On Behalf Of Edward
Chow
Sent: Thursday, February 28, 2008 11:40 AM
To: CS526 Class Mailing List
Subject: [cs526-l]FW: Ubuntu ethernet address/interface binding

Chuck,

Great that you solve this puzzle and potential avoid a lot of confusion
and mistakes your classmates may run into.

For lvs1rs3 (guest ubuntu), I found that
/etc/udev/rules.d/70-persistent-net.rules contains

root@lvs1rs3:/etc/udev/rules.d# ls
00-init.rules                75-cd-aliases-generator.rules
05-options.rules             75-persistent-net-generator.rules
20-names.rules               80-programs.rules
30-cdrom_id.rules            85-alsa.rules
40-permissions.rules         85-hdparm.rules
45-fuse.rules                85-hwclock.rules
60-symlinks.rules            85-ifupdown.rules
65-persistent-input.rules    85-pcmcia.rules
65-persistent-storage.rules  90-modprobe.rules
70-persistent-cd.rules       99-udevmonitor.rules
70-persistent-net.rules      README
root@lvs1rs3:/etc/udev/rules.d# vi 70-persistent-net.rules 
# This file was automatically generated by the /lib/udev/write_net_rules
# program, probably run by the persistent-net-generator.rules rules
file.
#
# You can modify it, as long as you keep each rule on a single line.

# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:0c:29:bd:5f:db",
NAME="eth0"

# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:0c:29:bd:5f:e5",
NAME="eth1"

# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:0c:29:7f:e3:fc",
NAME="eth2"

# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:0c:29:7f:e3:06",
NAME="eth3"

# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:0c:29:ed:22:e0",
NAME="eth4"

# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:0c:29:ed:22:d6",
NAME="eth5"

# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:0c:29:12:41:be",
NAME="eth6"

# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:0c:29:12:41:c8",
NAME="eth7"

# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:0c:29:1b:72:a5",
NAME="eth8"

# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:0c:29:1b:72:9b",
NAME="eth9"

The lvs1rs3's vmx configuration file on sis.csnet.uccs.edu contains

ide0:0.redo = ""
ethernet0.addressType = "generated"
ethernet1.addressType = "generated"
uuid.location = "56 4d c9 93 36 9a 40 19-19 ff b1 41 0c 1b 72 9b"
uuid.bios = "56 4d c9 93 36 9a 40 19-19 ff b1 41 0c 1b 72 9b"
ethernet0.generatedAddress = "00:0c:29:1b:72:9b"
ethernet0.generatedAddressOffset = "0"
ethernet1.generatedAddress = "00:0c:29:1b:72:a5"
ethernet1.generatedAddressOffset = "10"

verify that ...72:9b and ...72:a5 are new mac address created for the
vm.

I believe the 9 mac addresses were generated each time vmware detects
the vm folder contains files that were/maybe copied and will promp the
user to generate a unique ID. When user confirms, it also generates new
mac address for eth0 and eth1. When the new vm is run, its OS detects
the new mac addresses and consider they are new interfaces and create
new ethn number for it. That is probably what happens.  

Here is what did to correct lvs1rs3:

Since ...72:9b is ethernet0 and ...72:a5 is ethernet1 on vmx file 
I remove the entries from eth0 to eth7 and rename eth9 as eth0 and eth8
as eth1.
Note that I also need to edit /etc/network/interface to change the
primary network interface and 2ndary interface to eth0 and eth1.
I also change /etc/sysctl.conf 
from
net.ipv4.conf.eth9.arp_ignore = 1
net.ipv4.conf.eth9.arp_announce = 2
to
net.ipv4.conf.eth0.arp_ignore = 1
net.ipv4.conf.eth0.arp_announce = 2


reboot and the eth0 is assigned with  128.198.61.153.
run lvs/rs_dr.sh to set up the real server and the ssh access to vip
128.198.61.131 works.
Note that rs_dr.sh does not need to be modified. I did remove the "route
add default gw 128.198.61.129" from rs_dr.sh since the entry already
exist.

By being able to modify the /etc/udev/rules.d/70-persistent-net.rules
and consistently binding eth0 and eth1 to the external vm's mac address,
we do not have change the shell scripts, /etc/network/interfaces, and
the /etc/sysctl.conf files for configuration the cluster. It is a better
less messy solution.

Edward



-----Original Message-----
From: Charles Short [mailto:cshort@uccs.edu] 
Sent: Thursday, February 28, 2008 7:59 AM
To: Edward Chow
Subject: Ubuntu ethernet address/interface binding


Hi Dr. Chow,

FYI: Here is the file that contains the ethernet address/interface 
binding in Ubuntu:

/etc/udev/rules.d/70-persistent-net.rules

It contains entries such as below:

# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:0c:29:06:72:8b", 
NAME="eth0"

# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:0c:29:06:72:4b", 
NAME="eth1"

I edited this file, deleted the eth0 entry, which referenced the 
address of my original machine, then changed the entry with 
NAME="eth1" to NAME="eth0"

After rebooting I was able to use eth0.

I found this information on the following site:
http://www.ericmmartin.com/running-ubuntu-710-in-vmware-player

Install esx as a virtual machie. How to include buslogic driver

to use a virtual machine to install esx, we need to specify the scsi driver. Since esx is intended to support data center or real server, the list of drivers supported are those SCSI and RAID controller (some SATA RAIDs are reported by users to be successful.). For our purpose, we need to find buslogic (or lsilogic) driver. at http://www.vmware.com/download/esx/esx2-rhel4u3-dd-rpm.html we found buslogic driver for installing new Guest OS. After download buslogic driver, unzip, and select vm | setting | floppy and choose connected for device status !!!! (otherwise failed to mount) select "Use floppy image" and browser to enter the file name of driver image file /home/chow/opt/vmware/dd-rhel4u3.img at Select Device Driver to Load Hit F2 key to read the driver into the selection list. Use fd0 instead of hdc Go back the select list. YOu should find buslogic driver there. select it and click OK. http://www.davidlaporte.org/tutorials/ghostinthemachine.php