Name Resolution of Guest Hostnames

Discussions related to using VirtualBox on Windows hosts.
Post Reply
dbalencar
Posts: 3
Joined: 22. Jan 2018, 23:47

Name Resolution of Guest Hostnames

Post by dbalencar »

Hi, lads!

Please forgive me if this is silly, but I couldn't find an answer.
I've installed PCF-DEV on my laptop (Windows Host). It creates a guest VM (Linux VM).
What is curious to me is that after installing this application I'm able to resolve from the windows host these hostnames to the VM: api.local.pcfdev.io and apps.local.pcfdev.io
What kind of Voodoo is it? :shock: Magic? :o I've checked the hosts file and found nothing... :?

How is this accomplished, please?

Cheers,
Doug.
dbalencar
Posts: 3
Joined: 22. Jan 2018, 23:47

Re: Name Resolution of Guest Hostnames

Post by dbalencar »

Is this something like nip.io??? Or is it a VirtualBox feature? If so, is there a documentation about it?
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Name Resolution of Guest Hostnames

Post by socratis »

  • What is the question?
  • What is the VirtualBox related question?
  • What is PCF-DEV?
  • Does it use VirtualBox, hence the connection?
  • Shouldn't you be asking at PCF-DEV?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
dbalencar
Posts: 3
Joined: 22. Jan 2018, 23:47

Re: Name Resolution of Guest Hostnames

Post by dbalencar »

Ok, sorry, so I'll try again!

PCF-DEV is a Pivotal Cloud Foundry plugin for the CLI.
It creates a VM in VirtualBox with Pivotal Clound Foundry installed (for development), with 2 net adapters (NAT and Host-Only).

This VirtualBox guest machine is running Linux on a Windows host.
There are two APIs defined, which are available from a browser running on the host machine.

So, if I open Chrome on my host machine and type the API address a page opens, serving that page from the guest machine.
If I ping both APIs from the host, they resolve to the guest VM in VirtualBox (Adapter IP from Host-Only Network).

How does this naming resolution happen? In the host machine, there are no entries in the hosts file.
The DNS used by both the host and shared by the guest is my wifi router...

I would like to know if VirtualBox has some feature for defining this kind of name resolutions that I might have missed, and how it works (documentation link).

Cheers,
Doug
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Name Resolution of Guest Hostnames

Post by socratis »

dbalencar wrote:There are two APIs defined, which are available from a browser running on the host machine.
I don't think that you refer to VirtualBox anymore...
dbalencar wrote:How does this naming resolution happen? In the host machine, there are no entries in the hosts file.
Again, not a VirtualBox question.

Let me put it like that. VirtualBox provides the hardware part (with some minor software additions). Would you call Acer/Apple/Dell/HP with such a question? Or the one that provided the VM for you? I think that you should talk to the PCF-DEV people, whoever they are...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
BillG
Volunteer
Posts: 5102
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Name Resolution of Guest Hostnames

Post by BillG »

The only thing of interest (from a VirtualBox point of view) is that it has a host only adapter. In other words the host and guest have a network connection.. That probably explains how they resolve names and communicate.
Bill
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Name Resolution of Guest Hostnames

Post by socratis »

It could be zeroconf/avahi for all I know... But still, not something VirtualBox related.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply