1

I've found a lot of online help re connecting to a Mac's localhost from inside a virtual PC hosted on a Mac, but not the other way around, which is what I'm after.

EDIT - tried to make myself a bit clearer.

Setup: I have a MacBook on which I am running VMWare to host a virtual instance of Windows 7. In that virtual PC I am writing a web-service which, at the moment, is accessed via the localhost of the virtual PC.

I'm also developing an iPhone app that uses the web-service above, so I need to be able to access the localhost of the virtual PC FROM my Mac.

If anyone has any experience in doing something similar I'd be grateful for any pointers as to how to achieve this.

1
  • If you configured your VM to use the "bridging mode" for network cards (NICs), your VM will be integrated in your network. You can then access the VM and the Mac via network (when the network is properly configured on both machines). I don't really understand your question. Would you please point out what you need this connection to "localhost" for and how you tried to establish the connection?
    – wullxz
    Aug 9, 2012 at 11:22

1 Answer 1

0

You could set up your VM networking settings to run in bridging mode, give it an IP (or let it obtain one from DHCP normally) then, you would typically treat it like a physical node on the network and connect to it by its IP.

More info:

1
  • 1
    Beware, using this solution puts your guest operating system (Windows 7 in the question above) on the same external network as your host (OS X) which may not always be desirable or recommended. Using the "Host only" network configuration should allow your apps run on the simulator to see the guest operating system and prevent other devices on the external network from having access to the guest OS. Aug 18, 2012 at 13:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .