-
Hello everyone 😊 I am pretty new to containers and to play and test I decided to deploy Containers under Windows Server 2019 in my home Hyper-V lab. I have deployed containerd / buildkit / nerdctl and I cannot start containers that need ports linked to the nat interface. The image builds correctly but when I am trying to run the container, in full debug mode nerdctl shows the following error: I suppose this is a normal warning, because I configured CNI with no specific nerdctl file... containers with no ports run correctly using the default nat interface with the right subnet configuration. level=warning msg="default network named "nat" does not have an internal nerdctl ID or nerdctl-managed config file, it was most likely NOT created by nerdctl" The problem seems to be there: level=fatal msg="plugin type="nat" name="nat" failed (add): error creating endpoint hcnCreateEndpoint failed in Win32: Element not found. (0x490) {"Success":false,"Error":"Element not found. ","ErrorCode":2147943568} : endpoint config &{ b4a9bad7378ad8c1605a6e224f9e9f5030166cf499a5331bafefaaffc45a43f1_nat 3ce88b30-d034-4f84-b88b-7f443af33a33 [{PortMapping I have been searching and trying to find more information on this issue but I cannot find something similar or recent about it, I am aware that containerd / nerdctl have some limitations under Windows, but I did not expect this issue. Tracing with procmon.exe, I see that nerdctl tries to create/find a file, in the root drive where I launch the command... this file does not exists, not even the path... I have not been able to find on the docs anything related on how to control this behavior: Class: File System The Path definitely matches the "not found" error in nerdctl output. This is "nerdctl version output" (I have also tried with nerdctl 2.0-rc) time="2024-07-17T09:40:58+02:00" level=warning msg="unable to determine runc version: exec: "runc": executable file not found in %PATH%" Server: CNI is 0.3.0 for Windows. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
As said, starting nerdctl with "-p" returns the error, but starting without the port command... starts the container and the files specified got created even if the path does not exist: The container honors the CNI config and gets IP Address assigned, just fine: Interestingly... the container has no connectivity outside the nat.... running it with "ctr" instead of "nerdctl" do it just fine. |
Beta Was this translation helpful? Give feedback.
The problem solved after re-creating the "nat" adapter in windows.
Still curious about what triggered the issue, and why nerdctl write those files in the root of the volume where it is started instead of its own programdata directory.