Skip to content

Accessing your local environment from a Windows VM (tutorial)

Filing under: not very interestingĀ but very useful (I hope) tutorials, here’s a step-by-step guide to accessing your local server (ex. the one you’ve got running on localhost:3000).

Why might you need this?

Because you need to test on IE and you have a not-Windows machine. Cool? Moving on.

Getting the VM

Download your VM for the OS/IE combination you need from the VMs page of This tutorial uses VirtualBox which is (hooray!) free to use.

Update the hosts file so you can access your local server

Step 1: Open Notepad as an administrator:

Step 2: Confirm scary security box


Step 3: Open the hosts file

Choose “Open” and find the hosts file. It’s at C:\Windows\System32\drivers\etc. Be sure to “show all” file endings, as you won’t see the hosts file otherwise (it doesn’t end in .txt!)


Step 4: Edit the hosts file to at with some name

Don’t name it localhost because weird things will happen. And don’t forget that you still need to put the port when you’re accessing your server, won’t work in your VM, but will if that’s the port for your local server.


Where’s come from? Using the command prompt, you can run ipconfig to see your external host is (or something different if this tutorial didn’t work at this point).

5. Take a snapshot of your machine

Save your machine state. Run your VM from this snapshot to lock it in time when you had this set up, which should also prevent the VM self-combust clock from running (the Windows licenses are only good for so long).


Hope this helps others! Shoutout to my colleague Dave for reminding me how to get this done a while ago, and now there’s a blog post for everyone else to benefit šŸ™‚

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.