VMWare fusion: connecting to host's web server from guest

farzan picture farzan · Jul 13, 2010 · Viewed 34.7k times · Source

I am a web developer and my development platform is Mac. I have installed a copy of Windows XP in VMWare fusion for testing purposes and using IE for previwing my websites. I have Apache running on my Mac with several subdomains, like test.localhost etc.

How can I access the webserver on host OS from the guest OS?

Thank you in advance.

Answer

Camaleo picture Camaleo · Nov 6, 2013

Using Fusion 6.0.2 on OS X 10.9 Mavericks

In the host system (Mac)

  1. turn off your virtual machine

  2. open the "Virtual Machine | Network Adapter | Network Adapter Settings..." menu

  3. in the "Bridget Networking" section choose "Autodetect":

Network Adapater

  1. turn on your virtual machine

In the guest system (Win7)

  1. right click on the Notepad application, then select "Run as administrator":

Run Notepad as Administrator

when Win7 asks: "Do you want to allow the following program to make changes to this computer?" click on the "Yes" button

  1. navigate to: "Computer | Local disk (C:) | Windows | System32 | drivers | etc"

  2. select "All files" in the drop down menu on the right of the "file name:" field

  3. double click the "hosts" file

In the host system (Mac)

  1. open your system preferences and select "Network"; in your connected interface look for the Mac IP:

Mac Network IP Address

192.168.1.106 in the example

In the guest system (Win7)

  1. in your notepad window enter the Mac IP followed by the sites you want to reach in your host (Mac) system:

hosts file in VM

in the example I configured two sites: localhost and caeb.leo

  1. open the browser and you will be able to see the sites hosted on your host system:

Example

Hope it helps!