I few days ago I’ve started a new benchmark of VMWARE Server running on Linux no GUI (text only). Unfortunately there is no good documents regarding the manual networking configuration for VMWARE Workstation 12.5.5, therefore I’ve decided explain a little bit.
I’m using a UBUNTU 16.04.2 server LTS, only text and found a situation when I’ve started a network configuration for 2 NICs. Until now I’ve used the VMware network configation tool to setup the network, but I cant do it anymore, there is only text mode available. Of course it was my first time configuring VMWare on text mode and I spend some time to understand.
The VMWare networking configuration is stored in the following folder on Ubuntu:
There are some files related to the configuration and two of them are related to the network:
Both are necessary to configure the network.
My system has 2 NICs and I want to set them as bridge.
First of all, stop vmware services typing the following command.
sudo vmware-networks –stop
Change the file networking.
sudo nano /etc/vmware/networking
When your system is new, probably you will find something like the configuration below:
answer VNET_1_DHCP yes
answer VNET_1_DHCP_CFG_HASH A0A27BDE00F200EC8A8A33C78C2FE470F70B5913
answer VNET_1_HOSTONLY_NETMASK 255.255.255.0
answer VNET_1_HOSTONLY_SUBNET 192.168.106.0
answer VNET_1_VIRTUAL_ADAPTER yes
answer VNET_8_DHCP yes
answer VNET_8_DHCP_CFG_HASH BD4BA5BF4519EA76ADECC761036E849493361616
answer VNET_8_HOSTONLY_NETMASK 255.255.255.0
answer VNET_8_HOSTONLY_SUBNET 192.168.158.0
answer VNET_8_NAT yes
answer VNET_8_VIRTUAL_ADAPTER yes
Lets add new NICs as Bridge
answer VNL_DEFAULT_BRIDGE_VNET -1
add_bridge_mapping enp2s0 0
add_bridge_mapping enp5s0 2
The line add_bridge_mapping enp2s0 0 will define a custom bridge for vmnet 0, see below:
enp2s0 = NIC, it could be eth0!
enp2s0 0 = tells to vmware use the NIC enp2s0 as bridge on vmnet0.
The second line: add_bridge_mapping enp5s0 2
NIC enp5s0 will be a bridge for vmnet2.
Changing the /etc/vmware/netmap.conf
network0.name = “Bridged”
network0.device = “vmnet0”
network1.name = “HostOnly”
network1.device = “vmnet1”
network2.name = “VMNet2”
network2.device = “vmnet2”
network8.name = “NAT”
network8.device = “vmnet8”
Change or add only the bold lines.
It’s time to test, therefore start vmware network services.
sudo vmware-networks –start
You can use the command vmware-networks –status in order to check the network status, see the example below: