When we do distributed test, a plurality of nodes (VM), in addition to re-install a virtual machine, it can also be cloned new virtual machine from one virtual machine image
In this example the virtual machine from a clone named master1 named node1
Enter a new virtual machine name and file storage path
Then start cloning, take some time
Cloning is complete, the start of a new virtual machine (node1) Set
Set to use the card generates a new mac address, and copy it back
Node1 start and entry system
Locate the file / etc / sysconfig / network-scripts / ifcfg - ***, start editing (requires root)
PS: filename uncertain, because the format of the file name is followed by the beginning of the back ifcfg- card name, for example, my card file name is the so called ens33 figure below
Then the file contents may be different (see my other articles on the Internet is not the same with me)
To do a few things:
- Set a fixed ip ip (in my case the original or dynamic ip, so just to set up, is not required. Item no to add)
PS: Do not expand specific values, like the meaning of the windows system
BOOTPROTO = "static" # use a static IP address, default to dhcp
IPADDR = "192.168.31.142" # set a static IP address
NETMASK = "255.255.255.0" # Subnet Mask
GATEWAY = "192.168.31.1" # gateway address
DNS1 = "114.114.114.114" # DNS server
2. Delete the UUID, HWADDR other items (on behalf of the network card mac address or a unique id)
Command Line service network restart to restart the network card
Delete files /etc/udev/rules.d/70-persistent-net.rules
Then modify the machine name, the command line: hostnamectl set-hostname node1
PS: node1 machine name on behalf of the newly named
Then modify the hosts file in / etc / hosts
Add a new line at the bottom, the format is: ip + space + machine name
到此完成克隆。当所有节点克隆好后,可以互ping来监测网络是否配置好