If you don't want to use Hyper V's default private network switch that gets a random IP on every reboot here is the solution.

  1. Open up a power shel as administrator
  2. Create a new network interface:
    New-VMSwitch -SwitchName "NATNetworkSwitch" -SwitchType Internal
  3. Assign an IP to it:
    New-NetIPAddress -IPAddress 10.55.55.1 -PrefixLength 24 -InterfaceAlias "vEthernet (NATNetworkSwitch)"
  4. Enable NAT:
    New-NetNAT -Name "NATNetwork" -InternalIPInterfaceAddressPrefix 10.0.1.0/24

 

Credit: https://mytechiethoughts.com/windows/easy-internet-access-for-hyper-v-guests-using-nat/