linux clone and errors

Yufeng
http://www.cnblogs.com/xiaoerlang/p/3719275.html

http://www.aminglinux.com/study_v2/
After entering vi, press i to change to edit mode, there is the word INSERT at the bottom of the screen, this It's the same as Windows Notepad, change it. See
the . Press ESC key after modification, then enter colon x——:x to save and exit.
service network restart
your IP will come out.

//delete the file
rm -rf ./flexscap-nfv-install.sh

//clone

Enter the virtual machine, select a template, clone,

configure the network
: q exit
vim /etc/sysconfig/network-scripts/ifcfg-eth1

service network restart

rm -rf (space) /etc/udev/rules.d/+"tab" deletes this file automatically. When cloning, this ip address file comes from other virtual machines. In the new environment, the
algorithm is different, so it cannot be used or overwritten. So delete it, and then generate

clear to clear

ifconfig to view ip



1. Fault phenomenon:
[root@c1node01 ~]# service network restart
Shutting down loopback insterface: [ OK ]
Bringing up loopback insterface: [ OK ]
Bringing up interface eth0: Device eth0 does not seem to be present, delaying initialization. [FAILED]
Solution:
[root@c1node01 ~]# rm -rf / etc/udev/rules.d/70-persistent-net.rules
[root@c1node01 ~]# reboot ……………… (The whole system restarts after changing the file)
[root@c1node01 ~]# service network restart (network restart )
Shutting down loopback insterface: [ OK ]
Bringing up loopback insterface: [ OK ]
Bringing up interface eth0: [ OK ]
[root@c1node01 ~]#

2. Another method is
ifconfig -a to check the ip and see if eh1 or eh0
causes this, because the corresponding Centos system is moved in the virtual machine (Vmware). file, when reconfiguring, the MAC address of the network card has changed, enter ifconfig -a, can not find eth0 · After installing a
centos

virtual machine, and copy it, the network card cannot be started normally after booting, and an error is reported : Device eth0 does not seem to be present,
delaying initialization

solution: # mv /etc/sysconfig/network-scripts/ifcfg-eth0 (viewed by vim in the source file)
/etc/sysconfig/network-scripts/ifcfg-eth1 (destination file, ifconfig -a)

vim
sysconfig/network-scripts/ifcfg-eth1
press i to enter edit
esc lock
: wq save and exit

: x save and exit
2. exit vi (last line mode)

  It is recommended to press the ESC key before exiting vi to ensure that the current state of vi is in command mode, and then type ":" (colon), and enter the following command to exit vi.

  (1) :w

  writes the content of the edit buffer to the file, and the new content replaces the original file. At this time, there is no exit from vi. You must enter the following commands to exit vi:

  :w filename (save the specified file)

  :q

  (2) :wq

  The above two steps can be combined into one step to complete, first execute w, then execute q.

  (3) and ZZ (note: there is no ":" in front of ZZ)

  functions are equivalent to (2).

  (4) :q! (or :quit)

  forcibly quit vi, so that the updated content is not written back to the file. When only typing the command :q, if vi finds that the text content has been changed, it will prompt the user to use the ":quit" command to exit.
esc exit

Modify DEVICE="eth0"
to DEVICE="eth1"

and then restart the network card and try the next

3.



    The operation before the failure is a little deeper than the first one: The

    DELL blade is installed with the operating system of CentOS6.3, and the network card recognizes the For em1 and em2, due to the work needs to adjust the slot, and start the blade



. Fault phenomenon:

after startup, the network is blocked. After logging in through iDRAC, the route is normal to check the default route;

restart the network service:

[root@nodeA ~]# service network restart Shutting down loopback insterface: [ OK ] Bringing up loopback insterface: [ OK ] Bringing up interface em1: Device em1 does not seem to be present,delaying initialization. [FAILED]



分析问题和解决:

之前在别的文章中我们提过70-persistent-net.rules文件,所以看了一下:

[root@nodeA ~]# vi /etc/udev/rules.d/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 0x14e4:0x163a (bnx2) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="24:b6:fd:ab:76:1e", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

NAME="em1" Save and exit~! [root@nodeA ~]#reboot ………………



















Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326992885&siteId=291194637