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
  • 相关阅读:
    OCP-1Z0-053-V13.02-702题
    OCP-1Z0-053-V13.02-688题
    OCP-1Z0-053-V13.02-691题
    OCP-1Z0-053-V13.02-698题
    OCP-1Z0-053-V13.02-703题
    OCP-1Z0-053-V13.02-701题
    OCP-1Z0-053-V13.02-685题
    memcached 按键查找和批量查找
    catch(CException *e)捕获异常
    char数组最大长度
  • 原文地址:https://www.cnblogs.com/fyy-hhzzj/p/vmware_.html
Copyright © 2011-2022 走看看