i have a “challenge” regarding networking in an OpenSuse 11.2 installation
running inside an Oracle VM Virtual Box.
This is the current configuration that I have.
ls /etc/sysconfig/network
ifcfg-eth0
ifcfg-eth1
ifcfg-lo
…
( I am only telling the network interfaces )
ls ls /etc/sysconfig/hardware
hwcfg2rules
When I run “ip a s” i get
1 : lo < LOOPBACK, UP, LOWER, UP >
…
inet 127.0.0.1
2 : eth3 < BROADCAST, MULTICAST>
link ether…
Problem : i have some services started after boot.
Apache is one of them, process is running, checked with "ps aux | grep apache ".
I would like to access the web sites apache is serving from my host
computer ( Win 7 ) but so far i had no luck ( or sufficient knowledge ) in
doing this.
I tried adding another hardware config file hwcfg-eth1, but maybe I’m tapping in the dark with
this…
I checked the route tables, result is :
loopback * 255.0.0.0 U 0 0 lo
Should i add another route the these tables so i can get to the outside “world” from
suse vm ?
Although I use many other VM technologies but do not use VirtualBox,
IMO you’re probably looking at a scenario that is common to all virtualization technologies, and not unique to Virtual Box…
Typically VMs are configured like regular Host machines to point to DNS or a NetBIOS Name Server for name resolution, and unless the Name Server is part of a Domain, it won’t contain records of LAN hosts. It’s misleading to believe that just because a VM is running on a Host that the two should be able to “see” each other automatically.
If this is your situation, the steps to resolve
First, be certain what IP addresses your network resource (eg web server) is bound to, excluding Localhost (127.x.y.z). Localhost in a VM will only point to itself (not the Hostmachine) and the same for the Hostmachine. most often it will be a Class C Private address space (192.168.x.y0.
Then, your various options
If you have control over your LAN DNS, configure appropriate entries.
Configure Hosts files on each VM and physical machine pointing to other machines or resource’s private address (see above).
Websites use Hostname resolution as described. If you are instead trying to configure Network Shares, depending on the type of Share you may need to configure NetBIOS name resolution by configuring a NetBIOS Name Server or LMhosts file in each VM and physical host.