Hi ,
Based on my understanding, you want to manually assign private IP to the VM and allow this VM to have internet access. Is that right? Please feel free to let me know if I have any misunderstanding.
If yes, you can deploy a NAT Virtual Switch which allows virtual machines to have an internal network and have internet access. Each VM is connected to an internal virtual switch and will use WinNAT to connect to a private IP subnet. WinNAT gives a machine access to network resources using the host computer's IP address.
As the picture below:
For more details about how to using a NAT Virtual Switch with Hyper-V, you could refer to the following article:
Using a NAT Virtual Switch with Hyper-V
Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
Best Regards,
Candy
--------------------------------------------------------------
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.