How to run linux VM hosted by hyper-v which runs docker

I have a Server 2016 hyper-v host I want to run a centos VM on that host that has docker installed on it

Is this possible? Do I need to enable nested virtualization somewhere?

Not sure on the Centos VM side - you do not need to enable it, but at hte moment you need to run a decently modern Intel processor (not AMD) as only that one supports nested virtualization.

It sounds convoluted, though. You would be better off running a Hyper-V Container on the windows server with one of the linux images https://blog.docker.com/2016/10/considerations-running-docker-windows-server-2016-hyper-v-vms/

Little late to but you need to expose virtualization extensions.

Set-VMProcessor <VMName> -ExposeVirtualizationExtensions $true

Do that when the machine is off and make sure you have an intel cpu.

Source