Skip to content

Instantly share code, notes, and snippets.

@tkuchiki
Created March 18, 2015 09:03
Show Gist options
  • Save tkuchiki/014336b82c0a439cc62f to your computer and use it in GitHub Desktop.
Save tkuchiki/014336b82c0a439cc62f to your computer and use it in GitHub Desktop.
KVM で Device eth0 does not seem to be present, delaying initialization が出た場合の対処法
cat /root/70-persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x1af4:0x1000 (virtio-pci)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="54:52:00:5b:e5:94", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x1af4:0x1000 (virtio-pci)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="52:54:00:01:00:da", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

のようになっているので、

- SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="54:52:00:5b:e5:94", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

- SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="52:54:00:01:00:da", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
+ SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="52:54:00:01:00:da", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

と変更します。

ifconfig -a の eth1 の HWaddr か /root/70-persistent-net.rules の ATTR{address}=="XXX" の XXX の部分を、

DEVICE="eth0"
BOOTPROTO="dhcp"
IPV6INIT="no"
MTU="1500"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
+ HWADDR="52:54:00:01:00:DA"

のように追加します。

以上が完了したら reboot します。

これで eth0 が復活します。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment