Page 1 of 1

No network if host network started after booting guest

Posted: 8. Oct 2009, 14:38
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!

Re: No network if host network started after booting guest

Posted: 8. Oct 2009, 15:24
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.

Re: No network if host network started after booting guest

Posted: 9. Oct 2009, 15:05
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?

Re: No network if host network started after booting guest

Posted: 9. Oct 2009, 15:50
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.