Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I managed to get the Debian 6.0.1 to work with the Microsoft Hyper-V synthetic drivers, thanks to this question. However, if I don't remove the entry for the synthetic ethernet card from /etc/udev/rules.d/70-persistent-net.rules on every boot, the VM won't boot the next time as there is a kernel BUG at mm/mmap.c:2129 (Recursive fault) - last sysfs file: /sys/devices/vmbus_0_0/vmbus_0_3/net/eth0/uevent

How do I fix this?

EDIT:

75-persistent-net-generator.rules looks like this:

# These rules generate rules to keep network interface names unchanged
# across reboots and write them to /etc/udev/rules.d/70-persistent-net.rules.

# variables used to communicate:
#   MATCHADDR           MAC address used for the match
#   MATCHID             bus_id used for the match
#   MATCHDRV            driver name used for the match
#   MATCHIFTYPE         interface type match
#   COMMENT             comment to add to the generated rule
#   INTERFACE_NAME      requested name supplied by external tool
#   INTERFACE_NEW       new interface name returned by rule writer

ACTION!="add",                          GOTO="persistent_net_generator_end"
SUBSYSTEM!="net",                       GOTO="persistent_net_generator_end"

# ignore the interface if a name has already been set
NAME=="?*",                             GOTO="persistent_net_generator_end"

# device name whitelist
KERNEL!="eth*|ath*|wlan*[0-9]|msh*|ra*|sta*|ctc*|lcs*|hsi*", \
                                        GOTO="persistent_net_generator_end"

# ignore Xen virtual interfaces
SUBSYSTEMS=="xen",                      GOTO="persistent_net_generator_end"

# ignore UML virtual interfaces
DRIVERS=="uml-netdev",                  GOTO="persistent_net_generator_end"

# ignore "secondary" raw interfaces of the madwifi driver
KERNEL=="ath*", ATTRS{type}=="802",     GOTO="persistent_net_generator_end"

# ignore "secondary" monitor interfaces of mac80211 drivers
KERNEL=="wlan*", ATTRS{type}=="803",    GOTO="persistent_net_generator_end"

# by default match on the MAC address and interface type
ENV{MATCHADDR}="$attr{address}"
ENV{MATCHIFTYPE}="$attr{type}"

# match interface dev_id
ATTR{dev_id}=="?*", ENV{MATCHDEVID}="$attr{dev_id}"

# These vendors are known to violate the local MAC address assignment scheme
# Interlan, DEC (UNIBUS or QBUS), Apollo, Cisco, Racal-Datacom
ENV{MATCHADDR}=="02:07:01:*", GOTO="globally_administered_whitelist"
# 3Com
ENV{MATCHADDR}=="02:60:60:*", GOTO="globally_administered_whitelist"
# 3Com IBM PC; Imagen; Valid; Cisco; Apple
ENV{MATCHADDR}=="02:60:8c:*", GOTO="globally_administered_whitelist"
# Intel
ENV{MATCHADDR}=="02:a0:c9:*", GOTO="globally_administered_whitelist"
# Olivetti
ENV{MATCHADDR}=="02:aa:3c:*", GOTO="globally_administered_whitelist"
# CMC Masscomp; Silicon Graphics; Prime EXL
ENV{MATCHADDR}=="02:cf:1f:*", GOTO="globally_administered_whitelist"
# Prominet Corporation Gigabit Ethernet Switch
ENV{MATCHADDR}=="02:e0:3b:*", GOTO="globally_administered_whitelist"
# BTI (Bus-Tech, Inc.) IBM Mainframes
ENV{MATCHADDR}=="02:e6:d3:*", GOTO="globally_administered_whitelist"
# Realtek
ENV{MATCHADDR}=="52:54:00:*", GOTO="globally_administered_whitelist"
# Novell 2000
ENV{MATCHADDR}=="52:54:4c:*", GOTO="globally_administered_whitelist"
# Realtec
ENV{MATCHADDR}=="52:54:ab:*", GOTO="globally_administered_whitelist"
# Kingston Technologies
ENV{MATCHADDR}=="e2:0c:0f:*", GOTO="globally_administered_whitelist"

