...
- Find out VM subnet
Note the IP address that this produces (Code Block ifconfig eth0
aaa.bbb.ccc.ddd
). - Edit
/etc/network/interfaces.static
and make sure it says the following (Code Block sudo nano /etc/network/interfaces.static
aaa.bbb.ccc
are the values you got in previous step)Code Block address aaa.bbb.ccc.3 netmask 255.255.255.0 gateway aaa.bbb.ccc.1 dns-nameservers aaa.bbb.ccc.2
- Point
/etc/network/interfaces
to your new configuration fileCode Block sudo rm /etc/network/interfaces sudo ln -s /etc/network/interfaces.static /etc/network/interfaces.static
- Reboot your VM for changes to take effect
Code Block sudo /sbin/reboot
- Test the new network configuration by running
You should seeCode Block ifconfig eth0
aaa.bbb.ccc.3
as the IP address. - Test external connectivity
Code Block ping www.google.com
...