VMware centos VM Replication

Source: Internet
Author: User

The biggest advantage of using a virtual machine is that the virtual machine files can be copied to another machine, and colleagues can quickly clone multiple virtual machines from one virtual machine as the source. I often use this method when building some cluster solutions this year, but I also encountered some problems. Here is a list:

1.Unable to connect to the network after Replication.

If we useIfconfigCommand to view the system network configuration, you will find that no Nic is activated, usually shown:

But if we use the commandIfconfig-View, usually see an inactive network card, the general name is eth1, of course, it may also be eth2 or eth3.

If the network card name of the source machine we copied is eth0, eth1 is usually displayed here. If the source machine is eth1, eth2 is generally used here. This is the NIC automatically generated after the VM is copied, and the address is changed. To activate this new Nic, We must configure it.

First jump to the network configuration directory:
CD/etc/sysconfig/network-scripts/
Then ls will see the file ifcfg-eth0, this is the source machine Nic configuration file, we need to add a configuration file to start the new Nic.
CP ifcfg-eth0 ifcfg-eth1
VimIfcfg-eth1
The edited content is generally as follows:

Device ="Eth0"
Hwaddr ="00: 0C: 29: 97: 82: A0"
Bootproto = DHCP
Nm_controlled = "yes"
Onboot = "yes"

you need to edit the highlighted blue part. The first part is changed to Nic name . Change the second to physical address , and then exit WQ. Run the following command to restart the network:
/etc/init. d/network restart
and run the ifconfig command to check whether the eth1 Nic has an IP address, if you do not have one, you can reboot and restart the machine.

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.