1

I have downloaded a Windows 8.1 VM from Microsoft's dev center to do local testing for IE11.

  • Host is OSX
  • Guest is Windows 8.1
  • Using Virtualbox 5.0.12

Host machine /etc/hosts file:

127.0.0.1   www.mylocalsite.com

Network configuration

  • Bridged Adapter
  • En3: Thunderbolt Ethernet

I want to be able access www.mylocalsite.com from Internet Explorer within the guest machine, but currently it cannot access it. It is required that I be able to access it from the domain name, as there are security certificates that fail if I access it from an IP address.

What do I need to do to be able access the site on my host machine, via my guest machine, using the domain name? Note that the Windows VM does not provide administrator access, so I cannot modify C:\Windows\system32\Drivers\etc\hosts on the guest machine.

1
  • You have obviously spotted that the easiest answer is to map www.mylocalsite.com in the hosts file. One possibility is to attach the Virtual CD to the ISO image of a diagnostic disc, such as Hiren's Boot CD, then boot this and use it to edit hosts in the virtual hard disc.
    – AFH
    Commented May 12, 2016 at 16:04

1 Answer 1

1

These are the options i could think of:

  1. Assuming the Guest OS forwards it's DNS queries to your router and not directly to a remote server. Update settings on your router to resolve www.mylocalsite.com to ip address of your host computer. This is, however, an advance feature that many generic router firmwares don't have. Consult: Can a router map a URL to a local ip?

  2. Change adapter from bridged to host-only, install DNS server software on Host and create zone for mylocalsite.com.

Edit: My assumption about Guest OS using Host's /etc/hosts was incorrect, sorry about that. You'll have to run DNS server on your local network - be it router, host or other computer.

2
  • When I select "Host Only Adapter" in the Virtualbox settings, I get an error that "No host-only networking adapter is currently selected", but there is no adapter to select. Commented May 12, 2016 at 14:16
  • It needs to be created first. Adapter is created in VM Manager -> File -> Preferences -> Network -> Host-only networks. After that you can add the Guest to it through Machine -> Settings -> Network ...
    – Marek Rost
    Commented May 12, 2016 at 14:20

You must log in to answer this question.

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