Recently I started using a Virtual Machine on my Macbook Pro. I considered a few options such as Bootcamp, VMware Fusion and Parallels. After getting feedback from people in the know I decided to use Parallels. My goal was to test local sites I was building in Internet Explorer. I had been using an online service for this function but I decided that it was time to test my projects live on my own computer to speed up the process.
After downloading and installing parallels I tried connecting to my virtual host… Oooops. For some reason it didn’t initially click that though both operating systems were on the same machine, they were two separate entities. “No problem,” I thought, “I’ll just turn on my file sharing and I’ll be good to go right?” Wrong.
After perusing many sites and forums I wasn’t much further than I had been hours prior. So, for the sake of wasting any more of your time (or mine), here’s how to set up your Parallels VM so that you can view your Mac’s virtual hosts in Internet Explorer on your Parallels platform:
How to Set Up Parallels 9 and MAMP 3 – Virtual Host
1. Parallels toolbar – Devices > Network 1 > Configure: Set it to “shared” and then restart your virtual machine: Parallels toolbar – Virtual Machine > Restart
2. Get your Mac’s IP address: Apple icon in top left corner > System Preferences > Network: Your IP address should be shown where your internet connection shows Connected. If not, click Advanced > TCP/IP, and use your IPv4 address.
3. Open your Windows ‘hosts’ file c:\windows\system32\drivers\etc\hosts (note: first you will have to change permissions for this file in order to edit the file: Right click it, select Properties, then Security tab and go ahead and give yourself full control over the file (read/write/modify, etc)). Add the following:
“[your IP address from step 1] yourvirtualhostexample.com” (without quotes/brackets)
Type in yourvirtualhostexample.com in Internet Explorer and you should now be able to see your project!
I hope this has helped save you some time. Parallels is a great tool, I only wish this was clearly posted on their website or forums when I first started using it.