09.VMWare virtual machine copy after Nic is not a eth0 solution

Source: Internet
Author: User
Tags uuid

0. If the VM virtual machine has been copied, the network card is not eth0, look at the following 1---> Steps, if the copy will be copied, just look at the 1 line click I copy it. At this time the virtual opportunity at the boot time check whether the NIC address already exists, If it exists, generate another physical address and put the NIC eth0-->eht1; if it is duplicated multiple times will be eth1 ... The more you replicate the virtual machines, the larger the ifconfig you see. If you have copied the virtual machine but the NIC is not eth0, see below.

1. Generate the network card physical Address:

Copy it and use it later.
2. Modify the virtual machine NIC name $ vim/etc/udev/rules.d/70-persistent-net.rules leave the other comments off or delete only the last one, and you will find the address of the network card you just produced is here, modify the last parameter of the last line Name= " Eth0 ", 3. Then set a static IP by modifying the configuration file. If there is no ifcfg-eth0, create a new $ touch directlyIfcfg-eth0        #新建一个网卡配置文件modified to static IP, provided that you have to set the network segment of the virtual machine, do not set the network segment that can also use the default Nat vm-8 NIC $ ifconfig        #查看网段, Gateway$ vim/etc/sysconfig/network-scripts/ifcfg-eth0        #把内容全删了, copy the following, change the IP, and the gateway and host name and network card address UUID to change the lineThe last UUID can generate one online:Https://www.guidgenerator.com/online-guid-generator.aspx Network card AddressHWADDRThat is, the last line in/etc/udev/rules.d/70-persistent-net.rules, that is, its own virtual machine generatedThe last reboot takes effect, restarting the NIC has some problems, it is best to restart the operating system.
  1. DEVICE="eth0"
  2. BOOTPROTO="static"
  3. DNS1="1.2.4.8"
  4. DNS2="114.114.114.114"
  5. GATEWAY="192.168.2.1"
  6. HOSTNAME="hadoop004"
  7. HWADDR="00:50:56:3C:0C:D0"
  8. IPADDR="192.168.2.5"
  9. IPV6INIT="yes"
  10. MTU="1500"
  11. NETMASK="255.255.255.0"
  12. NM_CONTROLLED="yes"
  13. ONBOOT="yes"
  14. TYPE="Ethernet"
  15. UUID="a74c2f11-2b54-4ba7-a222-aaa607fd25fb"
4. How to change your own virtual machine network segment



From for notes (Wiz)



09.VMWare virtual machine copy after Nic is not a eth0 solution

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.