Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to connect from a VMware guest machine to the server installed on a Windows 7 host machine?

How to connect from a VMware guest (virtual) machine to the server installed on the host (physical) machine? Things like typing "localhost" in the address bar of a browser in a guest machine don't work. My host machine's OS is Windows 7 64 bit with WMware Workstation installed on it, if it matters.

EDIT: The Bridged network connection in combination with referring to 192.168.0.10* from the guest machine did work (replace * with a digit starting from 0 until it works).

like image 265
Desmond Hume Avatar asked Feb 29 '12 23:02

Desmond Hume


People also ask

How can I access my virtual machine from another computer?

Open the virtual machine settings window from within your installation of VMware Workstation, VMware Server, or VMware Player by clicking VM > Settings. In the hardware tab, highlight the network adapter and ensure that the bridged network connection checkbox is selected.


3 Answers

If you use "Bridged" Network Connection (see Virtual Machine Settings: Network Adapter), your VM will be given an IP address on the same LAN as your host machine. At that point, you can just HTTP to your host's IP address, eg. http://192.168.0.100

You can also do that with the other options, but with NAT and Host-only (if I recall correctly) your host machine will appear to your guest machine to have a different IP address than its real LAN address. So Bridged is the easiest and is likely your best bet, unless you have some specific needs.

like image 156
Rick Avatar answered Sep 29 '22 14:09

Rick


First thing to do: Check that you have the network up and running. Try to ping the host system or any web site from the console of the guest OS, let's say ping www.google.com.

If you received any answers then please try writing the IP number of the host machine in the addressbar of the browser on the guest machine (NOT localhost :P). You should be able to see any web service running (Tip: Open the console of your windows 7 and type ipconfig, then find the ethernet adapter corresponding to VMWare and you'll find the IP number of your host system).

If you didn't received any answer at all when you did ping then check the network configuration of VMWare to use Bridged Connection --at least that's how it works for me.

Good luck!

like image 22
Aerozeek Avatar answered Sep 29 '22 13:09

Aerozeek


In a guest machine, localhost refers to the virtual machine itself. Refer to the host just as you would from any other machine: by its IP address.

Note that it may be using a second "virtual" network adapter to communicate with the guest. Check the VMware to find out, and to find the second IP address.

like image 35
Adam Liss Avatar answered Sep 29 '22 14:09

Adam Liss