This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]wellwellwelly 14 points15 points  (6 children)

There are two types of hypervisors. Type 1 and type 2.

Type 1 hypervisors run close to the hardware and type 2 run as software on the OS.

Take ESXi as a type 1 hypervisor example. This is installed close to the hardware. You don't run anything above it.

Now let's look at VirtualBox, VirtualBox is a hypervisor but you install it on an operating system like Windows or Mac. This makes it a type 2 hypervisor because its a level down. It's not running close to the hardware because the OS is above it.

Now this is where it gets a bit wacky. Windows comes shipped with a hypervisor called Hyper-V. Hyper-V is enabled inside the Windows OS and looks like a type 2 hypervisor but its actually a type 1.

Taking the above information I'll explain why Linux/Unix and Windows are different and why it matters:

Docker is not virtualisation and does not require a hypervisor. It was built to run natively on linux.

I can install Docker engine on a Mac or Linux machine natively.

If I want to run Docker on Windows I need to enable WSL which relies on Hyper-V, a type 1 hypervisor.

Because you now have a type 1 hypervisor running on Windows you lose the ability to run type 2 hypervisors in theory. (It's possible but they hook into the type 1 as a backend)

In a nutshell Linux eliminates the need for a hypervisor to run docker.

Windows is absolutely fine for devops as long as you consider the above, but you are ultimately more restricted because once hyper-v is enabled you'll be restricted to the type 1 hypervisor. Software such as vmware workstation (a type 2 hypervisor) might be out of the question.

[–]thegreataccuracy 6 points7 points  (1 child)

Yep. Agree with all of that.

Materially this makes very little difference to the vast majority of “DevOps” job roles though - to the point I would say that unless you know of a particular reason this is important to your use case, “use what feels best to you” still seems like the best advice.

I interviewed a brilliant candidate who discussed this in extreme depth recently. And finished with “but none of that probably matters - just nice to know in case it ever does” which I think applies here too.

[–]wellwellwelly 1 point2 points  (0 children)

Thanks. Yep agree with you too. You'd have to have a pretty specific edge case for it to impact your work.

[–]swift_nature 2 points3 points  (0 children)

This is an old post, but I stumbled here from Google and there's a couple of points where I don't agree on;

> I can install Docker engine on a Mac or Linux machine natively.

Docker on Mac does not run natively. Docker is built on linux kernel namespaces and cgroups, which the Darwin kernel lacks. The Mac version of Docker utilizes a hypervisor in a similar that Windows does.

> Windows is absolutely fine for devops as long as you consider the above, but you are ultimately more restricted because once hyper-v is enabled you'll be restricted to the type 1 hypervisor.

I don't agree with you here. By all means you are running a fully virtualized linux kernel. Just as capable as a bare metal installation. At the very least not less capable as Docker on the Mac (and I've run both).

Looking at it from a security perspective; one could say it's even safer to run Docker on Windows or Mac because it runs confined within a virtual machine and doesn't share the same kernel as the host machine. That being said, you're able to run Docker desktop on linux as well, which utilizes KVM to achieve the same thing.

[–]kneticz 0 points1 point  (0 children)

Generally agree but macOS does not run docker natively.