zoukankan      html  css  js  c++  java
  • 克隆虚拟机出现的网卡错误

    cat /etc/udev/rules.d/70-persistent-net.rules

    # This file was automatically generated by the /lib/udev/write_net_rules
    # program, run by the persistent-net-generator.rules rules file.
    #
    # You can modify it, as long as you keep each rule on a single
    # line, and change only the value of the NAME= key.
    
    # PCI device 0x8086:0x100f (e1000)
    # PCI device 0x8086:0x100f (e1000)
    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:75:d1:d7", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

    看到这个文件的name字段后面写的是什么你就编辑一下你的网卡   vi /etc/sysconfig/network-scripts/ifcfg-eth0,只需要把DEVICE=eth0  ,改成/这个文件/etc/udev/rules.d/70-persistent-net.rules的et后面的name字段就好了,这里是eth1,所以你的ifcfg-eth0的内容应该是这样的,编辑完了之后就把/etc/udev/rules.d/70-persistent-net.rules文件删除,重启服务service network restart

    [root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
    
    DEVICE=eth1
    TYPE=Ethernet
    IPADDR=192.168.0.5
    NETMASK=255.255.255.0
    GATEWAY=192.168.0.1
    ONBOOT=yes
    NM_CONTROLLED=yes
    BOOTPROTO=static
  • 相关阅读:
    P2168 [NOI2015]荷马史诗
    P3195 [HNOI2008]玩具装箱TOY
    P1972 [SDOI2009]HH的项链
    P2339 提交作业usaco
    P3974 [TJOI2015]组合数学
    P2831 愤怒的小鸟
    [校内模拟题4]
    P3952 时间复杂度
    P3531 [POI2012]LIT-Letters
    2019.10.1 qbxt模拟题
  • 原文地址:https://www.cnblogs.com/fyy-hhzzj/p/vmware_.html
Copyright © 2011-2022 走看看