In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces how to solve the problem of network card startup failure after RHEL6.3 cloning virtual machine. The content is very detailed. Interested friends can use it for reference. I hope it can be helpful to you.
RHEL6.3 is installed in the company's test environment. After cloning the virtual machine, it is found that the virtual machine ENI of clone does not work. The following error is reported:
[root@localhost Desktop] # service network restart
Shutting down loopback interface: [OK]
Bringing up loopback interface: [OK]
Bringing up interface eth0: Error: No suitable device found: no device found for connection 'System eth0'.
[FAILED]
When you execute the ifconfig command, you will find that the configuration file that displays the eth2 network card is / etc/sysconfig/network-scripts/ifcfg-eth0.
[root@localhost network-scripts] # ifconfig | grep addr
Eth2 Link encap:Ethernet HWaddr 00:0c:29:f4:95:e3
Inet6 addr: fe80::20c:29ff:fe5c:65b7/64 Scope:Link
Interrupt:19 Base address:0x2024
Inet addr:127.0.0.1 Mask:255.0.0.0
Inet6 addr: 1/128 Scope:Host
[root@localhost network-scripts] # ls
Ifcfg-eth0 ifdown-isdn ifup-aliases ifup-plusb init.ipv6-global
Ifcfg-lo ifdown-post ifup-bnep ifup-post net.hotplug
Ifdown ifdown-ppp ifup-eth ifup-ppp network-functions
Ifdown-bnep ifdown-routes ifup-ippp ifup-routes network-functions-ipv6
Ifdown-eth ifdown-sit ifup-ipv6 ifup-sit
Ifdown-ippp ifdown-tunnel ifup-isdn ifup-tunnel
Ifdown-ipv6 ifup ifup-plip ifup-wireless
[root@localhost network-scripts] #
The reason for this problem is that the virtual network card MAC address assigned by the virtual machine to the operating system is different. The MAC address of the network card of the first system is recorded in / etc/udev/rules.d/70-persistent-net.rules, named eth0. The network card MAC address of the system assigned by the new clone is also recorded in this file, the same as the previous system, so there is a conflict.
You can check the contents of this 70-persistent-net.rules file of the two machines.
The first system:
[root@localhost rules.d] # cat 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 0x1022:0x2000 (pcnet32)
SUBSYSTEM== "net", ACTION== "add", DRIVERS== "? *", ATTR {address} = = "00:0c:29:f4:95:e3", ATTR {type} = = "1", KERNEL== "eth*", NAME= "eth0"
Cloned system:
[root@localhost rules.d] # cat 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 0x1022:0x2000 (pcnet32)
SUBSYSTEM== "net", ACTION== "add", DRIVERS== "? *", ATTR {address} = = "00:0c:29:f4:95:e3", ATTR {type} = = "1", KERNEL== "eth*", NAME= "eth2"
We can see that the MAC addresses are the same in both systems.
Problem solving:
Delete the / etc/udev/rules.d/70-persistent-net.rules file in the cloned system, and after reboot, the system will generate a new virtual network card MAC address, and then change the eth2 of NAME= "eth2" in this file to eth0. At the same time, modify the mac address and / etc/sysconfig/network-scripts/ifcfg-eth0 file mac address in ATTR {address}, and be consistent with the new virtual network card MAC address.
Such as: change the original document's
SUBSYSTEM== "net", ACTION== "add", DRIVERS== "? *", ATTR {address} = = "00:0c:29:f4:95:e3", ATTR {type} = = "1", KERNEL== "eth*", NAME= "eth2"
Change to SUBSYSTEM== "net", ACTION== "add", DRIVERS== "? *", ATTR {address} = = "00:0c:29:5c:65:b7", ATTR {type} = = "1", KERNEL== "eth*", NAME= "eth0"
Modify / etc/sysconfig/network-scripts/ifcfg-eth0 file
DEVICE= "eth0"
IPV6INIT= "yes"
NM_CONTROLLED= "yes"
ONBOOT= "yes"
TYPE= "Ethernet"
UUID= "05944003-ae77-4c9d-9e58-3ec2851db71d"
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME= "System eth0"
HWADDR=00:0c:29:5c:65:b7
Then restart the network service and find that everything is fine.
[root@localhost Desktop] # service network restart
Shutting down interface eth0: Device state: 3 (disconnected)
[OK]
Shutting down loopback interface: [OK]
Bringing up loopback interface: [OK]
Bringing up interface eth0: Active connection state: activating
Active connection path: / org/freedesktop/NetworkManager/ActiveConnection/1
State: activated
Connection activated [OK]
After setting up IP, check again
[root@localhost Desktop] # ifconfig | grep addr
Eth0 Link encap:Ethernet HWaddr 00:0C:29:5C:65:B7
Inet addr:192.168.0.129 Bcast:192.168.0.255 Mask:255.255.255.0
Inet6 addr: fe80::20c:29ff:fe5c:65b7/64 Scope:Link
Interrupt:19 Base address:0x2024
Inet addr:127.0.0.1 Mask:255.0.0.0
Inet6 addr: 1/128 Scope:Host
Note: if you execute the ifconfig command and find that eth2 is still displayed instead of eth0, you can restart the system again and change it.
On the RHEL6.3 clone virtual machine after the network card startup failure how to solve the problem is shared here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.