> The userland can mostly remain unchanged as long as you expose the expected interfaces.
In principle yes, but Linux exposes a lot of interfaces, not all of which are that well documented in all their corners, and some of which are leaky in their abstractions in a way that makes it ugly to implement them on top of other systems. Stuff like: procfs, inotify, cgroups, Linux-specific syscalls like epoll, weird mechanisms like vDSOs, etc. The most heroic attempt I've seen to get all this working on top of another kernel is SmartOS's LX-branded zones, which are really quite impressive and implement most of what I just mentioned, although I believe even they are not 100% [1].
In principle yes, but Linux exposes a lot of interfaces, not all of which are that well documented in all their corners, and some of which are leaky in their abstractions in a way that makes it ugly to implement them on top of other systems. Stuff like: procfs, inotify, cgroups, Linux-specific syscalls like epoll, weird mechanisms like vDSOs, etc. The most heroic attempt I've seen to get all this working on top of another kernel is SmartOS's LX-branded zones, which are really quite impressive and implement most of what I just mentioned, although I believe even they are not 100% [1].
[1] These slides gave an overview of what worked and what didn't as of 2015. Not sure if there's a good updated ref, as I'd assume some things have progressed since then. http://us-east.manta.joyent.com/patrick.mooney/public/talks/...