Windows builds VMware virtual machine server for LAN access

To build a virtual machine server that can be accessed by a LAN, you first need to install the VMware virtual machine on the host machine and create a virtual machine server (skip this step directly)

Start configuration after the virtual machine is created

1. View the host's ip address and related gateway and subnet mask information

Insert picture description here
PS: Because my local host is connected to the local area network through WIFI, so the local local area network

The IP is: 192.168.0.158, the
subnet mask is: 255.255.255.0, and the
default gateway is: 192.168.0.1. The
above information is important information for subsequent configuration.

2. Configure the network address of the virtual machine

Insert picture description here

Right-click to view properties after selecting VMnet8, select Tcp/IPv4 and double-click

Insert picture description here

And configure the IP address to any unused IP in the local area network, and then the subnet mask is the same as the default gateway and the host machine:
PS: I found an IP of 10 here
Insert picture description here

3. Configure the server

Open the virtual machine, select settings, configure the network configuration of the virtual machine
Insert picture description here

Modify the virtual machine's network adapter to bridge mode
Insert picture description here

4. Bring up the network editor of the virtual machine and modify the network information of the virtual machine

Insert picture description here

Select the bridged network card after selecting the bridge mode
Insert picture description here

PS: This is more important. The options that may be bridged to on different hosts are different. Just find out if there is an option with Wireless.

5. Configure the network card information of the virtual machine

1. Pass

ip addr

Query the network card information of the virtual machine
Insert picture description here

Here our network card is ens33, and his mac address is: 00:0c:29:6c:29:fc

2. Edit the network card configuration of the virtual machine:

[root@Frznkj-Server home]# vim /etc/sysconfig/network-scripts/ifcfg-ens33

Set ONBOOT to yes,
BOOTPROTO to dhcp, and
HWADDR to the mac address you just saw. If you don’t change the attribute, add a change attribute

If you need to pull down the IP of the virtual machine, you only need to add the following information in the ifcfg-ens33 file.

IPADDR=192.168.0.128
GATEWAY=192.168.0.1
NETMASK=255.255.255.0

The GATEWAY and NETMASK should be consistent with the host, and IPADDR should take an IP that no one uses in the LAN.
3. Restart the virtual machine network service

[root@Frznkj-Server home]# systemctl restart network

So far, the virtual machine can be accessed by any computer in the LAN

Guess you like

Origin blog.csdn.net/m0_46700792/article/details/108658378