Linux Cloning Technology

Source: Internet
Author: User

After installing the CentOS6.5 system in VMware virtual machines, the purified system clones several out to facilitate the later test. Cloning step is very simple, the problem after cloning is the cloned Nic MAC address and the original system MAC address, there will be a conflict in the LAN, you need to change the cloned MAC address.

Explain: In fact, after the clone system has two Nic Eth0 and eth1, the actual effect is Eth1,eth0 is cloned. The clone system will regenerate a MAC address because the system will become eth1 in eth0 plus 1.

Here's how it works:
Software Environment: VMware Workstation 10.0 Virtual Machine CentOS 6.5 physical Machine Windows7

1, first enter the original system, use the command to view the network card information
#ifconfig

Default system boot does not load network card, see eth0 information

650) this.width=650; "src=" Http://www.linuxidc.com/upload/2015_03/15031418132128.jpg "alt=" VMware Virtual machine cloning CentOS 6.5 After the NIC modification method "align=" middle "/>

Run command
# Vi/etc/sysconfig/network-scripts/ifcfg-eth0

View the MAC address of the ETH0 network card

Device=eth0
Hwaddr=00:0c:29:16:f4:f0
Type=ethernet
uuid=0b1f4512-cefa-4a9e-ae85-adb2ac2a9903
Onboot=no
Nm_controlled=yes
Bootproto=dhcp

Modifying this onboot=yes setting will load the NIC information
Edit complete, Esc key exit, enter: Wq save exit.

2, the same steps into the clone system, check the network card address, found the same MAC address
Perform
#/etc/init.d/network Restart

Restart Network Service

Hint failed failed

650) this.width=650; "src=" Http://www.linuxidc.com/upload/2015_03/15031418138796.jpg "alt=" VMware Virtual machine cloning CentOS 6.5 After the NIC modification method "Width=" 706 "vspace=" 5 "align=" Middle "/>

3. Edit the network card device
# Vi/etc/udev/rules.d/70-persistent-net.rules

When the following appears, you will see that there are 2 NICs eth0 and Eth1,eth0 for the clone system, eth1 for regeneration
# PCI device0x1022:0x2000 (Pcnet32)
subsystem== "NET", action== "Add", drivers== "? *", attr{address}== "00:0c:29:16:f4:f0", attr{type}== "1", kernel== "eth*" , name= "Eth0"

# PCI device0x1022:0x2000 (Pcnet32)
subsystem== "NET", action== "Add", drivers== "? *", attr{address}== "00:0c:29:52:45:97", attr{type}== "1", kernel== "eth*" , name= "Eth1"

Before adding # comment out the first network card, change the 2nd NIC to eth0, record the MAC address.
# PCI device0x1022:0x2000 (Pcnet32)
#SUBSYSTEM = = "NET", action== "Add", drivers== "? *", attr{address}== "00:0c:29:16:f4:f0", attr{type}== "1", kernel== "eth* ", name=" eth0 "

# PCI device0x1022:0x2000 (Pcnet32)
subsystem== "NET", action== "Add", drivers== "? *", attr{address}== "00:0c:29:52:45:97", attr{type}== "1", kernel== "eth*" , name= "Eth0"
Edit complete, Esc key exit, enter: Wq save exit.

4. Implementation
#/etc/init.d/network restart

Restart Network Service

Or the hint failed,
#reboot

The problem with rebooting the system is solved.

5. After rebooting the system, run the command
1 #vi/etc/sysconfig/network-scripts/ifcfg-eth0

Modify the MAC Address "00:0c:29:16:f4:f0" to "00:0c:29:52:45:97" to save the exit.
Perform
1 #/etc/init.d/network Restart

Restart Network Service

It's not going to fail now.


Linux Cloning Technology

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.