Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 466
farzan Avatar asked Jul 13 '10 07:07

farzan


People also ask

How do you communicate between host and virtual machine?

Internal network—sets up communication between the host system and the virtual machines on it. External network—connects virtual machines and the host physical network. This allows the virtual machine to communicate on the same network as the host, operating as any other node on the network.

How do I access a VMware virtual machine from outside network?

To configure your virtual machine with a NAT connection: 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 NAT connection checkbox is selected.


1 Answers

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!

like image 91
Camaleo Avatar answered Sep 22 '22 20:09

Camaleo