NIC clone Linux system settings

  Virtual machine cloning to create new ways to host, can greatly reduce the time and effort to install the host repeatedly consumed. But cloned host adapters, and profiles will change, give us a lot of trouble when the card is set in progress. This article from the title of the main Linux distributions in CentOS6 cloning host adapters, restored for our habit patterns, so you can easily set up a network card.

  During the installation of CentOS6 not described in detail in VMWare. Installation is set to bridge the virtual machine network adapter as follows:

 

 

  At this point look CentOS virtual system just installed the card information is as follows:

  First, the use dmesg to view the card information is as follows:

 

  See also under ifconfig familiar "eth0" card:

 

   In the / etc / sysconfig network-scripts / the / directory is familiar NIC configuration file "ifcfg-eth0"

 

   The most important thing is to see ifcfg-eth0 network card MAC address and the dmesg and ifconfig to see the MAC addresses are the same, the card number also are "eth0".

  We'll call this virtual machine machine, cloned an identical machine, as follows:

 

 

 

  Select "Next" in the "Clone Virtual Machine Wizard", then "Next"

 

 

 

  Later choose "create linked clones" or "create a full clone." Create a linked clone virtual machines dependent on the original system, take up less disk space; create a full clone can not rely on the original virtual machine is running, it takes up disk space required for complete virtual machine. Because in two ways not affect the normal use, we choose "create linked clones" and then "Next":

 

 

   Any virtual machine name, select a file clones folder, then complete:

 

 

 

   The New clone virtual machine configuration fully consistent with the original machine, but only a few differences in the boot to see it. Now we open the complete clone of the virtual machine:

 

   When using dmesg view card information, we note card information in more than a line , we are familiar with has been renamed become eth0 eth1:

 

 

   More than a "eth1"! Let us look at the other two card information. Under ifconfig see it is not familiar to us "eth0" card, but instead "eth1":

 

  

  In the / etc / sysconfig / network-scripts / directory is still the familiar card configuration file "ifcfg-eth0"

 

   But MAC address View "ifcfg-eth0" file are inconsistent with the above command dmesg and ifconfig command to see the MAC address. Thus, when we try to use the ifcfg-eth0 file to configure the machine card parameters ran into trouble, I would like to adjust the parameters of the virtual machine's IP address in accordance with their own ideas and so on, no matter what changes ifcfg-eth0 file is achieving its purpose.

  What causes it? When implementing VMware original clone, has the original MAC address of the virtual host has been modified to meet the uniqueness of the MAC address of any virtual hosts. But apparently did not follow the conventional method linux will iifcfg-ethX file is modified. Then ifcfg-ethX file does not play a role in the configuration of the network card in the machine cloning. To reinstate ifcfg-ethX role of a network configuration file, to the MAC address of the MAC to the document coincides with the above-described ifconfig displayed, then the option to make some modifications to the device are as follows:

  First, the MAC address ifcfg-ethX file to show the above-described ifconfig address, the contents of the modified file contents modification and completed the following command (NIC manually assign IP address 192.168.1.50):

 

 

 

 

  Modify the contents of the configuration file: HWADDR MAC address, to ensure consistency with the MAC address of the MAC address dmesg and ifconfig commands display; UUID rows deleted; BOOTPROTO changed to "none" means no use of automatic address assignment. IP network parameters are a new static address that host.

  The back is the most critical step: modify the network card device information. Enter the following command:

 

 

 

  Speaking earlier, there is a line in the cloning host using the dmesg command to view the card

  

  On behalf of cloning host has renamed the network card eth0 is eth1, so when modifying these documents, the original "NAME =" eth0 "" delete this line, the original "NAME =" eth1 "" read NAME = "eth0", save and exit. Restart clone virtual host. Then look ifconfig NIC configuration, the configuration has been completed in accordance with a fixed IP address is as follows ifcfg-eth0 file description:

 

   So that we can freely use the ip address ifcfg-eth0 to configure the host.

  Finally, if the host is added after the second or even third card, you can create a new ifcfg-eth1 and other documents, and then modify the contents of "70-persistent-net.rules" of these principles, reboot the host when finished card.

Guess you like

Origin www.cnblogs.com/phever/p/11824044.html