I am having trouble to ping my vm from windows docker container, here is my set up.
vm ipconfig
Ethernet adapter Ethernet 8:
Connection-specific DNS Suffix . : mshome.net
Link-local IPv6 Address . . . . . : fe80::7011:8cbe:1c0b:abba%5
IPv4 Address. . . . . . . . . . . : 172.26.155.70
Subnet Mask . . . . . . . . . . . : 255.255.240.0
Default Gateway . . . . . . . . . : 172.26.144.1
This is my docker default nat network
docker network inspect nat
[
{
"Name": "nat",
"Id": "a6b61d41933265c941e3f0b1fe3b076651493d8fb686b0b4e3e3a1766f2aff2a",
"Created": "2024-11-16T10:13:21.9951025+13:00",
"Scope": "local",
"Driver": "nat",
"EnableIPv6": false,
"IPAM": {
"Driver": "windows",
"Options": null,
"Config": [
{
"Subnet": "172.30.144.0/20",
"Gateway": "172.30.144.1"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {},
"Options": {
"com.docker.network.windowsshim.hnsid": "7E0ECD2C-54A5-4F3D-BB40-C7B4DAADB159",
"com.docker.network.windowsshim.networkname": "nat"
},
"Labels": {}
}
]
And I can not ping when I run: (request timed out is the output I got)
docker run `
--name test `
--rm `
--interactive `
--entrypoint powershell.exe `
mcr.microsoft.com/powershell:latest `
ping 172.26.155.70
Can someone help me how to solve this?
I also tried to add a route on my host machine but it didn’t work either, maybe I added with wrong ip address. I want to able to ping my vm from my windows container.
Any help or suggestions please!