Virtualbox: get host IP address

5

1

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.

maverik

Posted 2011-04-19T10:15:57.293

Reputation: 165

Answers

5

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.

Majenko

Posted 2011-04-19T10:15:57.293

Reputation: 29 007

7The default host IP for virtualbox NAT is 10.0.2.2 – Sean McMillan – 2013-04-17T15:22:56.480

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

bernd_k

Posted 2011-04-19T10:15:57.293

Reputation: 1 181