Docker Community Forums

Share and learn in the Docker community.

How to deploy to (bare) Hyper-V server?


(Petri Savolainen) #1

People typically run HyperV on a Windows 10 host, or a Windows Server.

In contrast, Microsoft Hyper-V server is a standalone, basic (“bare metal”) virtualization server. Typically you manage it remotely from a (Windows 10 or Server) system with HyperV management tools installed.

Now, none of the docs on deploying Docker indicate it is possible to directly deploy Docker containers to a Hyper-V standalone server. They all talk of deploying to Windows 10 or Windows Server that have HyperV, which is not what I am after.

I understand I can use regular Microsoft tools to deploy a VM to HyperV standalone server, and then access the VM and deploy docker (containers) on that.

But is there any more direct method provided by Docker or a third party? Such that can help with automatic provisioning? Preferably something that inculdes as little Power(s)Hell scripting as possible.

Another approach would be a ready-made stripped-down purposebuilt linux distro for running docker containers inside HyperV, such that is installed once using regular HyperV tools and after that would provide tools that docker can remotely use to provision containers, effectively bypassing Microsoft HyperV tools and protocols completely. Does such a thing exist?


(Michael Friis) #2

Unless you can install the Docker Engine on the Hyper-V standalone host (which I don’t know a lot about), then there’s no way to do this. Note that you can run Docker on Windows Server Core just fine, if you’re looking for a minimal host OS.


(Nicholas Orr) #3

I am looking into this as well.

From running docker for windows on my windows 10 laptop, it is pretty much hyper-v > guest os > docker containers. if you switch to windows containers it looks like it is hyper-v > docker containers, however that is not the useful as i need to run linux stuff, not windows stuff…

an interesting thing about hyper-v is it can run hyper-v inside hyper-v.

I’m in a 12month lease on a dedicated server and figuring out which way to go. Been playing with hyper-v here locally and it is pretty great, so was curious about running bare metal on this server as having access to windows desktops that are fast is appealing. xen server is probably fast enough I guess and is the alternative I’m looking at.

There is hyper.sh, their stack is open source (https://hypercontainer.io/) and it is the closest I’ve seen to docker on baremetal while maintaining boundaries between environments. I want to run a bunch of projects that really have no business being exposed to each other and as such should run on different dedicated hardware. That is pretty expensive though, this dedicated box can easily run everything, it is just a matter of picking an appropriate hypervisor and going from there.

So Given the above I’m going to give hypercontainer a shot, it fits the kubernetes paradigm of pods - will see how that plays out…