I am creating a new Virtual machine on a server using an existing vdi image (Import from CLI). When the machine gets started, I want it to be accessed from the IP address of the Linux Host machine to the outside world. Please guide me on how to achieve this? (Preferably using the Command Line)
Asked
Active
Viewed 469 times
-2
-
You want to assign the IP of the host machine to the guest? – tombull89 Oct 01 '13 at 12:46
-
You can't do this...you can use NAT and forward ports, but the guest for all intents and purposes is *another* machine that needs its own IP address. – Nathan C Oct 01 '13 at 12:50
-
Yes, anyway by which the Guest OS can be made accessible to the outside internet. – Ankit Oct 01 '13 at 12:51
-
NAT would work fine. – Nathan C Oct 01 '13 at 12:55
-
"Can't" and "too complicated to be relevant" are distinctions... that can probably be ignored in most cases but it is nice to know that they exist. To get the VM accessible from the outside world, you will likely want to set the VM in bridged mode (so it is on the same LAN as the host) and forward whatever required ports you have at the router. – Daniel Widrick Oct 01 '13 at 12:56
1 Answers
1
Set the VM to use NAT networking in Virtual Box.
Then on the VM try:
dhclient eth0
Come back and add details to your question after you have read the networking sections of the VirtualBox documentation and the man pages concerning the configuration of networking on you chosen Distribution.
This site is for professional System Administrators, and generally... Basic Virtual Box networking questions Tend to be off topic or at least skirt very close to the edge there of.

Daniel Widrick
- 3,488
- 2
- 13
- 27
-
Thanks for guiding. Will keep the listed in mind regarding the use of this site. – Ankit Oct 01 '13 at 12:50