No network if host network started after booting guest

Discussions about using Windows guests in VirtualBox.
Post Reply
janzon
Posts: 5
Joined: 8. Oct 2009, 14:30
Primary OS: Debian Lenny
VBox Version: OSE Debian
Guest OSses: Windows 7

No network if host network started after booting guest

Post by janzon »

Can someone explain why (2) below doesn't work?

(1) I start VirtualBox. Then I start the network on my Linux host. Then I boot Windows 7 as a virtual guest. The network in Windows 7 works fine.

(2) I start VirtualBox. Then I boot Windows 7 as a virtual guest. Then I start the network on my Linux host. After that, I go to "devices" and virtually unplug and replug the network adapter for the Windows 7 machine. The network doesn't work in Windows 7.

Due to the computer/network setup I have, this is extremely annoying so a solution would be really appreciated!
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: No network if host network started after booting guest

Post by Sasquatch »

Default NAT, which you probably are using, only works when the Host has full connectivity, because some translations are made. The same would happen if you move from one network to another while the VM is running. You will loose internet on the VM because the route and DNS are no longer valid. In this case, no DNS is known on the Host, so the Guest doesn't get one either.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
janzon
Posts: 5
Joined: 8. Oct 2009, 14:30
Primary OS: Debian Lenny
VBox Version: OSE Debian
Guest OSses: Windows 7

Re: No network if host network started after booting guest

Post by janzon »

But in scenarion (2), as I describe, I do start the network, only later. And I let Windows issue a DHCP request (also asking for DNS servers) only after the network on the Linux host is configured properly. This I do by virtually unplugging the network adapter and plugging it back in again. I see that the Windows guest tries to acquire new network settings, but it fails. I get's an IP and can ping it's gateway, but that's all.

Did I misunderstand your reply?
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: No network if host network started after booting guest

Post by Sasquatch »

You misunderstood the part about the translations. These are made when the VM starts, not when the Host network changes. Like I said, it's the same situation as you would move from one network to another with different settings but keep the VM running. No matter what you do, it won't work until you either move back to the original network, or shut down the Guest and boot it again.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Post Reply