tomclegg.net


Diary
Examples
    256-router
    adzap
    apache-double-reverse
    cacti-adodb-php4
    debian-quota
    diskonmodule
    dollarsperbyte
    dynip
    ezmlm-linux
    fbsdhabits
    freebsdclone
    macbook-quantal-sound
    maildirpop3d-awfulhak
    mandy
    md
    mrtg
    net-snmp
    nodefaultroute
    oracle9i
    oracle9i-bsd5
    oracle9i-client
    oracle9i-nat
    php-cgi
    php-commandline
    php-image
    php-kics
    php-mini_httpd
    pinouts
    pizzaperdollar
    plesk-symlink-php
    pxe
    qmail-linux
    qmail-qfilter
    racoon-sonicwall
    redundant-vpn
    rewriterule
    seahorse-workaround
    setting-locale-failed
    smalldog
    snmpv3-cacti
    spamassassin
    squid-tproxy
    supfile
    suse73
    svc-nmbd
    svc-smbd
    svc-smtpd
    switch-virtualbox-virsh
    toyotastereo
    vm
    vn-file
    wmp-invalid
    xcode-remote-install
  >xen-eth0-renamed<
    xen-monowall
    xen3-ubuntu-dapper
    zz-update-grub-fail
Hire Tom
Mostly Mozart
Patches
School
Scrapbook
Software
Telephones




colocation
comments
davidireland
edsgranola
faq
funsites
goodlooking
goodmovies
google-earth-saucy-amd64
houserules
liberating
resume
resume2
scratch
shopping
snacks
todo
university
warisbogus

eth0 renamed to eth1, eth2, eth3, ... in domU
Posted March 6, 2008

domU works fine the first time.

After reboot, eth0 doesn't exist. The xen virtual interface appears as eth1.

After a second reboot, the interface appears as eth2, and so on.

Evidently the gutsy domU, noticing that eth0 had a different MAC address than the "saved eth0 MAC address", assigns a brand new eth# and saves the MAC address with the new interface number.

Solution:

  1. Edit /etc/udev/rules.d/70-persistent-net.rules in the domU.
  2. Remove dynamically generated lines.
  3. Add:
    SUBSYSTEM=="net", DRIVERS=="vif", ATTRS{nodename}=="device/vif/0", NAME="eth0"
  4. Shut down the domU and restart it.

Alternate solution (offered and preferred by Jonathan Addleman):

  1. Edit the domU's configuration file (/etc/xen/foo) in dom0.
  2. Assign a static MAC address:
    vif  = [ 'ip=1.2.3.4, mac=00:16:11:ab:cd:ef' ]
  3. Restart the domU.

Notes:

  • Ubuntu feisty dom0
  • Xen 3.0.3
  • Ubuntu gutsy domU