To create a Linux virtual machine nic with a template eth0 invalid workaround

Source: Internet
Author: User
Problem Description:
After deploying the system using the Linux virtual machine template, Ifconfig–a was used, no eth0 was found, eth1 was found, there was a ifcfg-eth0 file under/etc/sysconfig/network/, but no ifcfg-eth1 files.

Solution:
Method One: When you create a template virtual machine, the 70-persistent-net.rules file is deleted before it is created as a template VM.
Method Two: Modify the 70-persistent-net.rules file
Open/etc/udev/rules.d/70-persistent-net.rules File

PCI device 0x1022:0x2000 (Pcnet32)

subsystem== "NET", action== "Add", drivers== "? *",
attr{address}== "00:0c:29:50:xx:xx", attr{type}== "1", name= "eth0"

PCI device 0x1022:0x2000 (Pcnet32)

subsystem== "NET", action== "Add", drivers== "? *",
attr{address}== "00:0c:29:36:xx:xx", attr{type}== "1", name= "eth1"
Remove the eth1 configuration and replace the MAC address of eth0 with the Eth1 MAC address
Restart the NIC

To create a Linux virtual machine nic with a template eth0 invalid workaround

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.