Set virtual machine to native networking (host only) mode

In order to realize the interconnection of the Linux system between the host and the virtual machine, the virtual machine can be set to achieve the purpose.

VMware has three network connection modes:
1. Host-only mode: that is, host_only, this mode only allows the virtual machine to communicate with the local physical machine and cannot access the Internet;
2. NAT mode: This mode retains the function of the host-only mode
3. Bridge mode: directly let the virtual machine use the network card of the local host to access the Internet .

First use the "host-only mode" to simply implement the communication between the virtual machine and the local physical machine

( Note: After installing VMware, the software will create two virtual network cards in the system, namely VMnet1 and VMnet8, where VMnet1 is only for host mode, and VMnet2 is for NAT mode ),

So we use host-only mode and only modify VMnet1.

Step 1: Open the VMware menu, [Virtual Machine] - [Settings], select the network link of the network adapter


Step 2: Open VMware, menu [Edit] - [Virtual Network Editor]


Step 3: Open the redhat installed in VMware, and set the ip address to the same network segment as VMnet1. as follows:


Open ifcfg-ens33, the default is to dynamically obtain the IP address, which can be manually set as follows (remember to be under the root user):


Step 4: Restart the network card, use the command systemctl restart network, and then check the local IP address to achieve interconnection.







Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324602374&siteId=291194637