SlideShare a Scribd company logo
2
Most read
3
Most read
12
Most read
Linux Containers
What's Linux Containers?
Linux Containers(LXC) allow running multiple isolated Linux instances
(containers) on the same host.
Containers share the same kernel with anything else that is running on it, but
can be constrained to only use a defined amount of resources such as CPU,
memory or I/O.
A container is a way to isolate a group of processes from the others on a
running Linux system.
Why Linux Containers?
 Provision in seconds / milliseconds
 Near bare metal runtime performance
 VM-like agility – it’s still “virtualization”
 Flexibility
• Containerize a “system”
• Containerize “application(s)”
 Lightweight
• Just enough Operating System (JeOS)
• Minimal per container penalty
Growing in popularity
Virtual Network Types
LXC containers support the following networking types:
• empty - creates only loopback interface and assigns it to the container.
• vlan - a vlan interface is linked with the interface specified in container's
configuration and is assigned to a the container.
• phys - an already existing interface is assigned to the container. This is useful
when you want to assign a physical network interface to a LXC container.
• none - will cause container to use host's network namespace.
Terminology in LXC
• Chroot :
A change root (chroot, or change root jail) is a section in the file system which
is isolated from the rest of the file system. For this purpose, the chroot command is used
to change the root of the file system.
• Cgroups :
Kernel Control Groups (commonly referred to as just “cgroups”) are a Kernel
feature that allows aggregating or partitioning tasks (processes) and all their children into
hierarchical organized groups to isolate resources.
• Container :
A “virtual machine” on the host server that can run any Linux system, for
example openSUSE, SUSE Linux Enterprise Desktop, or SUSE Linux Enterprise Server.
Terminology Continued...
• Container Name :
A name that refers to a container. The name is used by the lxc commands.
• Kernel Namespaces :
A Kernel feature to isolate some resources like network, users, and others for a
group of processes.
• LXC Host Server :
The system that contains the LXC system and provides the containers and
management control capabilities through cgroups.
Hypervisors vs. Linux
Containers
Hardware
Operating System
Hypervisor
Virtual Machine
Operating
System
Bins / libs
Ap
p
Ap
p
Virtual Machine
Operating
System
Bins / libs
Ap
p
Ap
p
Hardware
Hypervisor
Virtual Machine
Operating
System
Bins / libs
Ap
p
Ap
p
Virtual Machine
Operating
System
Bins / libs
Ap
p
Ap
p
Hardware
Operating System
Container
Bins / libs
Ap
p
Ap
p
Container
Bins / libs
Ap
p
Ap
p
Type 1 Hypervisor Type 2 Hypervisor Linux Containers
Containers are isolated,
but share OS and,
where appropriate, libs /
bins.
Docker vs. LXC vs. Hypervisor
Docker: LXC Virtualization?
Docker decouples the LXC provider from the operations
• LXC provider agnostic
Docker “images” run anywhere docker is supported
• Portability
Who’s Using LXC
Google app engine & infra is said to be using some form of LXC
RedHat OpenShift
dotCloud (now docker inc)
CloudFoundry (early versions)
Rackspace Cloud Databases
Parallels Virtuozzo (commercial product)
LXC Gaps
There are gaps…
•Lack of industry tooling / support
•Full orchestration across resources (compute / storage / networking)
•Fears of security
•Not a well known technology… yet
•Integration with existing virtualization and Cloud tooling
•Not much / any industry standards
•Missing skillset
•Slower upstream support due to kernel dev process
LXC: Use Cases For Traditional VMs
There are still use cases where traditional VMs are warranted.
•Virtualization of non Linux based OSs
•Windows
•AIX
•LXC not supported on host
•VM requires unique kernel setup which is not applicable to other VMs on
the host (i.e. per VM kernel config)
Features Of Linux Containers
Lightweight and resource – friendly
Comprehensive process and resource isolation
Run multiple versions of an operating system on a single server
Rapid and Easy deployment
Advantages
Easier maintenance and backup of individual virtual machines than one 'big'
linux server
Running different 'servers' on one physical computer saves hardware and
power costs
Security separation, hardware access from inside a vm may be restricted
Disadvantages
Speed issues if too many vm's are using the same hardware at the same time
(especially hard drive access, recommend a SSD).
If hardware breaks, all virtual machines machines are affected.
Might have problems accessing hardware, as access to that hardware might
be restricted.

More Related Content

What's hot (20)

PDF
Kubernetes Basics
Eueung Mulyana
 
PDF
Kubernetes Networking
CJ Cullen
 
PDF
Containers technologies
Joris Bonnefoy
 
PDF
Docker, Linux Containers (LXC), and security
Jérôme Petazzoni
 
PPTX
Virtualization
Kingston Smiler
 
PDF
Qemu Introduction
Chiawei Wang
 
PDF
Kubernetes: A Short Introduction (2019)
Megan O'Keefe
 
PDF
Kubernetes - A Comprehensive Overview
Bob Killen
 
ODP
Kubernetes Architecture
Knoldus Inc.
 
PPTX
Demystifying openvswitch
Prasad Mukhedkar
 
PPTX
Docker.pptx
balaji257
 
PDF
Docker vs VM | | Containerization or Virtualization - The Differences | DevOp...
Edureka!
 
PPT
Linux - Introductions to Linux Operating System
Vibrant Technologies & Computers
 
PPTX
Kubernetes Introduction
Eric Gustafson
 
PPTX
virtualization-vs-containerization-paas
rajdeep
 
PDF
Podman Overview and internals.pdf
Saim Safder
 
PDF
Linux Containers (LXC)
Vladimir Melnic
 
PPTX
Docker Networking Overview
Sreenivas Makam
 
PPTX
Software Containerization
Roshan Deniyage
 
Kubernetes Basics
Eueung Mulyana
 
Kubernetes Networking
CJ Cullen
 
Containers technologies
Joris Bonnefoy
 
Docker, Linux Containers (LXC), and security
Jérôme Petazzoni
 
Virtualization
Kingston Smiler
 
Qemu Introduction
Chiawei Wang
 
Kubernetes: A Short Introduction (2019)
Megan O'Keefe
 
Kubernetes - A Comprehensive Overview
Bob Killen
 
Kubernetes Architecture
Knoldus Inc.
 
Demystifying openvswitch
Prasad Mukhedkar
 
Docker.pptx
balaji257
 
Docker vs VM | | Containerization or Virtualization - The Differences | DevOp...
Edureka!
 
Linux - Introductions to Linux Operating System
Vibrant Technologies & Computers
 
Kubernetes Introduction
Eric Gustafson
 
virtualization-vs-containerization-paas
rajdeep
 
Podman Overview and internals.pdf
Saim Safder
 
Linux Containers (LXC)
Vladimir Melnic
 
Docker Networking Overview
Sreenivas Makam
 
Software Containerization
Roshan Deniyage
 

Similar to Introduction to linux containers (20)

PDF
Lxc- Linux Containers
samof76
 
PDF
Revolutionizing the cloud with container virtualization
WSO2
 
PPTX
Containers - Cloud Phoenix March Meetup
Miguel Zuniga
 
PDF
Evolution of Linux Containerization
WSO2
 
PDF
Evoluation of Linux Container Virtualization
Imesh Gunaratne
 
PDF
Lightweight Virtualization in Linux
Sadegh Dorri N.
 
PPTX
Lxc – next gen virtualization for cloud intro (cloudexpo)
Boden Russell
 
PPTX
Containerization & Docker - Under the Hood
Imesha Sudasingha
 
PDF
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
dotCloud
 
PDF
Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Docker, Inc.
 
PPTX
Realizing Linux Containers (LXC)
Boden Russell
 
PPTX
Linux containers – next gen virtualization for cloud (atl summit) ar4 3 - copy
Boden Russell
 
PDF
Let's Containerize New York with Docker!
Jérôme Petazzoni
 
PDF
Linuxcon Barcelon 2012: LXC Best Practices
christophm
 
PDF
Linux Containers & Docker
Jumping Bean
 
PPTX
Linux Container Brief for IEEE WG P2302
Boden Russell
 
PDF
Security of Linux containers in the cloud
Dobrica Pavlinušić
 
PDF
Lxc- Introduction
Luís Eduardo
 
PDF
Linux container & docker
ejlp12
 
PDF
Microservices, Containers and Docker
Ioannis Papapanagiotou
 
Lxc- Linux Containers
samof76
 
Revolutionizing the cloud with container virtualization
WSO2
 
Containers - Cloud Phoenix March Meetup
Miguel Zuniga
 
Evolution of Linux Containerization
WSO2
 
Evoluation of Linux Container Virtualization
Imesh Gunaratne
 
Lightweight Virtualization in Linux
Sadegh Dorri N.
 
Lxc – next gen virtualization for cloud intro (cloudexpo)
Boden Russell
 
Containerization & Docker - Under the Hood
Imesha Sudasingha
 
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
dotCloud
 
Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Docker, Inc.
 
Realizing Linux Containers (LXC)
Boden Russell
 
Linux containers – next gen virtualization for cloud (atl summit) ar4 3 - copy
Boden Russell
 
Let's Containerize New York with Docker!
Jérôme Petazzoni
 
Linuxcon Barcelon 2012: LXC Best Practices
christophm
 
Linux Containers & Docker
Jumping Bean
 
Linux Container Brief for IEEE WG P2302
Boden Russell
 
Security of Linux containers in the cloud
Dobrica Pavlinušić
 
Lxc- Introduction
Luís Eduardo
 
Linux container & docker
ejlp12
 
Microservices, Containers and Docker
Ioannis Papapanagiotou
 
Ad

Recently uploaded (20)

PDF
GTU Civil Engineering All Semester Syllabus.pdf
Vimal Bhojani
 
PPT
PPT2_Metal formingMECHANICALENGINEEIRNG .ppt
Praveen Kumar
 
PDF
Water Design_Manual_2005. KENYA FOR WASTER SUPPLY AND SEWERAGE
DancanNgutuku
 
PPTX
Snet+Pro+Service+Software_SNET+Pro+2+Instructions.pptx
jenilsatikuvar1
 
PPTX
artificial intelligence applications in Geomatics
NawrasShatnawi1
 
PPTX
Green Building & Energy Conservation ppt
Sagar Sarangi
 
PDF
monopile foundation seminar topic for civil engineering students
Ahina5
 
PDF
Unified_Cloud_Comm_Presentation anil singh ppt
anilsingh298751
 
PPTX
Hashing Introduction , hash functions and techniques
sailajam21
 
PPTX
Element 11. ELECTRICITY safety and hazards
merrandomohandas
 
PDF
Reasons for the succes of MENARD PRESSUREMETER.pdf
majdiamz
 
PPTX
UNIT DAA PPT cover all topics 2021 regulation
archu26
 
PPTX
Heart Bleed Bug - A case study (Course: Cryptography and Network Security)
Adri Jovin
 
PPTX
Lecture 1 Shell and Tube Heat exchanger-1.pptx
mailforillegalwork
 
PPTX
Server Side Web Development Unit 1 of Nodejs.pptx
sneha852132
 
PPTX
Shinkawa Proposal to meet Vibration API670.pptx
AchmadBashori2
 
PDF
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
PPTX
The Role of Information Technology in Environmental Protectio....pptx
nallamillisriram
 
PPTX
Introduction to Design of Machine Elements
PradeepKumarS27
 
PPTX
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
GTU Civil Engineering All Semester Syllabus.pdf
Vimal Bhojani
 
PPT2_Metal formingMECHANICALENGINEEIRNG .ppt
Praveen Kumar
 
Water Design_Manual_2005. KENYA FOR WASTER SUPPLY AND SEWERAGE
DancanNgutuku
 
Snet+Pro+Service+Software_SNET+Pro+2+Instructions.pptx
jenilsatikuvar1
 
artificial intelligence applications in Geomatics
NawrasShatnawi1
 
Green Building & Energy Conservation ppt
Sagar Sarangi
 
monopile foundation seminar topic for civil engineering students
Ahina5
 
Unified_Cloud_Comm_Presentation anil singh ppt
anilsingh298751
 
Hashing Introduction , hash functions and techniques
sailajam21
 
Element 11. ELECTRICITY safety and hazards
merrandomohandas
 
Reasons for the succes of MENARD PRESSUREMETER.pdf
majdiamz
 
UNIT DAA PPT cover all topics 2021 regulation
archu26
 
Heart Bleed Bug - A case study (Course: Cryptography and Network Security)
Adri Jovin
 
Lecture 1 Shell and Tube Heat exchanger-1.pptx
mailforillegalwork
 
Server Side Web Development Unit 1 of Nodejs.pptx
sneha852132
 
Shinkawa Proposal to meet Vibration API670.pptx
AchmadBashori2
 
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
The Role of Information Technology in Environmental Protectio....pptx
nallamillisriram
 
Introduction to Design of Machine Elements
PradeepKumarS27
 
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
Ad

Introduction to linux containers

  • 2. What's Linux Containers? Linux Containers(LXC) allow running multiple isolated Linux instances (containers) on the same host. Containers share the same kernel with anything else that is running on it, but can be constrained to only use a defined amount of resources such as CPU, memory or I/O. A container is a way to isolate a group of processes from the others on a running Linux system.
  • 3. Why Linux Containers?  Provision in seconds / milliseconds  Near bare metal runtime performance  VM-like agility – it’s still “virtualization”  Flexibility • Containerize a “system” • Containerize “application(s)”  Lightweight • Just enough Operating System (JeOS) • Minimal per container penalty Growing in popularity
  • 4. Virtual Network Types LXC containers support the following networking types: • empty - creates only loopback interface and assigns it to the container. • vlan - a vlan interface is linked with the interface specified in container's configuration and is assigned to a the container. • phys - an already existing interface is assigned to the container. This is useful when you want to assign a physical network interface to a LXC container. • none - will cause container to use host's network namespace.
  • 5. Terminology in LXC • Chroot : A change root (chroot, or change root jail) is a section in the file system which is isolated from the rest of the file system. For this purpose, the chroot command is used to change the root of the file system. • Cgroups : Kernel Control Groups (commonly referred to as just “cgroups”) are a Kernel feature that allows aggregating or partitioning tasks (processes) and all their children into hierarchical organized groups to isolate resources. • Container : A “virtual machine” on the host server that can run any Linux system, for example openSUSE, SUSE Linux Enterprise Desktop, or SUSE Linux Enterprise Server.
  • 6. Terminology Continued... • Container Name : A name that refers to a container. The name is used by the lxc commands. • Kernel Namespaces : A Kernel feature to isolate some resources like network, users, and others for a group of processes. • LXC Host Server : The system that contains the LXC system and provides the containers and management control capabilities through cgroups.
  • 7. Hypervisors vs. Linux Containers Hardware Operating System Hypervisor Virtual Machine Operating System Bins / libs Ap p Ap p Virtual Machine Operating System Bins / libs Ap p Ap p Hardware Hypervisor Virtual Machine Operating System Bins / libs Ap p Ap p Virtual Machine Operating System Bins / libs Ap p Ap p Hardware Operating System Container Bins / libs Ap p Ap p Container Bins / libs Ap p Ap p Type 1 Hypervisor Type 2 Hypervisor Linux Containers Containers are isolated, but share OS and, where appropriate, libs / bins.
  • 8. Docker vs. LXC vs. Hypervisor
  • 9. Docker: LXC Virtualization? Docker decouples the LXC provider from the operations • LXC provider agnostic Docker “images” run anywhere docker is supported • Portability
  • 10. Who’s Using LXC Google app engine & infra is said to be using some form of LXC RedHat OpenShift dotCloud (now docker inc) CloudFoundry (early versions) Rackspace Cloud Databases Parallels Virtuozzo (commercial product)
  • 11. LXC Gaps There are gaps… •Lack of industry tooling / support •Full orchestration across resources (compute / storage / networking) •Fears of security •Not a well known technology… yet •Integration with existing virtualization and Cloud tooling •Not much / any industry standards •Missing skillset •Slower upstream support due to kernel dev process
  • 12. LXC: Use Cases For Traditional VMs There are still use cases where traditional VMs are warranted. •Virtualization of non Linux based OSs •Windows •AIX •LXC not supported on host •VM requires unique kernel setup which is not applicable to other VMs on the host (i.e. per VM kernel config)
  • 13. Features Of Linux Containers Lightweight and resource – friendly Comprehensive process and resource isolation Run multiple versions of an operating system on a single server Rapid and Easy deployment
  • 14. Advantages Easier maintenance and backup of individual virtual machines than one 'big' linux server Running different 'servers' on one physical computer saves hardware and power costs Security separation, hardware access from inside a vm may be restricted
  • 15. Disadvantages Speed issues if too many vm's are using the same hardware at the same time (especially hard drive access, recommend a SSD). If hardware breaks, all virtual machines machines are affected. Might have problems accessing hardware, as access to that hardware might be restricted.