I have a CentOS 7 Hyper-V VM running on Windows Server 2012 R2 that acts as my Docker host. I'm trying to place my containers in a LAN with other VMs by using Docker's macvlan network driver.


docker create network -d macvlan --subnet= --gateway= -o parent=eth0 macnet


docker run --net=macnet -it --ip= ubuntu bash

From the container, I'm unable to ping the gateway. I did tcpdump -n -i eth0 on the Docker host and saw arp requests from the container but no replies. The Docker host VM's NIC is an external network virtual switch which I suspect is the cause. Is there some configuration that I'm missing?


You need enable promiscuous mode in Hyper-V.

Hyper-V > VM > Settings > NIC (click plus) > ADVANCED FEATURE > Enable MAC Address Spoofing

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.