Re: Set up static ip for lucid vbox guest
In VirtualBox, you have several networking options to attach your VM to. When your VM gets an IP of 10.0.2.15, with a default gateway of 10.0.2.2, it means that you attached it to NAT. This won't work if you don't want to forward ports or simply let the virtual machine appear as a normal one on the network with it's own IP address. You have to attach it to bridged.
Now for the network configuration. You are correct for how things work in the interfaces file. It would've been a lot easier if you checked the man page for it, just type 'man interfaces' in a terminal and you get all the information you need in how the syntax works.
As for the DNS access part, everything you set in /etc/resolv.conf is considered a DNS server. You don't put your own IP address there or anything if it's not a DNS server.
Let's say you want to connect to your VM from the Host without using the IP address, and don't have access to the DNS server or alter it in any way, you can add the address and name of the machine in a different file, namely /etc/hosts. This file is checked before a request is send to the DNS servers. It's entry would be something like this:
Code:
192.168.1.85 intranet
Now you can access the VM that has the IP address 192.168.1.85 on the name 'intranet'.
Throw Apples out the Windows, but make sure not to hit the Penguin.
Bookmarks