This issue is so infuriating that I'm going to take some time to write about it.
-
MOST IMPORTANT. Your local development server must be bound to IP address 0.0.0.0. Some do this by default, but many don't. You need to make sure that you run your local server with correct IP bindings. You may need to provide additional flags to your serve commands e.g.
polymer serve --hostname domain.local,hugo serve --bind 0.0.0.0. If you use a named domain likedomain.local, it has to be defined in/etc/hostsand pointing at 0.0.0.0. -
My Parallels setting is using Shared Network, nothing special there.
-
Open macOS Terminal and type
ifconfig. Look for the value undervnic0>inet. It is typically10.211.55.2. -
You can use this IP address from IE or Edge in Parallels Desktop. Don't forget the port number and protocol, e.g.
http://10.211.55.2:3000 -
It's annoying to remember this IP all the time, so you can edit
C:\Windows\System32\drivers\etc(search for Notepad app and right-click to Run as Administrator, then search for this file from within Notepad so that you can actually edit it) and give that IP address a name, e.g.localhost.mac
Since a lot of folks might land here after Googling, I thought I should add that it's safer to bind to that specific IP address (10.211.55.2) rather than 0.0.0.0 This keeps it exposed to your VM and not to your entire home LAN.
In general always try to be more specific in your network setup. In future if you need to expose some service from your dev/lab to the internet, this will keep things simpler and more secure.