centos7 clone a virtual machine

First, create a virtual machine (initialization)

 

 

 

Second, the clone
right "Settings" clone (clone full virtual machine)
Third, the new generation of MAC to update the configuration file (a new clone virtual machines need to update the MAC configuration file)

 

 

 

Four, vi / etc / sysconfig / network-scripts / ifcfg-ens32, edit the configuration file

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 查看是否成功

Guess you like

Origin www.cnblogs.com/mufeng07/p/12150766.html