DNS name resolution with shared networking

Discussion in 'Windows Virtual Machine' started by wombat2k, Sep 8, 2011.

  1. wombat2k

    wombat2k Bit poster

    Messages:
    3
    Hi there,

    in PD 7 and earlier version, with my Linux VMs set to shared networking, DNS name resolution works out of the box, both from my Mac and from my VM. On Windows however, it just won't work. The hostname will resolve on the Windows VM (due to netbios I would think) but not the FQDN on either the Win guest or Mac host.

    Sure I could edit the hosts files, but is there a reason this works out of the box on Linux but not Windows? I checked ipconfig and the win vm gets assigned the same DNS server as Linux, so one would think this would work.
     
  2. wombat2k

    wombat2k Bit poster

    Messages:
    3
    After almost a year pondering this mystery, I think I've figured it out. I'm posting this in case you have a need for name resolution using shared networking.

    What puzzled me was why did the Ubuntu VM resolve without any trouble, but not Windows? My mistake was assuming that Parallels was doing some magic in the background to make this work. I realized this when I attempted to install Ubuntu Server and lo and behold, no resolution.

    Another thing to take into account was that resolving by hostname did not actually work, only [hostname].local. This should have given me the hint that I needed, but for some reason, I completely overlooked this.

    Yesterday, while struggling with this for the xth time, I started to think: if Ubuntu desktop works but not server, it must mean that the desktop version is using something that server isn't. Then it hit me out of nowhere, it must be using Bonjour, Apple's netbios equivalent. Sure enough, I checked and desktop ships with avahi-daemon, a Bonjour implementation. As soon as I installed it in Ubuntu server, it worked.

    Now where does that leave Windows users? I haven't tested this but Apple ships something called Bonjour Print Services for Windows which you can download here. I haven't tested this as I'm no longer working with a Windows VM regularly, but I suspect it will work.

    Bear in mind this is not really hostname resolution, so you need to add the local postfix or whatever you set it to on your mac.
     

Share This Page