Nic cannot find a problem after cloning Linux virtual machine

Source: Internet
Author: User

Troubleshoot virtual machine Clone network card loss issues

1. The virtual machine NIC after cloning is displayed as follows

[[Email protected] Desktop]# ifconfig

Lo Link encap:local Loopback

inet addr:127.0.0.1 mask:255.0.0.0

Inet6 addr::: 1/128 scope:host

Up LOOPBACK RUNNING mtu:16436 metric:1

RX packets:120 errors:0 dropped:0 overruns:0 frame:0

TX packets:120 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:9340 (9.1 KiB) TX bytes:9340 (9.1 KiB)

2. The workaround is as follows

(1) Enable eth1 NIC

[[email protected] Desktop]# cd/etc/sysconfig/network-scripts/

Rename eth0 to Eth1

[email protected] network-scripts]# mv Ifcfg-eth0 ifcfg-eth1

[[email protected] network-scripts] #vim/etc/udev/rules.d/70-persistent-net.rules

# PCI Device 0x8086:0x100f (e1000)

subsystem== "NET", action== "Add", drivers== "? *", attr{address} = = "00:0c:29:a9:a0:68", attr{type}== "1", kernel== "eth*" , name= "Eth0"


# PCI Device 0x8086:0x100f (e1000)

subsystem== "NET", action== "Add", drivers== "? *", attr{address} = = "00:0c:29:28:e5:6a", attr{type}== "1", kernel== "eth*" , name= "Eth1"

Modify the MAC address of the ETH1

Replace the attr{address} value of Name= "Eth1" with the MAC address of Ifcfg-eth1

waddr=00:0c:29:28:e5:6a

Restart Network Service

[email protected] network-scripts]# service network restart

Shutting down interface eth1: [OK]

Close Loopback interface: [OK]

Eject loopback interface: [OK]

Pop-up interface eth1:determining if IP address 192.168.4.5 is already on use for device eth1 ...

[OK

(2) Enable eth0 NIC

[[email protected] network-scripts] #vim/etc/udev/rules.d/70-persistent-net.rules

Remove two lines of configuration information for name= "eth0"

Then Name= "eth1" to Name= "eth0" and copy the value of its attr{address}

[email protected] network-scripts]# Vim/etc/sysconfig/network-scripts/ifcfg-eth0

Modify its MAC address to the value of the attr{address} that you just copied

Restart Network Service

[email protected] network-scripts]# service network restart

Shutting down interface eth0: [OK]

Close Loopback interface: [OK]

Eject loopback interface: [OK]

Pop-up interface eth0:determining if IP address 192.168.4.5 is already on use for device eth1 ...

Determine


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.