VMware NAT Not Working on CentOS 7.9 and How to Configure Chinese Input

When a CentOS 7.9 virtual machine in VMware is set to NAT mode but still has no Internet access, the fastest way to diagnose the problem is to check whether ens33 has received an IPv4 address and whether the system has a default route.

In this case, ens33 was already in the UP state, yet it had no IPv4 address. Running dhclient showed repeated DHCPDISCOVER messages followed by No DHCPOFFERS received. That result narrowed the problem down to VMware NAT, VMnet8, or the VMware DHCP service.

A second issue appeared after networking was being configured. The GNOME Settings application on CentOS 7.9 would not open, so Chinese input had to be configured directly through IBus and command-line tools.

!:chatgpt-content-reference{index=”0″}

Why CentOS 7.9 Has No Internet Even When VMware NAT Is Connected

If VMware shows the virtual network adapter as connected, that only confirms the virtual NIC is attached. CentOS still needs an IPv4 address and a valid default gateway before it can access the network.

Start with

ip addr

The important part of the actual output was

2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0c:29:28:39:f7 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::7d1:edff:e413:4732/64 scope link noprefixroute
       valid_lft forever preferred_lft forever

This confirms that ens33 is active and that the virtual link itself is up.

The missing part is an IPv4 address similar to

inet 192.168.xxx.xxx/24

The same machine also had a virbr0 interface

3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 52:54:00:9d:1d:8f brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0

The 192.168.122.1 address can be misleading during troubleshooting. For VMware NAT access in this setup, ens33 is the interface that matters.

Next, check the routing table.

ip route

The system returned only

192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1

A working VMware NAT configuration would normally include a default route similar to

default via 192.168.xxx.2 dev ens33

There was no default route, and ens33 had no IPv4 address. At this stage, DNS is not the first thing to troubleshoot. The VM has not yet received the basic network configuration required to reach the Internet.

How to Use dhclient to Find the VMware NAT Problem

Once ens33 is confirmed to have no IPv4 address, manually requesting a DHCP lease is one of the quickest ways to find out whether the problem is inside CentOS or on the VMware side.

Run

sudo dhclient -v ens33

The actual output was

Internet Systems Consortium DHCP Client 4.2.5
Copyright 2004-2013 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/ens33/00:0c:29:28:39:f7
Sending on   LPF/ens33/00:0c:29:28:39:f7
Sending on   Socket/fallback
DHCPDISCOVER on ens33 to 255.255.255.255 port 67 interval 8 (xid=0x330b75e6)
DHCPDISCOVER on ens33 to 255.255.255.255 port 67 interval 12 (xid=0x330b75e6)
DHCPDISCOVER on ens33 to 255.255.255.255 port 67 interval 12 (xid=0x330b75e6)
DHCPDISCOVER on ens33 to 255.255.255.255 port 67 interval 18 (xid=0x330b75e6)
DHCPDISCOVER on ens33 to 255.255.255.255 port 67 interval 11 (xid=0x330b75e6)
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

The key message is

No DHCPOFFERS received.

CentOS successfully sent DHCP discovery packets through ens33, yet no DHCP server responded with an offer.

That shifts the investigation toward the VMware host configuration.

A healthy DHCP exchange would normally progress through stages similar to

DHCPDISCOVER
DHCPOFFER
DHCPREQUEST
DHCPACK
bound to 192.168.xxx.xxx

In this case, the process stopped after DHCPDISCOVER.

How to Check VMware DHCP Service and NAT Service

When VMware NAT is selected and the guest receives no DHCP offer, check the VMware networking services on the Windows host.

Press

Win + R

Enter

services.msc

Find these services

VMware DHCP Service
VMware NAT Service

Both services should be running.

If either service is stopped, start it. If both are already running, restart them and test DHCP again.

The startup type can also be checked and set to automatic.

Back in CentOS, release any existing lease and request a new one.

sudo dhclient -r ens33
sudo dhclient -v ens33

If the VMware DHCP service is working again, the output should begin showing DHCPOFFER, DHCPACK, and a final bound to message.

