Windows 7 loses network connection after resume

Discussions about using Windows guests in VirtualBox.
Post Reply
trallallero
Posts: 4
Joined: 19. Feb 2014, 15:14

Windows 7 loses network connection after resume

Post by trallallero »

Hi all,

I have done, in a Mac, a nightly builder that resumes a Windows 7 VM, calls some python scripts to checkout/build/etc and then saves the VM state.
But the host is not relevant as the problem happens also on a Windows 8 host.
After some savestates/resumes, Windows cannot connect to the net because the media are disconnected ("Media State... Media disconnected")
Executing ipconfig /all or /renew, the following message is printed:
"No operation can be performed on Local Area Connection while it has its media disconnected."

The only way to fix the problem I've found, is to open VB, machine->settings->network and deselect "Cable Connected" and press ok.
Then the same but selecting "Cable Connected" and pressing ok.

Is there a way to execute this via shell ?
Or is it better to always shutdown the VM and restart it at every build ?

Thanks in advance.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Windows 7 loses network connection after resume

Post by Perryg »

Almost every command that is available in the GUI can be reproduced with VBoxManage.
http://www.virtualbox.org/manual/ch08.html

Setlinkstate sounds right.
trallallero
Posts: 4
Joined: 19. Feb 2014, 15:14

Re: Windows 7 loses network connection after resume

Post by trallallero »

Ok, thanks a lot, I'll try that asap.
Post Reply