Nic name modification after using VMware to clone CentOS (Obsessive-compulsive disorder)

Source: Internet
Author: User

--------------------------------------

I. Causes of obsessive-compulsive disorder

Second, the normal configuration eth1 network card

Third, modify the NIC name eth1 to eth0

--------------------------------------


I. Causes of obsessive-compulsive disorder

Because of the use of VMware Workstation clone virtual machine, Nic name always change, no longer is eth0, this is always uncomfortable, although it can be used normally, but obsessive-compulsive disorder is very serious, must be eth0, look comfortable!


Second, the normal configuration eth1 network card

Because no IP is configured after the first time the cloned VM is opened, the Xshell connection cannot be used and the desktop is not installed.

1. The clone system first boot when the network card is inactive, need to activate first, and can see that there is no eth0 network card.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/58/98/wKioL1S1IEDQUq87AADOXSsLG94270.jpg "title=" Untitled 3.png "style=" Float:none; "alt=" wkiol1s1iedquq87aadoxsslg94270.jpg "/>

2. Activating the NIC Eth1

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/58/9B/wKiom1S1H3ezf6fuAABjU8YyEo8045.jpg "title=" Untitled 4.png "style=" Float:none; "alt=" wkiom1s1h3ezf6fuaabju8yyeo8045.jpg "/>

View NIC Details

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/9B/wKiom1S1H3ajX64nAAH4Qp8QwOI831.jpg "style=" float: none; "Title=" Untitled 0.png "alt=" Wkiom1s1h3ajx64naah4qp8qwoi831.jpg "/>


3. Normal configuration eth1 NIC

# Setup//You can use this command to configure the NIC IP, which is omitted below.

Choose to add a new device

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/98/wKioL1S1IEHx3DHMAAB3ajXlJcQ874.jpg "style=" float: none; "Title=" Untitled 5.png "alt=" Wkiol1s1iehx3dhmaab3ajxljcq874.jpg "/>


650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/9B/wKiom1S1H3eifSVOAAB-h_tWqoY771.jpg "style=" float: none; "Title=" Untitled 6.png "alt=" Wkiom1s1h3eifsvoaab-h_twqoy771.jpg "/>

Add eth1 NIC Information

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/58/98/wKioL1S1IEHzMvvHAAEI08hQaHw593.jpg "style=" float: none; "Title=" Untitled 7.png "alt=" Wkiol1s1iehzmvvhaaei08hqahw593.jpg "/>

Save to exit

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/58/9B/wKiom1S1H3fRqw0IAAB9m-_DBWk456.jpg "style=" float: none; "Title=" Untitled 8.png "alt=" Wkiom1s1h3frqw0iaab9m-_dbwk456.jpg "/>

4. Restart the network service, the eth1 can be used normally.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/98/wKioL1S1IEGhieiBAADap0wm8PM469.jpg "style=" float: none; "Title=" Untitled 9.png "alt=" Wkiol1s1ieghieibaadap0wm8pm469.jpg "/>

5. You can now use the Xshell tool to connect, no longer, paste the command.

# ifconfig eth1      link encap:ethernet  hwaddr  00:0c:29:60:15:0f            inet addr :192.168.2.100  bcast:192.168.2.255  mask:255.255.255.0           inet6 addr: fe80::20c:29ff:fe60:150f/64 Scope:Link           up broadcast running multicast  mtu :1500  metric:1          rx packets:60  errors:0 dropped:0 overruns:0 frame:0           TX packets:67 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            rx bytes:6219  (6.0 kib)   TX bytes:10975  (10.7 kib) 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:0 errors:0 dropped:0 overruns:0  frame:0          TX packets:0 errors:0  Dropped:0 overruns:0 carrier:0          collisions :0 txqueuelen:0           rx bytes:0  ( 0.0 B)   TX&NBsp;bytes:0  (0.0 B) 

Third, modify the NIC name eth1 to eth0

1. Remove the eth0 configuration file from the system and name the existing eth1 eth0.

# cd/etc/sysconfig/network-scripts/# rm-f ifcfg-eth0# mv ifcfg-eth1 ifcfg-eth0# VI ifcfg-eth0device=eth0/ /Change eth1 to eth0bootproto=nonenetmask=255.255.255.0type=ethernethwaddr=00:0c:29:60:15:0fipaddr=192.168.2.100

2. Remove the first device in the configuration file, and the second device name is modified to eth0. The MAC address should be consistent with the NIC configuration file.

# cd/etc/udev/rules.d/# VI 70-persistent-net.rules//unmodified status # PCI device 0x8086:0x100f (e1000) subsystem== "NET", action== "Add", drivers== "? *", attr{address}== "00:0c:29:69:90:83", attr{type}== "1", kernel== "eth*", Name= "eth0" # PCI Device 0x8086:0x100f (e1000) subsystem== "NET", action== "Add", drivers== "? *", attr{address}== "00:0c:29:60:15:0f", ATTR {type}== "1", kernel== "eth*", Name= "eth1" # Cat 70-persistent-net.rules//Modified status # PCI device 0x8086:0x100f (e1000) SU bsystem== "NET", action== "Add", drivers== "? *", attr{address}== "00:0c:29:60:15:0f", attr{type}== "1", kernel== "eth*", Name= "Eth0"

3. After rebooting the system, review.

# reboot# ifconfig eth0      link encap:ethernet   Hwaddr 00:0c:29:60:15:0f            inet  addr:192.168.2.100  Bcast:192.168.2.255  Mask:255.255.255.0           inet6 addr: fe80::20c:29ff:fe60:150f/64 Scope:Link           UP BROADCAST RUNNING MULTICAST   mtu:1500  metric:1          rx packets :29 errors:0 dropped:0 overruns:0 frame:0           TX packets:44 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000           &nbSp rx bytes:3655  (3.5 kib)   TX bytes:5385  (5.2 kib) 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:0 errors:0 dropped:0  overruns:0 frame:0          tx packets:0  errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:0           RX  bytes:0  (0.0 b)   TX bytes:0  (0.0 B) 


This article is from the "Promise" blog, make sure to keep this source http://hatech.blog.51cto.com/8360868/1603696

Nic name modification after using VMware to clone CentOS (Obsessive-compulsive disorder)

Related Article

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.