VMWare Workstation Pro: Resolving Static IP Assignment Issue with Two VMs (Kali Ubuntu)

Abstract: Fix static IP assignment failures for Kali and Ubuntu VMs in VMware Workstation by configuring NAT mode and disabling DHCP.

Created: 2026-10-05 by
To resolve static IP assignment issues for Kali and Ubuntu VMs in VMware Workstation Pro, you must ensure the virtual network adapter is correctly configured to use NAT or Host-Only mode rather than Bridged. This prevents IP conflicts with your physical router and allows manual configuration within the guest OS without losing connectivity.

Understanding the Network Adapter Configuration

The root cause of most static IP failures in VMware involves a mismatch between the host’s virtual network settings and the guest operating system’s expectations. By default, new virtual machines often receive an IP address via DHCP from VMware’s internal server. When you attempt to switch to a static IP, the connection drops if the underlying virtual network (such as vmnet8) is not properly mapped to your host machine’s physical interface. VMware Workstation uses several virtual networks. The most common are:
  • vmnet0 (Bridged): Connects the VM directly to the host’s physical network. If your physical router assigns IPs dynamically, setting a static IP in the VM can conflict with the router’s DHCP pool or fail if the VM cannot reach the gateway.
  • vmnet1 (Host-Only): Creates an isolated network between the host and VMs. No external internet access is provided by default unless NAT is enabled.
  • vmnet8 (NAT): Allows VMs to access the internet through the host’s IP while keeping them isolated from the local LAN. This is the recommended mode for development environments like Kali Linux.
For two VMs running Kali and Ubuntu, using vmnet8 ensures they share the host’s internet connection but have their own private subnet. This isolation makes assigning static IPs safe because they will not interfere with other devices on your physical network.

Configuring VMware Virtual Network Editor

Before configuring the guest OS, you must verify that VMware’s virtual network infrastructure is set up correctly. Open VMware Workstation Pro and navigate to Edit > Virtual Network Editor. You may need administrator privileges to make changes. Select vmnet8 (NAT) from the list. Ensure that the checkbox Use local DHCP service to distribute IP addresses to VMs is unchecked if you plan to assign static IPs manually. If this box is checked, VMware’s internal DHCP server might override your manual settings or cause conflicts during boot. Note the Subnet IP and Subnet Mask displayed here; these define the range for your virtual network. For example, it might be 192.168.137.0/24. If you are experiencing connectivity issues similar to those described in WSL and VM: Unable to Connect WSL2 Ubuntu to VMware VM, verifying the NAT settings is a critical first step. Incorrect NAT configurations can prevent any traffic from leaving the virtual environment, making static IP assignment irrelevant because there is no route to begin with.

Setting Static IPs in Kali Linux

Modern versions of Kali Linux use Netplan for network configuration. To assign a static IP, you must edit the YAML configuration file located in /etc/netplan/. Identify the configuration file, which usually has a name like 50-cloud-init.yaml or 01-netcfg.yaml. Open the terminal and use a text editor such as nano or vim to modify the file. You need to specify the network interface, typically ens33 or eth0, depending on your VMware version. The configuration should look something like this:
network:
  version: 2
  ethernets:
    ens33:
      dhcp4: no
      addresses:
        - 192.168.137.10/24
      routes:
        - to: default
          via: 192.168.137.2
      nameservers:
        addresses:
          - 8.8.8.8
          - 8.8.4.4
In this example:
  • addresses: Set to a static IP within the vmnet8 subnet (e.g., .10).
  • routes via: Points to the VMware NAT gateway, which is usually the second IP in the subnet (e.g., .2).
  • nameservers: Specifies DNS servers. Google’s public DNS (8.8.8.8) is reliable for testing.
After saving the file, apply the changes by running sudo netplan apply. If the command fails, check the syntax carefully, as YAML is sensitive to indentation errors. Verify connectivity by pinging the gateway (ping 192.168.137.2) and an external site (ping 8.8.8.8).

Configuring Static IPs in Ubuntu

Ubuntu Server and Desktop versions also utilize Netplan in recent releases. The process is nearly identical to Kali Linux. Locate the configuration file in /etc/netplan/. If you installed Ubuntu recently, it might have generated a cloud-init configuration that overrides manual edits. In such cases, you may need to disable cloud-init networking or edit the correct Netplan file that controls the primary interface. Ensure that the dhcp4 parameter is set to false. Define the static IP, gateway, and DNS servers just as you did for Kali. It is crucial that both VMs use different static IPs within the same subnet to avoid ARP conflicts. For instance, if Kali is 192.168.137.10, set Ubuntu to 192.168.137.11. Once configured, run sudo netplan apply. If you encounter issues where the VM loses connectivity after applying the config, revert to DHCP temporarily to confirm that the network adapter itself is functioning. Sometimes, simply restarting the network manager service (sudo systemctl restart systemd-networkd) can resolve transient binding issues.

Verifying Connectivity and Troubleshooting

After setting static IPs for both VMs, test the communication path. From the host machine, you should be able to ping both VMs. From each VM, you should be able to ping the other VM, the gateway, and external websites. If you cannot ping the gateway, check the VMware Virtual Network Editor again to ensure the NAT gateway IP matches the one specified in your Netplan configuration. A common mistake is assuming the gateway is always .1; in VMware’s default NAT setup, it is often .2. If you face difficulties copying files between the host and VMs, refer to Error Copying Virtual Machine File for solutions related to file transfer mechanisms, which can sometimes be confused with network configuration problems. Additionally, ensure that firewalls within Kali and Ubuntu are not blocking ICMP (ping) requests. You can temporarily disable the firewall with sudo ufw disable for testing purposes.

Frequently Asked Questions

Why does my VM lose internet access after setting a static IP?

This usually happens because the gateway or DNS settings in the guest OS do not match the VMware NAT configuration. Verify that the "via" IP in your Netplan file corresponds to the NAT Gateway IP shown in VMware’s Virtual Network Editor.

Can I use Bridged mode instead of NAT for static IPs?

Yes, but it is riskier. In Bridged mode, your VM appears as a distinct device on your physical LAN. If you set a static IP that conflicts with another device or the router’s DHCP range, you will lose connectivity. NAT isolates the VM, making static assignment safer.

How do I find the correct network interface name in Kali?

Run the command ip link show in the terminal. Look for an interface that is not lo (loopback). Common names include ens33, eth0, or enp0s3. Use this exact name in your Netplan configuration.

What if Netplan apply fails with a syntax error?

Netplan uses YAML, which is strict about indentation. Ensure you are using spaces, not tabs, and that the hierarchy is correct. Run netplan generate to debug the configuration before applying it, as this command often provides more detailed error messages.

Do I need to configure the host firewall for VM-to-VM communication?

Generally, no. Since both VMs are on the same virtual network (vmnet8), they communicate directly through the virtual switch. However, ensure that the internal firewalls within Kali and Ubuntu allow traffic on the required ports, especially if you are running services like SSH or web servers.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More