networking – Unable to get Ubunto’s VM internal network behind a NAT to use the host connection

I have setup a NAT network with an internal virtual switch using the below commands:

New-VMSwitch -SwitchName "NAT" -SwitchType Internal
New-NetIPAddress -IPAddress -PrefixLength 24 -InterfaceAlias "vEthernet (NAT)"
New-NetNAT -ame "NATNetwork" -InternalIPInterfaceAddressPrefix

I configured my Ubuntu VM on Hper-V to use the “NAT” internal network switch on the VM settings of the Hyper-V, however I cannot get an internet connection.
my route table on the VM is below:

default via dev eth0 proto static metric 20100 dev eth0 scope link metric 1000 dev eth0 proto kernel scope link src metric 100 

Edit: I’m able to ping the VM from the host machine and vice versa