Why do my Client Hyper-V connections keep dying?
I have Client Hyper-V on Win8, hosting a few VMs like ubuntu, a clean windows build-machine, etc. My VMs are connected to an external virtual-switch (shared with the management OS), and that works fine... for a while - they can see the world. However, after an indeterminate time, when I resume the guest VM it won't have internet access. It simply can't see out. Shutting down the guest completely and restarting it doesn't help.
Currently, the only way I can "cure" this is to suspend the guests, go into Virtual Switch Manager, remove my virtual-switches, re-add the same virtual-switches, and reactivate the guest OS. Then it immediately works. This even works if the guest was just paused (not fully shut down).
Is this a common fault? What can I do to prevent this?
Update: after experimentation, it seems I only need to delete / re-add the external virtual-switch. Until then, the guest OS thinks it is disconnected.
Solution 1:
This might be a driver issue.
For example, in the thread Hyper-V Virtual Switch (Windows 8) the solution was to downgrade to Windows 7 drivers, rather than using the ones that windows 8 installed.
Solution 2:
The issue here was (as harrymc rightly noted) dodgy drivers and/or hardware, in this case an on-board Marvell network adapter. It was not possible to follow the "use an older driver" approach (it simply doesn't install, and I'm not sure that is a great practice anyway), so I instead threw in an Intel CT network adapter (or a GT would probably be fine, if you lack a spare PCI Express slot).
With the on-board, this scenario would happen when suspending the host: it simply doesn't resume correctly as far as Hyper-V is concerned. With the dedicated NIC - it just works. If you are going to the trouble of replacing the NIC, you might as well get a well supported model / brand, hence why I went for the Intel.