5

How can one get host IP address from within vbox virtual machine? I'm trying to clone repository running on the host, so I need an address to perform hg clone.

3 Answers 3

6

That all depends on your networking arrangement.

If you are using a NAT or Host Only arrangement then the hosts's IP address will be your default route provided by DHCP by the host.

If you are bridging your network then there is no way to automatically know the host's IP address.

1
  • 8
    The default host IP for virtualbox NAT is 10.0.2.2 Commented Apr 17, 2013 at 15:22
1

This doesn't answer the question, but perhaps solves the problem.

To clone a hg repository, I would uses shared folders in this case. HOWTO: Use Shared Folders

0

If the guest VM is running Linux see the answer here :

$ ip route show default | grep default | cut -d ' ' -f3
10.0.2.2

You must log in to answer this question.

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