Where to Find VMware Virtual Network Editor

A common point of confusion is the location of VMware Virtual Network Editor. It is not inside the individual virtual machine settings window.

In VMware Workstation, return to the main application window and open

Edit
→ Virtual Network Editor

On a localized interface, the same menu may appear as the equivalent of Virtual Network Editor.

If the menu item is missing, search Windows for

Virtual Network Editor

You can also check whether this executable exists

C:\Program Files (x86)\VMware\VMware Workstation\vmnetcfg.exe

If vmnetcfg.exe is present, run it as administrator.

Some installations show a button for elevated settings inside Virtual Network Editor. Use that before changing VMnet8.

What to Check in VMware VMnet8

For a virtual machine using NAT, VMnet8 is the network that needs the most attention.

Select

VMnet8

The network type should be

NAT

Also confirm that the options corresponding to the following functions are enabled

Connect a host virtual adapter to this network
Use local DHCP service to distribute IP addresses to VMs

The DHCP option is especially important in this case.

If CentOS repeatedly sends DHCPDISCOVER packets while VMware is not providing DHCP on VMnet8, the guest will never receive an IPv4 address automatically.

VMnet8 will also have a subnet configuration similar to

Subnet IP
192.168.233.0

Subnet mask
255.255.255.0

The actual subnet can be different.

Open the NAT settings and check the gateway. A typical value may look like

Gateway IP
192.168.233.2

Then check the DHCP address pool. It may look like

Starting IP
192.168.233.128

Ending IP
192.168.233.254

If the NAT, DHCP, or VMnet8 configuration has become inconsistent, Virtual Network Editor also provides an option to restore the default virtual network configuration.

How to Check VMware Network Adapter VMnet8 in Windows

VMnet8 can also be checked from the Windows network adapter list.

Press

Win + R

Enter

ncpa.cpl

Look for

VMware Network Adapter VMnet8

The adapter should be enabled.

Its IPv4 configuration may look similar to

192.168.233.1
255.255.255.0

If the VMware NAT gateway is using

192.168.233.2

then .1 and .2 are simply different addresses inside the same VMnet8 subnet.

After checking the host-side adapter, return to CentOS and request DHCP again.

sudo dhclient -r ens33
sudo dhclient -v ens33

How to Verify That VMware NAT Is Working Again

Once DHCP starts responding, confirm that ens33 has actually received an IPv4 address.

Run

ip addr show ens33

A working result should include something similar to

inet 192.168.233.xxx/24

Then check the routing table.

ip route

You should see a default route similar to

default via 192.168.233.2 dev ens33

Network testing can then be done in three stages.

First, test the VMware NAT gateway.

ping -c 4 192.168.233.2

Next, test a public IP address.

ping -c 4 8.8.8.8

Finally, test DNS resolution.

ping -c 4 www.baidu.com

These tests make it much easier to identify where a remaining failure occurs.

Test result Next area to check
ens33 has no IPv4 address DHCP
No default via entry Routing
Gateway works but public IP fails VMware NAT
Public IP works but domain name fails DNS
dhclient receives no DHCPOFFER VMware DHCP service and VMnet8

How to Make ens33 Get an IP Address Automatically After Reboot

If VMware DHCP starts working but CentOS loses networking again after reboot, check the persistent configuration for ens33.

Run

cat /etc/sysconfig/network-scripts/ifcfg-ens33

For DHCP-based VMware NAT networking, the important settings are

ONBOOT=yes
BOOTPROTO=dhcp

If you find

ONBOOT=no

change it to

ONBOOT=yes

If the interface is expected to use DHCP and the file contains

BOOTPROTO=none

or

BOOTPROTO=static

change it to

BOOTPROTO=dhcp

Restart NetworkManager after editing the configuration.

sudo systemctl restart NetworkManager

Then verify the interface and route again.

ip addr show ens33
ip route

This check is most useful when VMware DHCP is responding correctly but CentOS fails to request an address automatically during startup.

How to Install Chinese Pinyin Input on CentOS 7.9

