First in a powershell create a new network switch
New-VMSwitch -SwitchName "Hyper-V [VM NAT]" -SwitchType Internal
Get-NetAdapter // (note down ifIndex of the newly created switch as INDEX)
New-NetIPAddress -IPAddress 192.168.0.1 -PrefixLength 24 -InterfaceIndex <INDEX>
New-NetNat -Name HyperV-NATnetwork -InternalIPInterfaceAddressPrefix 192.168.0.0/24
In your ubuntu server open your network netplan