hsmack
msgbartop
Technological advances by Henry
msgbarbottom

31 Oct 08 Ubuntu 8.04 JeOS eth0 not found

I’ve been playing with Ubuntu JeOS, “pronouced as Juice” today.  I’m mostly interested in it because I can basically run small server appliances to test out random things like standalone postgres, standalone mysql servers, openldap, ruby on rails hosting (ngix, mongrel, thin, etc), etc.

I grabbed a copy of JeOS from the VMWare appliance marketplace with the label of “Ubuntu 8.04 JeOS Minimal appliance” and ran with it.

If you tell VMWare Player that “I copied it”.  Then it basically autogenerates a new UUID and MAC address in your virtual machine for you.

The problem that I had today was that this JeOS VM didn’t have the VMWare tools installed on it, so my eth0 didn’t work after clicking the “I copied it” button.  To fix it, I found some info online but I’ll summarize it here.

VMware by default gives a guest instance a MAC address generated in a particular range based on the host. Ubuntu, however, caches the MAC address of its eth interfaces in /etc/udev/rules.d/70-persistent-net.rules. So when you give the virtual image to somebody else, their VMware generates another MAC for eth0, and Ubuntu will then cache the new MAC address as eth1 (2, 3, etc.). But since there is no eth1, you get no network connection. The trick is to force a persistent MAC address in the VMX file like this (filling it in the x’s however you want):

ethernet0.addressType = “static”
ethernet0.address = “00:50:56:xx:xx:xx”

hsmack fix:  OR you can change the address to match the inside your Ubuntu.vmx file.

To summarize:

Edit your 70-persistent-net.rules file and change the MAC address to match in the Ubuntu.vmx file.

$ sudo nano /etc/udev/rules.d/70-persistent-net.rules
# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:70:ee:6f", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

My Ubuntu.vmx file looks like (see line 44):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
config.version = "8"
virtualHW.version = "4"
scsi0.present = "TRUE"
scsi0.virtualDev = "lsilogic"
memsize = "256"
scsi0:0.present = "TRUE"
scsi0:0.fileName = "root.vmdk"
ide1:0.present = "TRUE"
ide1:0.fileName = "F:"
ide1:0.deviceType = "cdrom-raw"
floppy0.autodetect = "TRUE"
ethernet0.present = "TRUE"
ethernet0.wakeOnPcktRcv = "FALSE"
usb.present = "TRUE"
sound.present = "TRUE"
sound.fileName = "-1"
sound.autodetect = "TRUE"
svga.autodetect = "TRUE"
mks.keyboardFilter = "allow"
displayName = "JeOS 8.04 postgres"
guestOS = "ubuntu"
nvram = "Ubuntu.nvram"
deploymentPlatform = "windows"
virtualHW.productCompatibility = "hosted"
tools.upgrade.policy = "useGlobal"
 
ide1:0.autodetect = "FALSE"
floppy0.fileName = "A:"
extendedConfigFile = "Ubuntu.vmxf"
 
scsi0:1.present = "TRUE"
scsi0:1.fileName = "swap.vmdk"
floppy0.startConnected = "FALSE"
sound.startConnected = "FALSE"
 
ethernet0.addressType = "generated"
uuid.location = "56 4d f5 7d 8d 70 ce fe-6a 3b 18 23 6b 70 ee 6f"
uuid.bios = "56 4d f5 7d 8d 70 ce fe-6a 3b 18 23 6b 70 ee 6f"
MemTrimRate = "0"
powerType.powerOff = "soft"
powerType.reset = "soft"
scsi0:0.redo = ""
scsi0:1.redo = ""
ethernet0.generatedAddress = "00:0c:29:70:ee:6f"
ethernet0.generatedAddressOffset = "0"
tools.remindInstall = "TRUE"

Tags: , , , , , , , , , , , ,



Leave a Comment