How to link virtual (local ‘faked’) domains on Mac OS X to a Parralels Virtual Machine

I develop lots of web­sites on a vir­tual server on my Mac. I have a hosts file con­fig­ured to inter­pret lots of dif­fer­ent domains locally, e.g.,

127.0.0.1 mydomain.local
127.0.0.1 my-other-domain.local
etc.,
etc.,

I wanted IE within Par­ralels to also inter­pret these, but it does not recoginize local­host, or 127.0.0.1 the same.

But thanks to a few sug­ges­tions here, I fig­ured it out.

Credit to this thread: www.macosxhints.com/article.php?story=20070112081823250

The fol­low­ing instruc­tions are for using Par­ralels on Mac OS X Leopard.

Microsoft makes copies of Win­dows 6, 7, and 8 avail­able for free down­load, that are “time-bombed,” so that they can only be used for about a month. These are per­fect for browser testing.

Down­load whichever ones you want, here: www.microsoft.com/downloads/details.aspx?FamilyId=21EABB90-958F-4B64-B5F1-73D0A413C8EF&displaylang=en

But only down­load the .exe versions.

From within the vir­tual instance, install Bon­jour for Win­dows (support.apple.com/downloads/Bonjour_for_Windows).

To quote the other nice person,

“Go to Sys­tem Pref­er­ences on your Mac and click the Shar­ing icon, then switch to the Ser­vices tab. You will see a mes­sage say­ing, “Other com­put­ers on your local sub­net can access your com­puter at …” fol­lowed by a name end­ing with “.local”.

In other words, find out what your com­puter is called on the net­work. Let’s say it was mymac.local

Then, I found out what IP address the vir­tual Win­dows thinks mymac.local resolves to. It gave me some other IP address.

Then, I took all of the lines in my hosts file on my Mac, and copied them into a new file, and did a search and replace on the nor­mal local­host IP of 127.0.0.1, with that new IP.

Then, I opened up C:\WINDOWS\system32\drivers\etc\hosts, and added those lines to it.

It works. Yay!

This entry was posted in Tech. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.