centos7克隆虚拟机

一、创建一个虚拟机(初始化)

二、克隆
右键》设置》克隆   (克隆完整虚拟机)
三、更新新生成的MAC到配置文件  (新克隆的虚拟机都需要更新MAC到配置文件)

四、vi /etc/sysconfig/network-scripts/ifcfg-ens32  ,编辑配置文件

TYPE="Ethernet"
BOOTPROTO="static"
DEVICE="ens32"
ONBOOT="yes"
IPADDR="192.168.0.111"
NETMASK="255.255.255.0"
GATEWAY="192.168.0.1"
DNS1="8.8.8.8"
DNS2="114.114.114.114"

五、关闭防火墙(开机禁用)

启动: systemctl start firewalld
关闭: systemctl stop firewalld
查看状态: systemctl status firewalld 
开机禁用  : systemctl disable firewalld
开机启用  : systemctl enable firewalld

六、设置主机名(first1)

hostnamectl  set-hostname  first1

七、重启网络

systemctl restart network.service

可以用ip addr 查看是否成功

猜你喜欢

转载自www.cnblogs.com/mufeng07/p/12150766.html