
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):
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: 70-persistent-net.rules, eth0 not found, ethernet0.generatedaddress, linux, mac address, networking, ubuntu, ubuntu 8.04 lts, ubuntu jeos, vmware, vmware appliance, vmware player, vmx
Setting up a Linux test environment is quite fun and easy. My favorite tool is VMWare Player (Windows) or VMWare Fusion (Mac). VMWare player is free, while VMWare Fusion, now in version 2.0+, is inexpensive for the functionality that it provides. I only use VMWare since I have paid for Fusion on Mac, however, there are free alternatives like VirtualBox (backed by Sun Microsystems) and KVM. Those are currently a bit harder to setup and do not have well established production solutions like VMWare and Xen.
I find the portability of the VMWare images very handy when going back and forth on Windows and Mac. There’s also easy downloads of different OSs at VMWare Appliances and VMPlanet.net.

One quick way to get setup on VMWare for free on Windows, is to register on the VMWare site and download the VMWare Player for free. Then go and download an appliance from the VMWare Appliances page.
So what’s something fun to download? Definitely Ubuntu 8.04 LTS Desktop.
You’ll find the best support out there, i.e. you can google anything if you need help. It’s based off of Debian Linux, so it’s using a great package manager (aptitude). The help site for Ubuntu Server and Desktop is great too.
Tags: apt-get, aptitude, desktop, help guides, linux, lts, server, sun microsystems, ubuntu, ubuntu 8.04 lts, ubuntu help site, virtual machines, virtualbox, virtualization, vmplanet, vmplanet.net, vmware, Xen