Configure Host-Only Networking for a VMware Player Virtual Machine
Attach a VMware Player VM to a host-only network, use VMnet1 or a custom host-only VMnet, verify connectivity, and troubleshoot isolation and DHCP.
Host-only networking creates a private virtual network inside the physical host. A virtual machine connected to this network can communicate with the host operating system and with other virtual machines on the same host-only network, but it is not directly connected to the physical LAN or the Internet.
This configuration is useful for isolated development environments, malware-analysis precautions, classroom exercises, and test services that should be reachable from the host without being exposed externally.
How host-only networking works
VMware creates a software-defined network, often called a VMnet. The host operating system receives a host-visible virtual network adapter for that network. The guest operating system sees a virtual network adapter supplied by VMware. Traffic between these adapters stays within the host unless you deliberately add another networking path.
A virtual network adapter is software-created network hardware. VMware presents it to the guest as if it were a physical network card, while the host uses its own virtual adapter to participate in the same private network.
In the usual host-only arrangement:
- The host has an address on the private subnet through its host-only virtual adapter.
- The guest receives an address on that same private subnet.
- The host and guest can communicate if their firewalls permit the traffic.
- The guest has no direct Internet or external-LAN path through the host-only adapter.
The default VMware Player host-only network
VMnet1 is the host-only virtual network commonly created when VMware Player is installed. A VM attached to the standard Host-only option normally uses VMnet1 and remains isolated from external networks through that adapter.
Names and defaults are not universal. The available VMnets, host adapter names, subnet addresses, and DHCP settings can vary with the VMware product version, host operating system, installation choices, and host configuration. Treat VMnet1 as the common default rather than an assumption that must exist on every computer.
Virtual DHCP and private subnets
VMware can provide a virtual DHCP server for a host-only network. DHCP, or Dynamic Host Configuration Protocol, leases IP configuration to a guest automatically. The lease commonly includes an IP address and subnet mask, and may include other settings depending on the virtual network configuration.
The host and guest must use addresses in the same host-only subnet for normal direct communication. For example, if the host-only adapter is configured in a private subnet and the guest receives an address from that subnet's DHCP range, they can usually reach each other. A guest with no lease, an address from a different subnet, or an incorrect static configuration may not be reachable.
DHCP is not guaranteed merely because an adapter is set to Host-only. Its behavior depends on whether DHCP is enabled for the selected VMnet and whether the relevant VMware networking services are available on the host.
Choose the correct VMware network mode
| Mode | Host-to-VM communication | External network or Internet access | Typical use case |
|---|---|---|---|
| Host-only | Yes, through the host-only virtual adapter | Normally none through that adapter | Isolated labs and host-to-guest testing |
| NAT | Usually yes, through VMware's virtual NAT network | Typically yes, using the host's connection and address translation | Giving a VM outbound access without placing it directly on the physical LAN |
| Bridged | Usually yes, as a peer on the physical network | Typically yes, subject to the physical network | Making a VM appear as another device on the LAN |
| Custom virtual network | Depends on the selected VMnet | Depends on how that VMnet is configured | Choosing a particular isolated network or a separated lab segment |
Host-only is the intentional choice when the VM should communicate with the host but should not have a direct external-network route. Use NAT networking when the guest needs convenient outbound connectivity through the host. Use bridged networking when the guest must participate directly in the physical network.
Configure an existing VM with the standard Host-only option
These steps attach an existing virtual machine to the default host-only network exposed by VMware Player.
- Open VMware Player and select the target virtual machine in the library.
- If the VM is running, shut it down fully. Depending on the VM state and VMware product behavior, hardware-related network changes may not be available while the VM is powered on or suspended.
- Open Player > Manage > Virtual Machine Settings.
- On the Hardware tab, select Network Adapter.
- Under Network connection, select Host-only: A private network shared with the host.
- Click OK to save the setting.
- Start the VM and allow its guest operating system to bring up the virtual network adapter.
The standard Host-only selection normally maps to the default host-only VMnet, commonly VMnet1. Check the actual host configuration if you need to confirm the VMnet number or subnet.
If the VM has no network adapter at all, use the instructions for adding a virtual network adapter before selecting its connection mode.
Use a custom host-only virtual network
A custom virtual network is a specifically selected VMnet. It is useful when you need separate lab segments, a nondefault private subnet, or independent groups of virtual machines. For example, one group of training VMs can use the default host-only network while another group uses a separately configured host-only VMnet.
- Power off the VM if its current state prevents hardware changes.
- Open Player > Manage > Virtual Machine Settings.
- On the Hardware tab, select Network Adapter.
- Select Custom: Specific virtual network.
- Choose the VMnet that has been configured as host-only.
- Click OK.
| Selection in Network Adapter settings | Network used | When to choose it |
|---|---|---|
| Host-only | The default host-only network, commonly VMnet1 | For a straightforward private host-and-VM network |
| Custom with a selected host-only VMnet | The specifically selected VMnet, provided that VMnet is configured as host-only | For separate labs, custom subnets, or more controlled network design |
Do not confuse these choices. Selecting Custom does not automatically mean host-only; it means that VMware will use whichever VMnet you select. Confirm that the selected VMnet is actually configured as host-only.
Configure host-only networking while creating a VM
You can choose the network before the first boot instead of modifying an existing VM later.
- Proceed through the New Virtual Machine wizard.
- Choose Customize Hardware before completing the creation process.
- Select Network Adapter.
- Choose Host-only, or choose Custom and select an appropriate custom host-only VMnet.
- Finish creating the VM and start it when ready.
Verify connectivity and isolation
1. Check the guest address
Start the VM and inspect the guest operating system's network configuration. Confirm that the address belongs to the expected host-only subnet and that the adapter is enabled.
ip addr # Linux and other Unix-like guests
ipconfig # Windows guestsUse the equivalent network-configuration tool for your guest operating system. Compare the guest address and subnet mask with the address shown for the host's host-only virtual adapter.
2. Test guest-to-host communication
Find the host-side address assigned to the selected host-only virtual adapter. From the guest, test that address with an appropriate diagnostic tool:
ping <host-only-adapter-address>A failed ping does not always prove that the network is disconnected. The host firewall may block ICMP echo requests even when other services are reachable. Test an allowed service as well when possible.
3. Test host-to-guest communication
From the host, test the guest's host-only address. This test is meaningful only when the guest firewall allows the protocol being tested. For service testing, connect to the service's host-only address and port rather than relying only on ping.
4. Confirm isolation
When isolation is required, inspect the guest's active interfaces and routing table. The VM should not retain an additional NAT or bridged adapter, and it should not have an unintended default route through another interface.
ip route # Linux and other Unix-like guests
route print # Windows guestsAttempting to reach an external address can provide an additional check, but routing tables and firewalls should be reviewed directly. Host-only isolation applies to the selected adapter; another active adapter can still provide Internet access.
Practical host-only examples
Isolated local lab
Attach a Linux test VM to the default Host-only option. The host and VM can communicate over the host-only adapter, while the VM has no default Internet access through that adapter.
Multiple separated training environments
Attach one group of VMs to the default host-only network and another group to a separately configured custom host-only VMnet. The groups then use separate private network segments, assuming no additional connection joins them.
Host-managed service testing
Run a development service on the host and connect a guest through host-only networking. The guest can access the service by using the host-side address of the selected host-only adapter, provided the service listens on that address and firewall rules permit the connection.
Remove an unintended Internet path
Change an existing NAT or bridged adapter to Host-only. The VM remains able to use the host-side private network through that adapter but is no longer directly connected to an external network through it.
Troubleshooting
The guest has no IP address or receives an unexpected address
- Confirm that the VM's Network Adapter is set to Host-only or to the intended custom VMnet.
- Verify that the host-only virtual adapter exists and is enabled.
- Check that VMware networking services and virtual DHCP are available.
- Confirm that DHCP is configured for the selected VMnet, if automatic addressing is intended.
- Check the guest adapter status and verify that its operating-system driver is working.
The guest cannot reach the host
- Compare the host virtual adapter's address and subnet mask with the guest's address and mask.
- Confirm that both systems are connected to the same host-only VMnet.
- Test an allowed protocol and review host and guest firewall rules.
- Make sure the host-side VMware virtual adapter is enabled.
The VM can still access the Internet
- Review every virtual network adapter assigned to the VM.
- Disconnect or remove unintended NAT and bridged adapters.
- Review the guest's active interfaces and routing table for another default route.
- Check whether host routing or guest configuration provides another outbound path.
The desired custom host-only network is not listed
- Review the host's VMware virtual network configuration.
- Confirm that the VMnet was created and configured as host-only.
- Check whether VMware networking components are missing, disabled, or restricted by the host environment.
- If expected virtual adapters are absent, repair or reinstall the VMware networking components according to your system's administration procedures.
The Network Adapter setting cannot be changed
- Shut down the VM fully rather than leaving it powered on or suspended.
- Reopen the virtual machine settings and try again.
- Confirm that your user account can modify the VM configuration and that the VM is not locked.
Key points to remember
- Host-only networking is a private host-contained network, not an Internet connection.
- VMnet1 is the common default host-only network, but names and settings vary.
- The host's virtual adapter and the guest must use the same private subnet for direct communication.
- VMware virtual DHCP may assign guest addresses, depending on VMnet configuration and service availability.
- Host-only normally selects the default host-only network; Custom requires you to choose a specific VMnet.
- Isolation can be defeated by a second NAT or bridged adapter, so inspect all VM interfaces and routes.
For broader VMware networking concepts, see Virtual Networking Components and Networking Configurations.