I have a Windows Server 2019 machine hosting a hyper-V VM with a public service running. I created an internal VMSwitch then configured it as a NAT Gateway with New-NetIPAddress. Then I created a New-NetNat. On my VM I configured it with a manual static IP and set the gateway to the host. Then in Server Roles I added Routing and Remote Access and configured NAT to set up port forwarding to my VM. This way I can host RDP and other services from the VM.
Now, some time later, I also want to be able to host docker containers from my host. The Docker daemon won’t start. When I try to run %ProgramFiles%\Docker\Docker\resources\dockerd.exe I get the following error:
failed to start daemon: Error initializing network controller: Error creating default network: failed during hnsCallRawResponse: hnsCall failed in Win32: The request is not supported. (0x32)
As far as I can tell it’s because I have my own NAT running…
So now I’m thinking of tearing down my existing NAT and perhaps using the default docker nat. I understand how to set up port forwarding for a docker container when I start it - is it possible to use the default docker nat for port forwarding to my existing hyper-V VM? If so, how? Currently I set up the port forwarding in the Routing and Remote Access mmc panel - if not there, then where?