Activation of network connection failed - Ubuntu 18.04 VM guest on Windows 10 Hyper-V Host

I have a Ubuntu 18.04 VM guest running in Windows 10 hyper-v. The VM had previously been able to connect to the internet successfully. It recently stopped being able to connect and I cannot recall changing something.

It uses the Default Switch of Hyper-V .

Running sudo tail -f /var/log/syslog I get the following relevant messages.

Oct 29 16:27:25 ubuntu-vm hv_kvp_daemon[318]: sh: 1: /usr/libexec/hypervkvpd/hv_get_dns_info: not found

Oct 29 16:27:25 ubuntu-vm hv_kvp_daemon[318]: sh: 1: /usr/libexec/hypervkvpd/hv_get_dhcp_info: not found

A Network notification also pops up in the VM desktop UI, that says

Connection Failed

Activation of network connection failed

I attach the pop up as an image for completeness.

What steps can I follow to connect the guest vm to the internet.

Connection Failed.
Activation of network connection failed


I have Hyper-V here and all working well.

Check the Virtual Switch setup in Hyper-V Manager and all the settings. I have an External Switch (so bridged) and it remains working.

Perhaps make sure the machine is safe, remove Hyper-V (Windows Features), restart, enable Hyper-V and restart again.

What I have done in the past to gain access again from the guest machine was to disable the Hyper-V manager service in the host and restart the PC.The Hyper-V service was restarted automatically, with internet connection.