How to make a virtual machine created in the smooth flow of network Vmware15

How to make a virtual machine created in the smooth flow of network Vmware15

first step:Experimental conditions:

  • In Vmware15 new virtual machine, card mode should be selected bridge mode
  • View card mode: To view the selected virtual machine - settings - to view network adapter: bridge mode
    Here Insert Picture Description

Step Two: View windows on current network conditions

  • win + r type cmd, and the windows open shell
  • ipconfig/all
 C:\Users\kiosk>ipconfig/all

Here Insert Picture Description
Here Insert Picture Description
Note knowledge points:

  • ipconfig query network status in the windows
  • ifconfig query network status in linux virtual machine
  • Underlined when windows at Chinese input, enter key does not display the results
  • Network status Note IP address, gateway, DNS
  • Different IP addresses and the real host, gateway, and DNS some real host and the same!
  • As shown, the real IP address of 192.168.43.1

rhel7 enterprise setting 7

The third step: change the hostname

hostnamectl set-hostname rhel7_node1.westos.com

After closing the current terminal, re-open the terminal, to set a good hostname
Here Insert Picture Description
Step four:

  • Enter the directory
[root@rhel7_node1 ~]# cd /etc/sysconfig/network-scripts/

Here Insert Picture Description

  • View directory contents ls

Here Insert Picture Description

  • View Card name
    ifconfig view network conditions, see the name of the NIC is ens33
    ip addr Show with ifconfig can view the card name
[root@rhel7_node1 network-scripts]# ifconfig

or

[root@rhel7_node1 network-scripts]# ip addr show

Here Insert Picture Description
Here Insert Picture Description
Step Five: Remove the existing card file, write new content

rm -fr ifcfg-ens33 
vim ifcfg-ens33

Card file contents

DEVICE=ens33
IPADDR=192.168.43.10
NETMSAK=255.255.255.0
GATEWAY=192.168.43.1
DNS1=192.168.43.1
ONBOOT=yes

Step Six: Close the Network Manager + + to restart the network open Network Manager

  systemctl stop NetworkManager
  systemctl restart network
  systemctl start NetworkManager

Step Seven: Are there any success View Network

[root@rhel7_node1 ~]# nmcli connection show

Here Insert Picture Description
Step eight: to verify it!

  • 192.168.43.10 not provided before the network (i.e. the network is not in use), the real machine (i.e. windows) ping different 192.168.43.10
  • Set rhel7_node1 network 192.168.43.10
  • Real machine can ping the virtual machine rhel7_node1
    Here Insert Picture Description
    Step 9: eight complete enterprise configuration
    Configuration file contents
DEVICE=ens160
ONBOOT=yes
BOOTPROTO=none
IPADDR=192.168.43.11
NETMSAK=255.255.255.0
GATEWAY=192.168.43.1
DNS1=192.168.43.1

7 and 8 enterprise business substantially similar, the difference is: rewrites the file, restart the network in different ways
Eight companies use NetworkManger work

  systemctl restart NetworkManager  重启网络管理器
  nmcli connection show 查看时候生效

Here Insert Picture Description

Published 11 original articles · won praise 3 · Views 530

Guess you like

Origin blog.csdn.net/baidu_40389082/article/details/104270476