-
I have a Hyper-V VM running ArchLinux, and during the setup, I shared a physical network interface with the VM’s virtual switch.
The VM itself works well, but something strange is, the network connection fails inside the VM, after I reboot the host machine.
At the first glance, it seems like a Hyper-V issue, but this problem only occurs on my home PC, not on my work PC. The only difference is that my work PC is connected to a wired network, while my home PC uses a WLAN connection.
The manual solution is simple: disable and re-enable the shared network connection in the Hyper-V settings, then the VM can access the network again.
I think it’s too cumbersome to do this every time I reboot the host machine, so I looked for a more permanent solution.
One of the solutions I was hit is to create a PowerShell script that runs at startup to automatically re-enable the shared connection. However, before I write such a script, I wanted to check if there is a more straightforward solution. And, I got it!
Read More