The dream is alive! Running Linux containers on an illumos kernel

B
The dream is alive! 
Running Linux containers 
on an illumos kernel 
Bryan Cantrill 
CTO 
bryan@joyent.com 
@bcantrill
OS emulation: An old idea 
• Operating systems have long employed system call 
emulation to allow binaries from one operating system 
run on another on the same instruction set architecture 
• Combines the binary footprint of the emulated system 
with the operational advantages of the emulating system 
• Sun first did this with SunOS 4.x binaries on Solaris 2.x 
• With Solaris x86, it became possible to run binaries 
targeted for Linux via SCO’s (open source) “lxrun” 
• Packaging innovation in Linux in early 2000s + deeply 
differentiated technologies in Solaris 10 (e.g. ZFS, 
DTrace, zones) made Linux emulation more attractive
Rise of zones 
• While more important, the problem also became more 
complicated: programs became more complicated than 
single-process binaries 
• Clear that “lxrun” would only work for applications, not 
systems — needed a deeper solution 
• Fortunately, coincided with the rise of operating system 
virtualization embodied by zones 
• Idea: introduce notion of a branded zone whereby an 
entire foreign system (a brand) could be emulated within 
the confines of a zone
BrandZ: LX-branded zones 
• In 2006, team at Sun that included Nils Nieuwejaar and 
Russ Blaine integrated BrandZ, a Linux branded zone 
(PSARC 2005/471) 
• Support was a user/kernel hybrid: lx system calls 
bounced back to a user-level emulation library that 
depended on some in-kernel emulation (e.g. futexes) 
• Support was for RHEL 3 (!): glibc 2.3.2 + Linux 2.4 
• Remarkable amount of work was done to handle device 
pathing, signal handling, /proc — and arcana like TTY 
ioctls, ptrace, etc. 
• Worked for a surprising number of binaries!
What was missing? 
• Support was only for 2.4 kernels 
• Support for 2.6 required adding new, Linux-only 
mechanisms that had native analogues (e.g., epoll) 
• Only 32-bit was supported 
• XVM (the Xen-on-Solaris effort inside of Sun) had much 
more managerial support and was thought to be a “more 
supportable” solution
The decline of the lx brand 
After cresting in 2007, contributions to lx dwindled: 
30 
20 
10 
0 
2006 2007 2008 2009 2010 
Pushes to usr/src/lib/brand/lx
Clinically dead 
The lx brand was removed on June 11, 2010... 
30 
20 
10 
0 
2006 2007 2008 2009 2010 2011 2012 2013 
Pushes to usr/src/lib/brand/lx
The organ donation years 
• Joyent customers asked for SmartOS to support htop, a 
colorful Linux program for system process monitoring 
• htop is very, very specific to Linux /proc — and porting it 
to use illumos /proc seemed arduous and pointless… 
• ...but a relatively complete Linux /proc had integrated 
with the LX brand! 
• In April 2012, the /proc portion of the LX brand was 
extracted, cleaned up, and separately integrated 
• Mounted at /system/lxproc in SmartOS zones; htop 
modified to look for this path on illumos
Exhumed! 
• In January 2014, David Mackay, an illumos community 
member, announced that he was able to resurrect the lx 
brand —and that it appeared to work! 
Linked below is a webrev which restores LX branded zones 
support to Illumos: 
http://cr.illumos.org/~webrev/DavidJX8P/lx-zones-restoration/ 
I have been running OpenIndiana, using it daily on my 
workstation for over a month with the above webrev applied to 
the illumos-gate and built by myself. 
It would definitely raise interest in Illumos. Indeed, I have 
seen many people who are extremely interested in LX zones. 
The LX zones code is minimally invasive on Illumos itself, and 
is mostly segregated out. 
I hope you find this of interest.
Could it be revived? 
• David’s work inspired us to rethink LX-branded zones... 
• It seemed that the reasons for the discontinuation of LX 
brand support might not still be valid... 
• ...and it seemed that the engineering challenges might 
not be as structurally daunting
Has Linux made it easier? 
• Linux is moving much more slowly: pace of development 
of new user-visible kernel abstraction has slowed 
• Torvalds discovered religion on ABI compatibility 
• The need to run on older kernels has dissuaded 
software from using the more obscure Linux-isms 
• The glibc/kernel disconnect means that glibc (and apps!) 
must reasonably be able to process ENOSYS 
• Easier support model: the rise of the cloud has replaced 
shrink-wrapped software with open source + SaaS 
• Server focus: Mac OS X gave us Unix — and relegated 
“Linux on the desktop” to “Duke Nukem Forever” status
Have motivations changed? 
• Originally, LX branded zones were about bringing Linux 
applications into established Solaris environments for 
purposes of hardware consolidation 
• Port of KVM to illumos circa 2011 solved this problem 
• ...but KVM has unresolvable performance and resource 
limitations, and Linux on KVM only gets indirect benefit 
from ZFS, DTrace and zones 
• At the same time, enthusiasm for containers and OS-based 
virtualization have blossomed (ht: Docker) 
• There seems to be desire for a best-of-all worlds system 
that combines Linux strengths (binary footprint) with 
illumos technical differentiators (ZFS, zones, DTrace)
Reviving LX-branded zones 
• Encouraged that the body might not have decomposed, 
Joyent engineer Jerry Jelinek exhumed the LX brand 
and reintegrated it into SmartOS on March 20, 2014 
• Guiding principles: 
• Do it all in the open 
• Do it all on SmartOS master (illumos-joyent) 
• Add base illumos facilities wherever possible 
• Aim to upstream to illumos when we’re done 
• Thanks to Jerry grinding out many, many LX bug fixes, 
got Ubuntu 10.04 booting in April, Ubuntu 12.04 booting 
in May and Ubuntu 14.04 booting in July
IT’S ALIVE! 
Contributions to the lx brand since March: 
100 
lx 
brand/75 
lib/src/50 
usr/to Pushes 25 
0 
2006 2007 2008 2009 2010 2011 2012 2013 2014
So what have we done? 
• Fixed a ton of bugs (ht: LTP) 
• Added native epoll(5) — though not in terms of event 
ports but rather in terms of poll(7D) 
• Added exclusive IP stacks for LX-branded zones 
• Added support for netlink (RFC 3549) — but restricted 
that support to the lx brand 
• Added support for thunk-less native binaries within an 
LX branded zone 
• Added native inotify(5) 
• Added initial 64-bit support
What is left to do? 
• vsyscall support (needed for 64-bit) 
• Anything else for 64-bit 
• Stack switching (needed for Go) 
• Multi-threaded ptrace support 
• Lots of using it and figuring out what breaks!
How can you get involved? 
• SmartOS contains latest-and-greatest bits; first step is to 
get SmartOS running 
• We have a 32-bit Ubuntu 14.04 image that can be used 
to create a zone via vmadm: 
b7493690-f019-4612-958b-bab5f844283e 
• Will need to configure a VM with “kernel-version” set to 
3.13.0 and “brand” to “lx” in the vmadm JSON payload 
• If you find that something is boken, create an issue on 
the illumos-joyent github repo 
• Once 64-bit is working, we will be very actively seeking 
community engagement; stay tuned!
Thanks! 
• The original BrandZ team at Sun for a remarkable 
amount of work: Nils Nieuwejaar and Russ Blaine 
• The illumos community — especially David Mackay! — 
for inspiring the revival 
• Jerry Jelinek for leading the charge — and doing the 
vast majority of the work! 
• @rmustacc for thunk-less native binary support 
• @jmclulow for stack switching 
• @djhoffma for his work on ptrace 
• @joshwilsdon for vmadm support for LX brands
1 of 18

Recommended

Making Linux do Hard Real-time by
Making Linux do Hard Real-timeMaking Linux do Hard Real-time
Making Linux do Hard Real-timeNational Cheng Kung University
48.4K views136 slides
Embedded_Linux_Booting by
Embedded_Linux_BootingEmbedded_Linux_Booting
Embedded_Linux_BootingRashila Rr
513 views30 slides
Linux Internals - Interview essentials - 1.0 by
Linux Internals - Interview essentials - 1.0Linux Internals - Interview essentials - 1.0
Linux Internals - Interview essentials - 1.0Emertxe Information Technologies Pvt Ltd
2.6K views11 slides
Board Bringup by
Board BringupBoard Bringup
Board BringupAnil Kumar Pugalia
28.7K views16 slides
Linux Kernel and Driver Development Training by
Linux Kernel and Driver Development TrainingLinux Kernel and Driver Development Training
Linux Kernel and Driver Development TrainingStephan Cadene
3.5K views477 slides
Kernel linux lab manual feb (1) by
Kernel linux lab manual feb (1)Kernel linux lab manual feb (1)
Kernel linux lab manual feb (1)johny shaik
373 views274 slides

More Related Content

What's hot

Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard by
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime RipardKernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime RipardAnne Nicolas
7.2K views32 slides
Linux scheduler by
Linux schedulerLinux scheduler
Linux schedulerLiran Ben Haim
1.7K views18 slides
what is LINUX ? presentation. by
what is LINUX ? presentation.what is LINUX ? presentation.
what is LINUX ? presentation.saad_khan1122
1.2K views18 slides
Déportation d'une connexion Internet via WiFi by
Déportation d'une connexion Internet via WiFiDéportation d'une connexion Internet via WiFi
Déportation d'une connexion Internet via WiFiSiriki Coulibaly
2.7K views44 slides
Introduction to embedded linux device driver and firmware by
Introduction to embedded linux device driver and firmwareIntroduction to embedded linux device driver and firmware
Introduction to embedded linux device driver and firmwaredefinecareer
8K views16 slides
Enable DPDK and SR-IOV for containerized virtual network functions with zun by
Enable DPDK and SR-IOV for containerized virtual network functions with zunEnable DPDK and SR-IOV for containerized virtual network functions with zun
Enable DPDK and SR-IOV for containerized virtual network functions with zunheut2008
2.5K views32 slides

What's hot(20)

Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard by Anne Nicolas
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime RipardKernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Anne Nicolas7.2K views
what is LINUX ? presentation. by saad_khan1122
what is LINUX ? presentation.what is LINUX ? presentation.
what is LINUX ? presentation.
saad_khan11221.2K views
Déportation d'une connexion Internet via WiFi by Siriki Coulibaly
Déportation d'une connexion Internet via WiFiDéportation d'une connexion Internet via WiFi
Déportation d'une connexion Internet via WiFi
Siriki Coulibaly2.7K views
Introduction to embedded linux device driver and firmware by definecareer
Introduction to embedded linux device driver and firmwareIntroduction to embedded linux device driver and firmware
Introduction to embedded linux device driver and firmware
definecareer8K views
Enable DPDK and SR-IOV for containerized virtual network functions with zun by heut2008
Enable DPDK and SR-IOV for containerized virtual network functions with zunEnable DPDK and SR-IOV for containerized virtual network functions with zun
Enable DPDK and SR-IOV for containerized virtual network functions with zun
heut20082.5K views
Linux Instrumentation by DarkStarSword
Linux InstrumentationLinux Instrumentation
Linux Instrumentation
DarkStarSword9.7K views
Boost UDP Transaction Performance by LF Events
Boost UDP Transaction PerformanceBoost UDP Transaction Performance
Boost UDP Transaction Performance
LF Events6.9K views
Splash screen for Embedded Linux 101: How to customize your boot sequence by Pierre-jean Texier
 Splash screen for Embedded Linux 101: How to customize your boot sequence Splash screen for Embedded Linux 101: How to customize your boot sequence
Splash screen for Embedded Linux 101: How to customize your boot sequence
Pierre-jean Texier2.5K views
The Coming Firmware Revolution by bcantrill
The Coming Firmware RevolutionThe Coming Firmware Revolution
The Coming Firmware Revolution
bcantrill1.2K views
Towards Holistic Systems by bcantrill
Towards Holistic SystemsTowards Holistic Systems
Towards Holistic Systems
bcantrill5.7K views
Cilium - BPF & XDP for containers by Docker, Inc.
 Cilium - BPF & XDP for containers Cilium - BPF & XDP for containers
Cilium - BPF & XDP for containers
Docker, Inc.5.7K views
RISC-V Boot Process: One Step at a Time by Atish Patra
RISC-V Boot Process: One Step at a TimeRISC-V Boot Process: One Step at a Time
RISC-V Boot Process: One Step at a Time
Atish Patra1.5K views
Openstack Trunk Port by benceromsics
Openstack Trunk PortOpenstack Trunk Port
Openstack Trunk Port
benceromsics2.4K views

Viewers also liked

Kudos - A Peer-to-Peer Discussion System Based on Social Voting by
Kudos - A Peer-to-Peer Discussion System Based on Social VotingKudos - A Peer-to-Peer Discussion System Based on Social Voting
Kudos - A Peer-to-Peer Discussion System Based on Social VotingLuca Matteis
53.5K views16 slides
Down Memory Lane: Two Decades with the Slab Allocator by
Down Memory Lane: Two Decades with the Slab AllocatorDown Memory Lane: Two Decades with the Slab Allocator
Down Memory Lane: Two Decades with the Slab Allocatorbcantrill
3.2K views22 slides
Corporate Open Source Anti-patterns by
Corporate Open Source Anti-patternsCorporate Open Source Anti-patterns
Corporate Open Source Anti-patternsbcantrill
72.5K views22 slides
The State of Cloud 2016: The whirlwind of creative destruction by
The State of Cloud 2016: The whirlwind of creative destructionThe State of Cloud 2016: The whirlwind of creative destruction
The State of Cloud 2016: The whirlwind of creative destructionbcantrill
6.5K views19 slides
Lxbrand by
LxbrandLxbrand
Lxbrandmrbruning
1.2K views21 slides
Papers We Love: Jails and Zones by
Papers We Love: Jails and ZonesPapers We Love: Jails and Zones
Papers We Love: Jails and Zonesbcantrill
4.2K views44 slides

Viewers also liked(13)

Kudos - A Peer-to-Peer Discussion System Based on Social Voting by Luca Matteis
Kudos - A Peer-to-Peer Discussion System Based on Social VotingKudos - A Peer-to-Peer Discussion System Based on Social Voting
Kudos - A Peer-to-Peer Discussion System Based on Social Voting
Luca Matteis53.5K views
Down Memory Lane: Two Decades with the Slab Allocator by bcantrill
Down Memory Lane: Two Decades with the Slab AllocatorDown Memory Lane: Two Decades with the Slab Allocator
Down Memory Lane: Two Decades with the Slab Allocator
bcantrill3.2K views
Corporate Open Source Anti-patterns by bcantrill
Corporate Open Source Anti-patternsCorporate Open Source Anti-patterns
Corporate Open Source Anti-patterns
bcantrill72.5K views
The State of Cloud 2016: The whirlwind of creative destruction by bcantrill
The State of Cloud 2016: The whirlwind of creative destructionThe State of Cloud 2016: The whirlwind of creative destruction
The State of Cloud 2016: The whirlwind of creative destruction
bcantrill6.5K views
Lxbrand by mrbruning
LxbrandLxbrand
Lxbrand
mrbruning1.2K views
Papers We Love: Jails and Zones by bcantrill
Papers We Love: Jails and ZonesPapers We Love: Jails and Zones
Papers We Love: Jails and Zones
bcantrill4.2K views
The Container Revolution: Reflections after the first decade by bcantrill
The Container Revolution: Reflections after the first decadeThe Container Revolution: Reflections after the first decade
The Container Revolution: Reflections after the first decade
bcantrill5.4K views
Debugging node in prod by Yunong Xiao
Debugging node in prodDebugging node in prod
Debugging node in prod
Yunong Xiao186.8K views
Inside Docker for Fedora20/RHEL7 by Etsuji Nakai
Inside Docker for Fedora20/RHEL7Inside Docker for Fedora20/RHEL7
Inside Docker for Fedora20/RHEL7
Etsuji Nakai39.9K views
Event driven-automation and workflows by Dmitri Zimine
Event driven-automation and workflowsEvent driven-automation and workflows
Event driven-automation and workflows
Dmitri Zimine8.7K views
10 Social Media lessons - Barack Obama election campaign by Mark McNally
10 Social Media lessons - Barack Obama election campaign10 Social Media lessons - Barack Obama election campaign
10 Social Media lessons - Barack Obama election campaign
Mark McNally27.1K views
Photos vs Assets Library - いまさら始めるPhotos.framework by Kaname Noto
Photos vs Assets Library - いまさら始めるPhotos.frameworkPhotos vs Assets Library - いまさら始めるPhotos.framework
Photos vs Assets Library - いまさら始めるPhotos.framework
Kaname Noto20.8K views

Similar to The dream is alive! Running Linux containers on an illumos kernel

December 2020 CIALUG: Local Kubernetes for Dummies-So you want to move on fro... by
December 2020 CIALUG: Local Kubernetes for Dummies-So you want to move on fro...December 2020 CIALUG: Local Kubernetes for Dummies-So you want to move on fro...
December 2020 CIALUG: Local Kubernetes for Dummies-So you want to move on fro...Andrew Denner
107 views38 slides
Illumos — LOPSA SD by
Illumos — LOPSA SDIllumos — LOPSA SD
Illumos — LOPSA SDBrian Bennett
3K views28 slides
UNIT 3 HISTORY OF EMBEDDED LINUXEMBEDDED LINUX.pptx by
UNIT 3 HISTORY OF EMBEDDED LINUXEMBEDDED LINUX.pptxUNIT 3 HISTORY OF EMBEDDED LINUXEMBEDDED LINUX.pptx
UNIT 3 HISTORY OF EMBEDDED LINUXEMBEDDED LINUX.pptxEEEDept2
13 views44 slides
The Linux System by
The Linux SystemThe Linux System
The Linux Systemhusnaina_akhtar
1.5K views20 slides
Uklug2011.lotus.on.linux.report.technical.edition.v1.0 by
Uklug2011.lotus.on.linux.report.technical.edition.v1.0Uklug2011.lotus.on.linux.report.technical.edition.v1.0
Uklug2011.lotus.on.linux.report.technical.edition.v1.0dominion
722 views79 slides
Course 101: Lecture 5: Linux & GNU by
Course 101: Lecture 5: Linux & GNU Course 101: Lecture 5: Linux & GNU
Course 101: Lecture 5: Linux & GNU Ahmed El-Arabawy
736 views25 slides

Similar to The dream is alive! Running Linux containers on an illumos kernel(20)

December 2020 CIALUG: Local Kubernetes for Dummies-So you want to move on fro... by Andrew Denner
December 2020 CIALUG: Local Kubernetes for Dummies-So you want to move on fro...December 2020 CIALUG: Local Kubernetes for Dummies-So you want to move on fro...
December 2020 CIALUG: Local Kubernetes for Dummies-So you want to move on fro...
Andrew Denner107 views
UNIT 3 HISTORY OF EMBEDDED LINUXEMBEDDED LINUX.pptx by EEEDept2
UNIT 3 HISTORY OF EMBEDDED LINUXEMBEDDED LINUX.pptxUNIT 3 HISTORY OF EMBEDDED LINUXEMBEDDED LINUX.pptx
UNIT 3 HISTORY OF EMBEDDED LINUXEMBEDDED LINUX.pptx
EEEDept213 views
Uklug2011.lotus.on.linux.report.technical.edition.v1.0 by dominion
Uklug2011.lotus.on.linux.report.technical.edition.v1.0Uklug2011.lotus.on.linux.report.technical.edition.v1.0
Uklug2011.lotus.on.linux.report.technical.edition.v1.0
dominion722 views
Course 101: Lecture 5: Linux & GNU by Ahmed El-Arabawy
Course 101: Lecture 5: Linux & GNU Course 101: Lecture 5: Linux & GNU
Course 101: Lecture 5: Linux & GNU
Ahmed El-Arabawy736 views
Operating Systems: A History of Linux by Damian T. Gordon
Operating Systems: A History of LinuxOperating Systems: A History of Linux
Operating Systems: A History of Linux
Damian T. Gordon4.8K views
Linux command ppt by kalyanineve
Linux command pptLinux command ppt
Linux command ppt
kalyanineve81K views
Introducing Plan9 from Bell Labs by Anant Narayanan
Introducing Plan9 from Bell LabsIntroducing Plan9 from Bell Labs
Introducing Plan9 from Bell Labs
Anant Narayanan2.2K views
Being a Moby maintainer by Akihiro Suda
Being a Moby maintainerBeing a Moby maintainer
Being a Moby maintainer
Akihiro Suda1.1K views
introduction.pdf by xiso
introduction.pdfintroduction.pdf
introduction.pdf
xiso11 views
Linux a free and open source operating system by banwait
Linux a free and open source operating systemLinux a free and open source operating system
Linux a free and open source operating system
banwait816 views
Linux a free and open source operating system by banwait
Linux a free and open source operating systemLinux a free and open source operating system
Linux a free and open source operating system
banwait7.4K views
Embedded Webinar #13: "From Zero to Hero: contribute to Linux Kernel in 15 mi... by GlobalLogic Ukraine
Embedded Webinar #13: "From Zero to Hero: contribute to Linux Kernel in 15 mi...Embedded Webinar #13: "From Zero to Hero: contribute to Linux Kernel in 15 mi...
Embedded Webinar #13: "From Zero to Hero: contribute to Linux Kernel in 15 mi...
Introduction to OpenBricks: an Embedded Linux Framework by Benjamin Zores
Introduction to OpenBricks: an Embedded Linux FrameworkIntroduction to OpenBricks: an Embedded Linux Framework
Introduction to OpenBricks: an Embedded Linux Framework
Benjamin Zores1.8K views
From Zero to Hero - Contribute to Linux Kernel in 15 Minutes by GlobalLogic Ukraine
From Zero to Hero - Contribute to Linux Kernel in 15 MinutesFrom Zero to Hero - Contribute to Linux Kernel in 15 Minutes
From Zero to Hero - Contribute to Linux Kernel in 15 Minutes
Embedded Systems: Lecture 6: Linux & GNU by Ahmed El-Arabawy
Embedded Systems: Lecture 6: Linux & GNUEmbedded Systems: Lecture 6: Linux & GNU
Embedded Systems: Lecture 6: Linux & GNU
Ahmed El-Arabawy640 views

More from bcantrill

Predicting the Present by
Predicting the PresentPredicting the Present
Predicting the Presentbcantrill
30 views17 slides
Sharpening the Axe: The Primacy of Toolmaking by
Sharpening the Axe: The Primacy of ToolmakingSharpening the Axe: The Primacy of Toolmaking
Sharpening the Axe: The Primacy of Toolmakingbcantrill
248 views23 slides
Coming of Age: Developing young technologists without robbing them of their y... by
Coming of Age: Developing young technologists without robbing them of their y...Coming of Age: Developing young technologists without robbing them of their y...
Coming of Age: Developing young technologists without robbing them of their y...bcantrill
370 views21 slides
I have come to bury the BIOS, not to open it: The need for holistic systems by
I have come to bury the BIOS, not to open it: The need for holistic systemsI have come to bury the BIOS, not to open it: The need for holistic systems
I have come to bury the BIOS, not to open it: The need for holistic systemsbcantrill
1.6K views20 slides
Hardware/software Co-design: The Coming Golden Age by
Hardware/software Co-design: The Coming Golden AgeHardware/software Co-design: The Coming Golden Age
Hardware/software Co-design: The Coming Golden Agebcantrill
1.9K views49 slides
Tockilator: Deducing Tock execution flows from Ibex Verilator traces by
Tockilator: Deducing Tock execution flows from Ibex Verilator tracesTockilator: Deducing Tock execution flows from Ibex Verilator traces
Tockilator: Deducing Tock execution flows from Ibex Verilator tracesbcantrill
475 views7 slides

More from bcantrill(20)

Predicting the Present by bcantrill
Predicting the PresentPredicting the Present
Predicting the Present
bcantrill30 views
Sharpening the Axe: The Primacy of Toolmaking by bcantrill
Sharpening the Axe: The Primacy of ToolmakingSharpening the Axe: The Primacy of Toolmaking
Sharpening the Axe: The Primacy of Toolmaking
bcantrill248 views
Coming of Age: Developing young technologists without robbing them of their y... by bcantrill
Coming of Age: Developing young technologists without robbing them of their y...Coming of Age: Developing young technologists without robbing them of their y...
Coming of Age: Developing young technologists without robbing them of their y...
bcantrill370 views
I have come to bury the BIOS, not to open it: The need for holistic systems by bcantrill
I have come to bury the BIOS, not to open it: The need for holistic systemsI have come to bury the BIOS, not to open it: The need for holistic systems
I have come to bury the BIOS, not to open it: The need for holistic systems
bcantrill1.6K views
Hardware/software Co-design: The Coming Golden Age by bcantrill
Hardware/software Co-design: The Coming Golden AgeHardware/software Co-design: The Coming Golden Age
Hardware/software Co-design: The Coming Golden Age
bcantrill1.9K views
Tockilator: Deducing Tock execution flows from Ibex Verilator traces by bcantrill
Tockilator: Deducing Tock execution flows from Ibex Verilator tracesTockilator: Deducing Tock execution flows from Ibex Verilator traces
Tockilator: Deducing Tock execution flows from Ibex Verilator traces
bcantrill475 views
No Moore Left to Give: Enterprise Computing After Moore's Law by bcantrill
No Moore Left to Give: Enterprise Computing After Moore's LawNo Moore Left to Give: Enterprise Computing After Moore's Law
No Moore Left to Give: Enterprise Computing After Moore's Law
bcantrill4.1K views
Andreessen's Corollary: Ethical Dilemmas in Software Engineering by bcantrill
Andreessen's Corollary: Ethical Dilemmas in Software EngineeringAndreessen's Corollary: Ethical Dilemmas in Software Engineering
Andreessen's Corollary: Ethical Dilemmas in Software Engineering
bcantrill2.2K views
Visualizing Systems with Statemaps by bcantrill
Visualizing Systems with StatemapsVisualizing Systems with Statemaps
Visualizing Systems with Statemaps
bcantrill4.8K views
Platform values, Rust, and the implications for system software by bcantrill
Platform values, Rust, and the implications for system softwarePlatform values, Rust, and the implications for system software
Platform values, Rust, and the implications for system software
bcantrill6.8K views
Is it time to rewrite the operating system in Rust? by bcantrill
Is it time to rewrite the operating system in Rust?Is it time to rewrite the operating system in Rust?
Is it time to rewrite the operating system in Rust?
bcantrill27.4K views
dtrace.conf(16): DTrace state of the union by bcantrill
dtrace.conf(16): DTrace state of the uniondtrace.conf(16): DTrace state of the union
dtrace.conf(16): DTrace state of the union
bcantrill836 views
The Hurricane's Butterfly: Debugging pathologically performing systems by bcantrill
The Hurricane's Butterfly: Debugging pathologically performing systemsThe Hurricane's Butterfly: Debugging pathologically performing systems
The Hurricane's Butterfly: Debugging pathologically performing systems
bcantrill5.7K views
Papers We Love: ARC after dark by bcantrill
Papers We Love: ARC after darkPapers We Love: ARC after dark
Papers We Love: ARC after dark
bcantrill3.1K views
Principles of Technology Leadership by bcantrill
Principles of Technology LeadershipPrinciples of Technology Leadership
Principles of Technology Leadership
bcantrill5.4K views
Zebras all the way down: The engineering challenges of the data path by bcantrill
Zebras all the way down: The engineering challenges of the data pathZebras all the way down: The engineering challenges of the data path
Zebras all the way down: The engineering challenges of the data path
bcantrill17.1K views
Platform as reflection of values: Joyent, node.js, and beyond by bcantrill
Platform as reflection of values: Joyent, node.js, and beyondPlatform as reflection of values: Joyent, node.js, and beyond
Platform as reflection of values: Joyent, node.js, and beyond
bcantrill13.2K views
Debugging under fire: Keeping your head when systems have lost their mind by bcantrill
Debugging under fire: Keeping your head when systems have lost their mindDebugging under fire: Keeping your head when systems have lost their mind
Debugging under fire: Keeping your head when systems have lost their mind
bcantrill3.6K views
Oral tradition in software engineering: Passing the craft across generations by bcantrill
Oral tradition in software engineering: Passing the craft across generationsOral tradition in software engineering: Passing the craft across generations
Oral tradition in software engineering: Passing the craft across generations
bcantrill4.2K views
Debugging (Docker) containers in production by bcantrill
Debugging (Docker) containers in productionDebugging (Docker) containers in production
Debugging (Docker) containers in production
bcantrill5.1K views

Recently uploaded

Unleash The Monkeys by
Unleash The MonkeysUnleash The Monkeys
Unleash The MonkeysJacob Duijzer
7 views28 slides
DSD-INT 2023 The Danube Hazardous Substances Model - Kovacs by
DSD-INT 2023 The Danube Hazardous Substances Model - KovacsDSD-INT 2023 The Danube Hazardous Substances Model - Kovacs
DSD-INT 2023 The Danube Hazardous Substances Model - KovacsDeltares
8 views17 slides
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI... by
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...Marc Müller
37 views83 slides
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ... by
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...Deltares
10 views32 slides
DSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - Geertsema by
DSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - GeertsemaDSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - Geertsema
DSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - GeertsemaDeltares
17 views13 slides
DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut... by
DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut...DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut...
DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut...Deltares
7 views28 slides

Recently uploaded(20)

