Virtual Machine Network
virtual machine network setting for a linux instance
Use Bridged Network
the linux instance uses the host's network dhcp to acquire an ip
if the host's network needs a proxy to access external internet, then configure proxy in /etc/apt/apt-conf for apt-get
Similarily for python library install. use --proxy in pip
To call a web service hosted on the virtualized linux, use the instance's ip.
use NAT
the linux instance assigns its own internal ip, 192.168.0.x, which can only be seen within the virtual machine.
The outgoing internet traffic will be using the host's ip. ie. the linux instance appears to be the host itself.
However, to access a web service hosted within the linux instance from outside, you cant just call the internal ip 192.168,0.x.
Outside world is not aware of the linux instance.
You need to configure port forwarding in the settings, map port 22 and 80, etc. to another port on the host,
then outside world can call the web service through the host & mapped port.