While using a Kali Linux VM on VMWare Player, faced issues connecting to the internet from the VM.

The VM Settings have Network Adapter = NAT

Found after troubleshooting:

ifconfig was not showing eth0 (only lo) (refer to 1 in Image 1)

Got an idea to UP this by: https://reachsibi.wordpress.com/2021/01/08/how-to-fix-the-error-network-unreachable-when-you-ping-any-domain-computer-in-kali-linux-2020/

Then this post here was useful to figure out that need to execute:

sudo dhclient eth0

Summary:

  1. Check ifconfig shows eth0. If not, follow next steps.
  2. ifconfig eth0 up to ‘up’ the eth0
  3. recheck if eth0 is up
  4. sudo dhclient eth0

enabling-eth0-and-