DSD-INT 2023 The Danube Hazardous Substances Model - Kovacs by Deltares
DSD-INT 2023 The Danube Hazardous Substances Model - KovacsDSD-INT 2023 The Danube Hazardous Substances Model - Kovacs
DSD-INT 2023 The Danube Hazardous Substances Model - Kovacs
Deltares8 views
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI... by Marc Müller
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...
Marc Müller37 views
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ... by Deltares
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...
Deltares10 views
DSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - Geertsema by Deltares
DSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - GeertsemaDSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - Geertsema
DSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - Geertsema
Deltares17 views
DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut... by Deltares
DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut...DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut...
DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut...
Deltares7 views
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports by Ra'Fat Al-Msie'deen
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug ReportsBushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports
Navigating container technology for enhanced security by Niklas Saari by Metosin Oy
Navigating container technology for enhanced security by Niklas SaariNavigating container technology for enhanced security by Niklas Saari
Navigating container technology for enhanced security by Niklas Saari
Metosin Oy13 views
Tridens DevOps by Tridens
Tridens DevOpsTridens DevOps
Tridens DevOps
Tridens9 views
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J... by Deltares
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...
Deltares9 views
Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated... by TomHalpin9
Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...
Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...
TomHalpin95 views
DSD-INT 2023 Leveraging the results of a 3D hydrodynamic model to improve the... by Deltares
DSD-INT 2023 Leveraging the results of a 3D hydrodynamic model to improve the...DSD-INT 2023 Leveraging the results of a 3D hydrodynamic model to improve the...
DSD-INT 2023 Leveraging the results of a 3D hydrodynamic model to improve the...
Deltares6 views
360 graden fabriek by info33492
360 graden fabriek360 graden fabriek
360 graden fabriek
info3349237 views
DSD-INT 2023 Salt intrusion Modelling of the Lauwersmeer, towards a measureme... by Deltares
DSD-INT 2023 Salt intrusion Modelling of the Lauwersmeer, towards a measureme...DSD-INT 2023 Salt intrusion Modelling of the Lauwersmeer, towards a measureme...
DSD-INT 2023 Salt intrusion Modelling of the Lauwersmeer, towards a measureme...
Deltares5 views
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx by animuscrm
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
animuscrm14 views
SUGCON ANZ Presentation V2.1 Final.pptx by Jack Spektor
SUGCON ANZ Presentation V2.1 Final.pptxSUGCON ANZ Presentation V2.1 Final.pptx
SUGCON ANZ Presentation V2.1 Final.pptx
Jack Spektor22 views
Airline Booking Software by SharmiMehta
Airline Booking SoftwareAirline Booking Software
Airline Booking Software
SharmiMehta5 views
Software evolution understanding: Automatic extraction of software identifier... by Ra'Fat Al-Msie'deen
Software evolution understanding: Automatic extraction of software identifier...Software evolution understanding: Automatic extraction of software identifier...
Software evolution understanding: Automatic extraction of software identifier...
Software testing company in India.pptx by SakshiPatel82
Software testing company in India.pptxSoftware testing company in India.pptx
Software testing company in India.pptx
SakshiPatel827 views