# ignore interfaces with locally administered or null MAC addresses
# and KVM and VMWare virtual interfaces
ENV{MATCHADDR}=="?[2367abef]:*",        ENV{MATCHADDR}=""
ENV{MATCHADDR}=="00:00:00:00:00:00",    ENV{MATCHADDR}=""
ENV{MATCHADDR}=="00:0c:29:*|00:50:56:*", ENV{MATCHADDR}=""
ENV{MATCHADDR}=="52:54:00:*|54:52:00:*", ENV{MATCHADDR}=""

LABEL="globally_administered_whitelist"

# ibmveth interfaces have stable locally administered MAC addresses
SUBSYSTEMS=="ibmveth",                  ENV{MATCHADDR}="$attr{address}"

# S/390 interfaces are matched only by id
#SUBSYSTEMS=="ccwgroup", \
#       ENV{MATCHDRV}="$driver", ENV{MATCHID}="$id", ENV{MATCHADDR}=""

# terminate processing if there are not enough conditions to create a rule
ENV{MATCHADDR}=="", ENV{MATCHID}=="", ENV{INTERFACE_NAME}=="", \
                                        GOTO="persistent_net_generator_end"


# provide nice comments for the generated rules
SUBSYSTEMS=="pci", \
 ENV{COMMENT}="PCI device $attr{vendor}:$attr{device}"
SUBSYSTEMS=="pcmcia", \
 ENV{COMMENT}="PCMCIA device $attr{card_id}:$attr{manf_id}"
SUBSYSTEMS=="usb", \
 ENV{COMMENT}="USB device 0x$attr{idVendor}:0x$attr{idProduct}"
SUBSYSTEMS=="ccwgroup", \
 ENV{COMMENT}="S/390 device at $id"
SUBSYSTEMS=="ibmveth", \
 ENV{COMMENT}="LPAR virtual device at $id"
SUBSYSTEMS=="ieee1394", \
 ENV{COMMENT}="Firewire device $attr{host_id}"
ENV{COMMENT}=="", \
 ENV{COMMENT}="Unknown $env{SUBSYSTEM} device ($env{DEVPATH})"
ATTRS{driver}=="?*", \
 ENV{COMMENT}="$env{COMMENT} ($attr{driver})"


# ignore interfaces without a driver link like bridges and VLANs, otherwise
# generate and write the rule
DRIVERS=="?*", IMPORT{program}="write_net_rules"

# rename the interface if requested
ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}"

LABEL="persistent_net_generator_end"
share|improve this question
    
Currently, I am doing this by deleting the file /lib/udev/rules.d/75-persistent-net-generator.rules, but I'm looking for a more correct way of doing this? –  Kimvais Apr 8 '11 at 18:51
    
What's the contents of 75-persistent-net-generator.rules? –  Paul Doom Apr 18 '11 at 13:25

2 Answers 2

up vote 2 down vote accepted

I think try this, based on a Debian forum post

mkdir /lib/udev/rules.d/disabled 
mv /lib/udev/rules.d/75-persistent-net-generator.rules /lib/udev/rules.d/disabled 
mv /lib/udev/rules.d/75-cd-aliases-generator.rules /lib/udev/rules.d/disabled 
rm -f /etc/udev/rules.d/70*
share|improve this answer
    
That's pretty much what I have already done - just wondering if there is a way to actually fix the broken script. Thanks anyways :) –  Kimvais Apr 19 '11 at 17:03
    
It sounds like the root of the problem is related to Hyper-v generating different device IDs on each reboot, odd. –  Ewan Leith Apr 20 '11 at 10:22

In your file:

# ignore interfaces with locally administered or null MAC addresses
# and KVM and VMWare virtual interfaces
ENV{MATCHADDR}=="?[2367abef]:*",        ENV{MATCHADDR}=""
ENV{MATCHADDR}=="00:00:00:00:00:00",    ENV{MATCHADDR}=""

You need to add your mac address to the bottom of this section. You probably only need to specify the first 3 so something like this:

# ignore interfaces with locally administered or null MAC addresses
# and KVM and VMWare virtual interfaces
ENV{MATCHADDR}=="?[2367abef]:*",        ENV{MATCHADDR}=""
ENV{MATCHADDR}=="00:00:00:00:00:00",    ENV{MATCHADDR}=""
ENV{MATCHADDR}=="MS:ma:c9:*", ENV{MATCHADDR}=""
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.