Hi, im new for networking, recently i got a project is need to apply restful web services. So now i need to implement two of my web apps into two different VM, 1 is window xp and another 1 is window 7. But so far i stil unable to connect the two VM by using host only network (static IP adds), any1 can guide me or have any good references or tutorial to share with me, appretiate a lots, TQ.

Dani AI

Generated

Quick, practical checklist to get two Windows VMs talking over a host-only network. As asked, the exact steps depend on the hypervisor; the notes below cover VirtualBox and VMware Player. Also, contrary to a suggestion in the thread, a single host-only network is normally sufficient — both VMs should attach to the same virtual host-only adapter so they live in the same subnet.

For VirtualBox: open the Host Network Manager and confirm a host-only adapter exists and note its host IP (common default is 192.168.56.1). In each VM set the network adapter to the host-only adapter and configure static IPs on the same /24 subnet. Example static settings (Windows IPv4):

VM1
IP:      192.168.56.101
Netmask: 255.255.255.0
Gateway: 192.168.56.1   (optional for host access)

VM2
IP:      192.168.56.102
Netmask: 255.255.255.0
Gateway: 192.168.56.1   (optional)

Avoid IPs inside any DHCP pool the host may use. For VMware Player, verify both VMs are attached to the same vmnet (usually vmnet1 for host-only) via the Virtual Network Editor or the product UI.

Windows firewall often blocks ICMP and service ports; allow "File and Printer Sharing" or create an inbound rule for the required port(s) to test connectivity. Useful checks: ipconfig /all on each VM, ping <other-VM-IP>, arp -a to confirm MAC entries, and verify each VM's adapter shows as connected in the hypervisor. If pings fail but IPs/config look correct, temporarily disable the firewall to isolate whether it is the blocker.

If host-only is not appropriate (internet access required from the VMs), use bridged mode or NAT with port forwarding. For further diagnosis, compare the ipconfig /all output from both VMs and the host-only adapter IP on the host to confirm all addresses are on the same subnet.

Recommended Answers

All 2 Replies

What VM application are you using Virtual Box, VMWare, Virtual PC? Host Only may not be the correct network choice (names vary by VM product). You want to choose the network that means "private". Other options generally include, NAT, and bridged.

Also, are you comfortable with the IP settings? Do you need help to make sure you picked the correct IP, subnet mask?

If you really want to use Host-Only networks, you need two separate VM network interfaces in the host OS, one for each VM.

As ITG-JM said, there are better options. The one you probably need is an internal network. If you want to include the host OS in the network, then go for bridged. (note, all these are VBox terms)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.