详解centos复制克隆改网卡虚拟机克隆后修改网卡




详解centos复制克隆改网卡虚拟机克隆后修改网卡

2022-07-20 21:04:54 网络知识 官方管理员

本文将详细的为大家具体的介绍关于centos复制克隆改网卡,希望可以帮助到大家,一起来看看吧。

1.备份etc/udev/rules.d/70-persistent-net.rules

[root@SRD999/]#cdetc/udev/rules.d/

[root@SRD999rules.d]#ls

60-fprint-autosuspend.rules70-persistent-net.rules98-kexec.rules

60-pcmcia.rules90-alsa.rules99-fuse.rules

60-raw.rules90-hal.rules

70-persistent-cd.rules97-bluetooth-serial.rules

[root@SRD999rules.d]#cp70-persistent-net.rules70-persistent-net.rules.bak

2.修改配置文件

[root@SRD999rules.d]#vi70-persistent-net.rules

删掉eth0那行

将eth1改成eth0

修改前

centos克隆系统,centos复制克隆改网卡

修改后

删掉eth0那行

将eth1改成eth0

centos克隆系统,centos复制克隆改网卡

修改etc/sysconfig/network-scripts/ifcfg-eth0将HWADDR改成上面那个信息,就是MAC地址,并配置IP地址等信息

[root@SRD999/]#vietc/sysconfig/network-scripts/ifcfg-eth0

更改前

centos克隆系统,centos复制克隆改网卡

更改后

centos克隆系统,centos复制克隆改网卡

重启网卡

[root@SRD999/]#servicenetworkrestart

Shuttingdownloopbackinterface:[OK]

Bringinguploopbackinterface:[OK]

Bringingupinterfaceeth0:Activeconnectionstate:activated

Activeconnectionpath:/org/freedesktop/NetworkManager/ActiveConnection/1

[OK]

[root@SRD999/]#

安装telnet

[root@SRD999/]#yum-yinstalltelnet*

Loadedplugins:fastestmirror,refresh-packagekit,security

Loadingmirrorspeedsfromcachedhostfile

*base:mirrors.opencas.cn

*extras:mirrors.zju.edu.cn

*updates:mirrors.zju.edu.cn

SettingupInstallProcess

ResolvingDependencies

-->Runningtransactioncheck

--->Packagetelnet.x86_641:0.17-48.el6willbeinstalled

--->Packagetelnet-server.x86_641:0.17-48.el6willbeinstalled

-->ProcessingDependency:xinetdforpackage:1:telnet-server-0.17-48.el6.x86_64

-->Runningtransactioncheck

...............................................................

[root@SRD999/]#cdetc/xinetd.d

[root@SRD999xinetd.d]#ls

chargen-dgramdaytime-streamecho-dgramtcpmux-servertime-stream

chargen-streamdiscard-dgramecho-streamtelnet

daytime-dgramdiscard-streamrsynctime-dgram

[root@SRD999xinetd.d]#cptelnettelnet.bak备份

[root@SRD999xinetd.d]#vitelnet

[root@SRD999xinetd.d]#

将disable改成no

修改前

centos克隆系统,centos复制克隆改网卡

修改后

centos克隆系统,centos复制克隆改网卡

重启服务

[root@SRD999/]#servicexinetdrestart

Stoppingxinetd:[FAILED]

Startingxinetd:[OK]

[root@SRD999/]#servicexinetdrestart

Stoppingxinetd:[OK]

Startingxinetd:[OK]

[root@SRD999/]#

开放防火墙后就可以通过telnet登录系统


发表评论:

最近发表
网站分类
标签列表