I've considered that. The problem is determining the actual device which I should use for obtaining the IP address. There is no guarantee, eth0 is the device that will be used for communication with the "outer world". Or it can be DHCP obtained address, so on next system boot it can be expired.

I think this is issue for another PR, for now I've settled for static IP that is usualy used for VirtualBox host-only network devices. If you still think it's better to patch it up like you suggested, I can do it. But it's still only temporary solution.