So, no matter what, you will always need a Linux VM to run Linux OS inside a Windows OS host.
Right now, yes. There is Windows Subsystem for Linux, which allows you to run a particular subset of Linux software natively on Windows. If WSL gets appropriate ioctls to do containers natively, then that might change.
But if you were, let's say, using Ubuntu as a host, you can use a Container to run a different OS like Centos?
It would still share the kernel (and maybe init system? I'm not 100% certain on this) with the host, but you can, subject to these restrictions, run a "different OS" in a container, or just an individual application (which is the more common use case AFAIK)
Containers don't usually share the init. Most of the time, containers create a PID namespace, which makes the first forked process in the namespace PID1, so you can actually run a different init in the container. systemd-nspawn (a simple container runtime), however, has some useful integrations if you use systemd inside the container.
That said, it's possible to make a container that doesn't share init, you just don't create a PID namespace. Most of the popular container runtimes are either emulating VMs (systemd-nspawn, lxc/lxd) or designed to ease immutable deployments (docker, rkt), and in both of these cases, it is useful to create a PID namespace, so popular container runtimes don't share init.
View all comments
Show parent comment
2
u/aaron552 Jul 17 '17 edited Jul 17 '17
Right now, yes. There is Windows Subsystem for Linux, which allows you to run a particular subset of Linux software natively on Windows. If WSL gets appropriate ioctls to do containers natively, then that might change.
It would still share the kernel (and maybe init system? I'm not 100% certain on this) with the host, but you can, subject to these restrictions, run a "different OS" in a container, or just an individual application (which is the more common use case AFAIK)