Once networking is available, Chinese input on a CentOS 7.9 graphical desktop can be configured with IBus and ibus-libpinyin.

Install the required packages.

sudo yum install -y ibus ibus-libpinyin im-chooser

Then open the IBus configuration window directly.

ibus-setup

Inside IBus Preferences, add

Input Method
→ Add
→ Chinese
→ Intelligent Pinyin

After that, run

im-chooser

Select IBus as the input method.

Log out and sign in again, or reboot the system.

sudo reboot

After logging back in, try switching input methods with

Ctrl + Space

or

Super + Space

Super refers to the Windows key on a standard PC keyboard.

How to Configure Chinese Input When GNOME Settings Will Not Open

CentOS 7.9 does not require GNOME Settings to configure IBus.

If the normal Settings application cannot be opened, run

ibus-setup

This provides direct access to the IBus input method configuration.

If ibus-setup also does not work correctly, start the IBus daemon manually.

ibus-daemon -drx

Then list the available input engines.

ibus list-engine

If the output contains

libpinyin

switch to it directly.

ibus engine libpinyin

You can also check the input method environment variable.

echo $XMODIFIERS

An IBus-based configuration may return

@im=ibus

If the goal is to troubleshoot the GNOME Settings application itself, start it from a terminal.

gnome-control-center

Any error printed in the terminal gives you more information than clicking the Settings icon and seeing no visible response.

Can Chinese Be Entered in a CentOS Terminal

This depends on which type of terminal you are using.

If you are inside GNOME Terminal or another graphical application under the CentOS desktop, IBus can provide Chinese input there.

If you are using a plain text console without the graphical desktop, the practical option described here is to type Chinese on the Windows or macOS host and paste it through an SSH client or another terminal interface.

Checking whether the machine is running a graphical desktop or a text-only console can save time before configuring IBus.

Quick Troubleshooting Checklist

  1. Confirm that the VMware virtual network adapter is connected and set to NAT.
  2. Run ip addr inside CentOS.
  3. Check whether ens33 has an IPv4 address.
  4. Run ip route and look for a default route.
  5. Run sudo dhclient -v ens33.
  6. If you get No DHCPOFFERS received, check VMware DHCP Service.
  7. Check VMware NAT Service.
  8. Open VMware Virtual Network Editor and inspect VMnet8.
  9. Confirm that VMnet8 uses NAT and local DHCP.
  10. Open ncpa.cpl in Windows and verify that VMware Network Adapter VMnet8 is enabled.
  11. Request a new DHCP lease in CentOS.
  12. Verify both the IPv4 address and default route.
  13. Install ibus, ibus-libpinyin, and im-chooser.
  14. Use ibus-setup to add Intelligent Pinyin.
  15. If GNOME Settings does not open, use ibus-setup, im-chooser, and gnome-control-center directly.

FAQ

Why does CentOS have no Internet even though ens33 shows UP

UP confirms that the interface is enabled. In this case, ens33 still had no IPv4 address and the system had no default route, so Internet access could not work.

Why does virbr0 have 192.168.122.1 while VMware NAT still fails

The VMware NAT connection in this setup uses ens33. The address on virbr0 does not replace the IPv4 address that ens33 needs from VMware DHCP.

What does No DHCPOFFERS received mean

It means the CentOS DHCP client sent discovery packets but did not receive a DHCP offer. In this case, the next places to inspect are VMware DHCP Service, VMnet8, and the NAT configuration.

Where is VMware Virtual Network Editor

Return to the VMware Workstation main window and open Edit → Virtual Network Editor. If it is missing, search Windows for Virtual Network Editor or check for vmnetcfg.exe in the VMware Workstation installation directory.

Should I change DNS when dhclient receives no DHCP offer

DNS troubleshooting comes later. If ens33 has no IPv4 address and the system has no default route, DHCP and routing need to work first.

Can Chinese input be configured without GNOME Settings

Yes. Install IBus and ibus-libpinyin, then run ibus-setup directly.

How can I confirm that the Pinyin engine is installed

Run

ibus list-engine

If libpinyin appears in the result, you can activate it with

ibus engine libpinyin