VirtualBox Backup Network Problem

Hello,

We're using a VirtualBox (version 3) for a virtual PC.
The problem is that somehow the .xml file is corrupt and the virtual PC cannot be started.
To fix this problem, we followed:
http://art.ubuntuforums.org/showthread.php?p=8707678
which fixed the problem and allowed me to start up the virtual PC.

The next problem is that the network is changing to eth1, eth2, eth3, and so on instead of the original eth0.
For this, we fixed it following:
http://blog.computerant.com/2010/01/02/virtualbox-cloning-ubuntu
which again, fixes the problem. I assigned the old MAC address via VBox GUI and restart the virtual PC. I correctly ended up with eth0 (well almost. at first the "network connection" shows "ifupdown eth0" instead, but after playing around with the settings, I ended up with just eth0).

The problem is that I cannot connect to the internet from the virtual PC.
I can ping the host PC interface: 15.0.0.6
and the gateway (on a router) 15.0.0.1
but not the dns server (eg:) 212.12.12.12
and not yahoo.com nor google .com

I've tried

From the Host PC:
I can ping the virtual PC: 15.0.0.7
and browse the internet.

I've tried adding the dns address 212.12.12.12 to  /etc/resolv.conf but it doesnt work.

My setup is:
Host:
Ubuntu 8.04LTS
2 Lan interface: eth0=15.0.0.5, eth1=15.0.0.6
On VirtualBox panel, 15.0.0.6 is bridged to the virtualPC

Virtual PC:
Ubuntu 9.10
IP=15.0.0.7

Both 15.0.0.5 and 15.0.0.6 is connected to a switch which is connected to a router.

I've also tried:
>sudo default gw 15.0.0.1 dev eth0
per http://forums.virtualbox.org/viewtopic.php?f=7&t=24114&start=15

Please note that prior to the xml error, the guest was able to connect to the internet.

Please help.

Thank You so much.
SW111Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

BawerCommented:
if you want to connect via VB to internet then change the network card to NAT...
0
SW111Author Commented:
Bawer, Thanks for the reply.
Before the problem I was using Bridge and also, the part I'm not sure about NAT is that I need to set the Virtual PC's IP address static so it can fit to our network.
0
rindiCommented:
Try changing the DNS entry to the IP of the router.
0
What were the top attacks of Q1 2018?

The Threat Lab team analyzes data from WatchGuard’s Firebox Feed, internal and partner threat intelligence, and a research honeynet, to provide insightful analysis about the top threats on the Internet. Check out our Q1 2018 report for smart, practical security advice today!

SW111Author Commented:
Rindi, just tried that. It doesnt work. btw, please note that even pinging the dns server's ip address from the guest will not work. Ping from host will work. This brings me to the conclusion that its not a dns issue but more of a policy/routing issue. Except that the routing should work on the router/firewall side. So it has to be either the ubuntu guest or virtualbox internal setting. (more likely virtualbox though, because before the xml problem it used to work).
0
rindiCommented:
Have you tried using DHCP and not a static IP? Also post what ifconfig -a outputs on the host.
0
SW111Author Commented:
No, I havent tried DHCP because there's no dhcp server on that subnet.


eth0      Link encap:Ethernet  HWaddr 00:15:17:83:2f:14
          inet addr:15.0.0.5  Bcast:15.0.0.255  Mask:255.255.255.0
          inet6 addr: fe80::215:17ff:fe83:2f14/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1044024 errors:0 dropped:0 overruns:0 frame:0
          TX packets:688013 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:306875515 (292.6 MB)  TX bytes:212318124 (202.4 MB)
          Base address:0x2020 Memory:b8820000-b8840000

eth1      Link encap:Ethernet  HWaddr 00:15:17:83:2f:15
          inet addr:15.0.0.6  Bcast:15.0.0.255  Mask:255.255.255.0
          inet6 addr: fe80::215:17ff:fe83:2f15/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:483263 errors:0 dropped:0 overruns:0 frame:0
          TX packets:170953 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:98796615 (94.2 MB)  TX bytes:81701312 (77.9 MB)
          Base address:0x2000 Memory:b8800000-b8820000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:571560 errors:0 dropped:0 overruns:0 frame:0
          TX packets:571560 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:122662596 (116.9 MB)  TX bytes:122662596 (116.9 MB)

vboxnet0  Link encap:Ethernet  HWaddr 0a:00:27:00:00:00
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Open in new window

0
rindiCommented:
You still have 2 nics active on the same subnet. Disable one of them and only concentrate on the other. Also disable ip6. Doesn't your router have it's DHCP server enabled? Are you using networkmanager to configure the interface? It's usually easier to disable that, particularly if you are using static IP's, and then edit the interfaces file in /etc/network.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SW111Author Commented:
Hi Rindi,

Sorry.... my bad. I have got no idea why this happened, but the firewall that I have (hardware firewall) is somehow allowing 15.0.0.2-15.0.0.6 to pass to the internet and not 15.0.0.7 and up. I didnt thought of this possibility before. Anyhow once the firewall is fixed by the network guy, only one remainig problem:

15.0.0.7 still will not connect but 15.0.0.8 and up will. I have got no idea why but my solution is to simply change the virtual PC address to something other than 15.0.0.7. And it worked. Thank you for your help.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Distributions

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.