W11 22H2 Hyper-v network debugging

As it took me most of a day to understand this is a bug in 22H2, I’ll save you all the trouble: to use network debugging of hyper-v vms on an external switch (e.g. from your hyper-v host to the vm) , on W11 22H2 you have to disable the switch extensions that are enabled by default. Specifically Microsoft Azure VFP Switch Filter Extension and Microsoft NDIS Capture.

Failure symptoms: your vms have default 169.254 ip addresses.

I’ve had good results using kdnet over VMBus (“synthetic”) as described in https://withinrafael.com/2015/02/01/how-to-set-up-synthetic-kernel-debugging-for-hyper-v-virtual-machines/