Linux Container (LXC) Introduction

preview_player
Показать описание
For Classes, Class Notes and Blog Posts:

Join the Conversation at Our Online Community:

Visit the Vlog YouTube Channel at:

Follow us on Facebook at:

Follow us on Twitter at:
Рекомендации по теме
Комментарии
Автор

05:09 is where containers start. This is a high level sales pitch for containers.

TestDummy
Автор

Eli,  Good explanation.  You got a lot right but you missed the mark on RAM and CPU Allocation in hypervisors.  ESXI and Hyper-V both will let you do what is called over subscribe the RAM and CPU.  I have an ESXi Server here at home with 24GB of RAM and an i7 Processor with 4 cores and Hyperthreading so it looks like 8 cores of CPU in the physical machine.  I have VM's running on it with 36GB of RAM allocated in total and 16 cores of CPU.  As long as I don't try to max out all of the machines I will never notice that I have over subscribed the machine.  The biggest performance hits come when you do start pushing the machines to their maxes.  This is especially true for RAM because as soon as you do this a part of the VMWare Tools installed on the machines starts to consume ram to forcing the machines to start swapping out memory to disk.  This then creates an issue with access to the disk since all of your machines are trying to read and write at basically the same time.  The result is that everything on the host machine comes to a crawl.
Great series of podcasts,
Brian

BrianWagner
Автор

as you know i'm eli the computer guy! very welll!!! as the world knows you're the best IT Teacher!! tks brow

caionmarquezini
Автор

Awesome videos, I've been watching your show for a while and enjoy them all. Keep up the good work!

Trump_Train
Автор

Eli you are the best teacher and you're a rich knowledge

davidtuvia
Автор

before watching this video, I watched couple of other videos but this video explained it very well... thanks computer guy. 

girishkodli
Автор

Eli, how does LXC compare with BSD Jails and Linux KVMs?

dmmikerpg
Автор

You're the Awesome Computer Guy, not just Computer Guy :)

KrystianRaj
Автор

was 0:55 on purpose or an actual glitch?

SCTproductionsJ
Автор

What about security aspects? Will maliciously gaining root inside one container give you root on the host and all other containers on it? Or are users also "per container"?

rokyo
Автор

Been learning a lot about virtualization in some of my college classes. I'm not typically a big fan of linux, but this video makes LXC look really cool.

daviddow
Автор

LXC is terrific technology that is mature, has a great development & user community etc.

The original LXC had a fairly simple command syntax but was really targeted to managing LXC containers on a single Host.

LXD is available to use now but officially won't be released until LXC v2.0 sometime in mid-late January 2016.

LXC adds significant new capabilities to LXC including:
- a really simple REST api to LXC which now lets you orchestrate & manage LXC containers on any Linux Host anywhere.
- new & greatly simplified & improved LXC command syntax
- support for CRIU for LXC container migration between hosts
- see the above URL for more features.

However, with LXD the LXC command line syntax has changed a bit to accommodate all the new capabilities. BUT the good news is the command line syntax is now even easier to understand & use.

example:

creating a traditional LXC container:

to create a PRIVILEGED LXC container: $ sudo lxc-create -t download -n my_cn_name

to create an UN-PRIVILEGED LXC container: $ lxc-create -t download -n my_cn_name

With LXD/LXC you first add an LXC container template rootfs "image" repository (images.linuxcontainers.org is the official one)
then "launch" one of the "images" it has available.

Below is an example of importing images then launching an x64 bit CentOS LXC container:

$ lxc remote add images images.linuxcontainers.org

Note: after the above you can get a List of all available images by: $ lxc image list images:

then launch (re. start)the container of choice:

$ lxc launch images:centos/7/amd64 centos

If I was running Ubuntu and did the above I'd end up with a CentOS LXC container running in my Host OS.

Stephane Graber gave a terrific LXD/LXC intro just a couple months ago and if you have an interest in LXC... please watch it to see just how great LXD/LXC is now:



Again, realize that the LXC used with LXD is different in its commands & purpose.

Also with the traditional LXC you had the choice of using PRIVILEGED or UN-PRIVILEGED containers.

With the intro of LXD/LXC the default is now UN-PRIVILEGED containers ... but of course you can still create PRIVILEGED containers.
Read Stephane Graber's 10 part Blog post to understand the difference but in short PRIVILEGED containers require SUDO privileges to create, start/stop/pause/clone etc.
UN-PRIVILEGED containers do NOT require SUDO privileges but the LXC Container created is "owned" by the User logged in. So anyone can create their own private LXC containter in their own /home/UxerID/ filesystem space.

ncbmullan
Автор

hey eli, you've been doing a lot of introduction videos lately. Don't get me wrong, I do enjoy them. However, I subscribed to you because you had such great tutorials and you actually sat down and taught me how to edit the php.ini file in a LAMP server. I would love to see some more tutorials and videos with real details about different applications and methods and such.

musicislife
Автор

WOW can not believe this was 8 years ago and still amazing, who else is watching 2021

MrGenbu
Автор

Committing of  (say) 4gb of ram on boot per vm is not really true as you can reclaim unused ram at least in ESXi.  On top of that as the VM is virtual more ram can be added easily and sometimes even hot added.  So you can allocate 2gb initially and add more if needed.

gzcwnk
Автор

I think the best way to do it is use LXC for anything Linux, and then use KVM for making a full on (less efficient than LXC) VM for the windows machines.

Azendale
Автор

I believe linux containers will help in saving the storage as VM Templates (Disk-image which includes OS) are usually big in size i.e. in GBs

Lets assume we have an end-to-end solution where we have virtualized "n" number of physical nodes with specific functionality to run on cloud. For each of these node if we have the image file it will take hell amount of space on the disk, also if something goes wrong with any running instance the new instance will take time to come up as its underlying OS will take its own time to boot up. LXC will definitely help in saving the storage resources as there is only configuration & application function involved being a part of its template. Also moving containers across Servers (i.e. Linux+LXC SW) in datacenter, & launching them will be much faster.

manasone
Автор

I installed lxc and lxc-templates and the other required packages like debootstrap.
Still when i typr lxc-ls, it gives me command not found. I am using centos 7. Can you help?

gauravstud
Автор

I missed a drawing. That would have helped. And all of you, take a look at Docker: docker.io. And especially the slideshow under learn more. That will help you understand the concept more. And thank you again, Eli.

superspectator
Автор

really enjoy Eli's work, is there a more advanced video on docker, kubernetes, etc from him?

ismilach