Issue: RedHat Enterprise Linux 6 minimal install on VM Virtualbox has no internet connection. Network Adapter is set to NAT. Also cannot connect via SSH to guest machine, even with port forwarding. Bridged adapter usage is not a solution because of corporate policy and IP addresses provision policy.
Solution:
Network configuration for Minimal install
Virtualbox network adapter type: NAT
Host machine operating system: Windows 7
Guest machine operating system: Red Hat Enterprise Linux 6.2
=== ifcfg-eth0 configuration ===
/etc/sysconfig/network-scripts/ifcfg-eth0
###################
DEVICE="eth0"
NM_CONTROLLED="no" (don't know why, but it works)
ONBOOT="yes" (enables eth0 device automatically on boot)
HWADDR=<should be set here already. If no - see /sbin/ifconfig>
IPADDR=10.0.2.16 (or anything else in range of [3..254], eg. 10.0.2.100, anything, but in 10.0.2.* subnet)
PREFIX=24 (this means 255.255.255.0)
GATEWAY=10.0.2.2
DNS1=(the same as DNS of host machine)
DNS2=(the same as DNS of host machine)
BOOTPROTO="dhcp"
DEFROUTE="YES"
NAME="System eth0"
###################
=== network file configuration ===
/etc/sysconfig/network
###################
NETWORKING=yes
HOSTNAME=rhel62.localdomain
###################
Restart network:
service network restart