What's a "network device". Other than that, I have been running my DNS on VMs for ages. One could choose to run that in container, which is just as fine. The only thing to keep in mind is that, if the VM server is down for whatever reason, so is your DNS. Maybe you can deploy a RPi as a secondary or even tertiary DNS server, just in case your VM server goes down. I do have that setup at home, whereas at work we are running a bigger cluster, so the likelyhood of every VM server going down is minimal.