Virtulabox Linux guest network configuration


Platform – Oracle Virtualbox4.3.2

Guest OS – RHEL 5.5

This is short post on troubleshooting some of the issues that were encountered during multiple network interface configuration in Oracle Virtual box with RHEL 5.5.
VM setup → 1 Nat adapter, 1 Host-only adapter.
Issues Faces →
  1. Nat adapter was not resolving DNS.
This was due to an issue with automatically generated /etc/resolve.conf. By using below command to force usage of host machine DNS in guest this issue was resolved.
 VBoxManage modifyvm "<VM_NAME>" --natdnshostresolver1 on  
  1. 2. DNS was ok but couldn't access the internet.
The NAT interface was simple not connecting to internet. Simple trace route to google.com showed that internet connection was tried via the hostonly network.
Routes were not correctly configured in the VM guest. The defult route getwway was set to hostonly adapter. Below are the steps to correct the route table.
 [root@localhost ~]# route  
 Kernel IP routing table  
 Destination   Gateway     Genmask     Flags Metric Ref  Use Iface  
 default     192.168.56.1  0.0.0.0     UG  0   0    0 enp0s8  
 10.0.2.0    *        255.255.255.0  U   0   0    0 enp0s3  
 169.254.0.0   *        255.255.0.0   U   0   0    0 enp0s8  
 192.168.56.0  *        255.255.255.0  U   0   0    0 enp0s8  
 [root@localhost ~]# route add default gw 10.0.2.2 enp0s3  
 [root@localhost ~]# ip route del default via 192.168.56.1  
 [root@localhost ~]# route  
 Kernel IP routing table  
 Destination   Gateway     Genmask     Flags Metric Ref  Use Iface  
 default     10.0.2.2    0.0.0.0     UG  0   0    0 enp0s3  
 10.0.2.0    *        255.255.255.0  U   0   0    0 enp0s3  
 169.254.0.0   *        255.255.0.0   U   0   0    0 enp0s8  
 192.168.56.0  *        255.255.255.0  U   0   0    0 enp0s8  
 [root@localhost ~]#  

Comments

Popular posts from this blog

ORA-16433: The database or pluggable database must be opened in read/write

Wait for unread message on broadcast channel - Blocking Sessions

ORA-14126 - While splitting max value partition