I have an application that specifically requires a transparent network, and I’m hoping to run it within a Hyper-V virtual machine running Windows Server.
My suspicion is that this is just impossible because a transparent network depends on a vSwitch, which is itself a part of Hyper-V and thus cannot be installed or managed in a Hyper-V VM… However I have been able to successfully create a transparent network on the VM and start a container on that network, which might indicate that it’s a possibility. That container, however, doesn’t appear to actually have network access, so I’m hoping for some insight into what might be going on.
The host is running Windows Server 2022 Standard, and Docker CE 27.3.1. I’m running a container based on mcr.microsoft.com/powershell:7.3-windowsservercore-ltsc2022
.
Here’s the output of a network inspect:
[
{
"Name": "transparentnet",
"Id": "7d766e69cd502dc2e5c2ac34c0bfd05ab5fedd3cf03718540b71411007b8062a",
"Created": "2024-12-23T12:10:36.8909284-08:00",
"Scope": "local",
"Driver": "transparent",
"EnableIPv6": false,
"IPAM": {
"Driver": "windows",
"Options": {},
"Config": [
{
"Subnet": "10.90.0.0/21",
"Gateway": "10.90.0.1"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"216fa2bcc704683f508360c6aafeb493a41e3fac3935ab4051fa7d431ff518c6": {
"Name": "awesome_cohen",
"EndpointID": "52d84fdbe89e9704f1d60cfe7fb4899128c76d1531c3996c156ac650ebacec36",
"MacAddress": "00:15:5d:7f:00:d2",
"IPv4Address": "10.90.0.124/8",
"IPv6Address": ""
}
},
"Options": {
"com.docker.network.windowsshim.hnsid": "2A226343-E4EF-47B6-98B5-DF253D7B0AB8",
"com.docker.network.windowsshim.interface": "Ethernet",
"com.docker.network.windowsshim.networkname": "transparentnet"
},
"Labels": {}
}
]
Interestingly, I did not explicitly specify that 10.90.0.124 IP address, so it appears to have picked it up via DHCP… But the IP and MAC are not showing up on our router, so maybe not? The ipconfig
and route print
output look healthy as well, but I cannot ping the gateway.
Anyhow as stated I suspect this is just impossible, but if anybody has any interesting information or ideas on the matter I’d like to hear them. Thanks!