The dream is alive! Running Linux containers on an illumos kernel

  • 1. The dream is alive! Running Linux containers on an illumos kernel Bryan Cantrill CTO bryan@joyent.com @bcantrill
  • 2. OS emulation: An old idea • Operating systems have long employed system call emulation to allow binaries from one operating system run on another on the same instruction set architecture • Combines the binary footprint of the emulated system with the operational advantages of the emulating system • Sun first did this with SunOS 4.x binaries on Solaris 2.x • With Solaris x86, it became possible to run binaries targeted for Linux via SCO’s (open source) “lxrun” • Packaging innovation in Linux in early 2000s + deeply differentiated technologies in Solaris 10 (e.g. ZFS, DTrace, zones) made Linux emulation more attractive
  • 3. Rise of zones • While more important, the problem also became more complicated: programs became more complicated than single-process binaries • Clear that “lxrun” would only work for applications, not systems — needed a deeper solution • Fortunately, coincided with the rise of operating system virtualization embodied by zones • Idea: introduce notion of a branded zone whereby an entire foreign system (a brand) could be emulated within the confines of a zone
  • 4. BrandZ: LX-branded zones • In 2006, team at Sun that included Nils Nieuwejaar and Russ Blaine integrated BrandZ, a Linux branded zone (PSARC 2005/471) • Support was a user/kernel hybrid: lx system calls bounced back to a user-level emulation library that depended on some in-kernel emulation (e.g. futexes) • Support was for RHEL 3 (!): glibc 2.3.2 + Linux 2.4 • Remarkable amount of work was done to handle device pathing, signal handling, /proc — and arcana like TTY ioctls, ptrace, etc. • Worked for a surprising number of binaries!
  • 5. What was missing? • Support was only for 2.4 kernels • Support for 2.6 required adding new, Linux-only mechanisms that had native analogues (e.g., epoll) • Only 32-bit was supported • XVM (the Xen-on-Solaris effort inside of Sun) had much more managerial support and was thought to be a “more supportable” solution
  • 6. The decline of the lx brand After cresting in 2007, contributions to lx dwindled: 30 20 10 0 2006 2007 2008 2009 2010 Pushes to usr/src/lib/brand/lx
  • 7. Clinically dead The lx brand was removed on June 11, 2010... 30 20 10 0 2006 2007 2008 2009 2010 2011 2012 2013 Pushes to usr/src/lib/brand/lx
  • 8. The organ donation years • Joyent customers asked for SmartOS to support htop, a colorful Linux program for system process monitoring • htop is very, very specific to Linux /proc — and porting it to use illumos /proc seemed arduous and pointless… • ...but a relatively complete Linux /proc had integrated with the LX brand! • In April 2012, the /proc portion of the LX brand was extracted, cleaned up, and separately integrated • Mounted at /system/lxproc in SmartOS zones; htop modified to look for this path on illumos
  • 9. Exhumed! • In January 2014, David Mackay, an illumos community member, announced that he was able to resurrect the lx brand —and that it appeared to work! Linked below is a webrev which restores LX branded zones support to Illumos: http://cr.illumos.org/~webrev/DavidJX8P/lx-zones-restoration/ I have been running OpenIndiana, using it daily on my workstation for over a month with the above webrev applied to the illumos-gate and built by myself. It would definitely raise interest in Illumos. Indeed, I have seen many people who are extremely interested in LX zones. The LX zones code is minimally invasive on Illumos itself, and is mostly segregated out. I hope you find this of interest.
  • 10. Could it be revived? • David’s work inspired us to rethink LX-branded zones... • It seemed that the reasons for the discontinuation of LX brand support might not still be valid... • ...and it seemed that the engineering challenges might not be as structurally daunting
  • 11. Has Linux made it easier? • Linux is moving much more slowly: pace of development of new user-visible kernel abstraction has slowed • Torvalds discovered religion on ABI compatibility • The need to run on older kernels has dissuaded software from using the more obscure Linux-isms • The glibc/kernel disconnect means that glibc (and apps!) must reasonably be able to process ENOSYS • Easier support model: the rise of the cloud has replaced shrink-wrapped software with open source + SaaS • Server focus: Mac OS X gave us Unix — and relegated “Linux on the desktop” to “Duke Nukem Forever” status
  • 12. Have motivations changed? • Originally, LX branded zones were about bringing Linux applications into established Solaris environments for purposes of hardware consolidation • Port of KVM to illumos circa 2011 solved this problem • ...but KVM has unresolvable performance and resource limitations, and Linux on KVM only gets indirect benefit from ZFS, DTrace and zones • At the same time, enthusiasm for containers and OS-based virtualization have blossomed (ht: Docker) • There seems to be desire for a best-of-all worlds system that combines Linux strengths (binary footprint) with illumos technical differentiators (ZFS, zones, DTrace)
  • 13. Reviving LX-branded zones • Encouraged that the body might not have decomposed, Joyent engineer Jerry Jelinek exhumed the LX brand and reintegrated it into SmartOS on March 20, 2014 • Guiding principles: • Do it all in the open • Do it all on SmartOS master (illumos-joyent) • Add base illumos facilities wherever possible • Aim to upstream to illumos when we’re done • Thanks to Jerry grinding out many, many LX bug fixes, got Ubuntu 10.04 booting in April, Ubuntu 12.04 booting in May and Ubuntu 14.04 booting in July
  • 14. IT’S ALIVE! Contributions to the lx brand since March: 100 lx brand/75 lib/src/50 usr/to Pushes 25 0 2006 2007 2008 2009 2010 2011 2012 2013 2014
  • 15. So what have we done? • Fixed a ton of bugs (ht: LTP) • Added native epoll(5) — though not in terms of event ports but rather in terms of poll(7D) • Added exclusive IP stacks for LX-branded zones • Added support for netlink (RFC 3549) — but restricted that support to the lx brand • Added support for thunk-less native binaries within an LX branded zone • Added native inotify(5) • Added initial 64-bit support
  • 16. What is left to do? • vsyscall support (needed for 64-bit) • Anything else for 64-bit • Stack switching (needed for Go) • Multi-threaded ptrace support • Lots of using it and figuring out what breaks!
  • 17. How can you get involved? • SmartOS contains latest-and-greatest bits; first step is to get SmartOS running • We have a 32-bit Ubuntu 14.04 image that can be used to create a zone via vmadm: b7493690-f019-4612-958b-bab5f844283e • Will need to configure a VM with “kernel-version” set to 3.13.0 and “brand” to “lx” in the vmadm JSON payload • If you find that something is boken, create an issue on the illumos-joyent github repo • Once 64-bit is working, we will be very actively seeking community engagement; stay tuned!
  • 18. Thanks! • The original BrandZ team at Sun for a remarkable amount of work: Nils Nieuwejaar and Russ Blaine • The illumos community — especially David Mackay! — for inspiring the revival • Jerry Jelinek for leading the charge — and doing the vast majority of the work! • @rmustacc for thunk-less native binary support • @jmclulow for stack switching • @djhoffma for his work on ptrace • @joshwilsdon for vmadm support for LX brands