Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

chroot vs lxc

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
Chrisdb
Posts: 279
Joined: 2018-04-10 07:16

chroot vs lxc

#1 Post by Chrisdb »

I would like to install some packages which aren't available in the repositories and for this I would like to use a virtual enviroment.

Can someone explain what the basic difference is between chroot and lxc?
Which one is best suited for this case?

Thx!!

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: chroot vs lxc

#2 Post by GarryRicketson »


Chrisdb
Posts: 279
Joined: 2018-04-10 07:16

Re: chroot vs lxc

#3 Post by Chrisdb »

I've already looked around the internet, but I actually wanted to know which one would best suit my case and why:
Chrisdb wrote:I would like to install some packages which aren't available in the repositories and for this I would like to use a virtual environment
The reason why I choose a virtual environment is because I want to be certain not te break the system with third party packages....

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: chroot vs lxc

#4 Post by GarryRicketson »

Well that is true, if one wants to experiment with packages which aren't available in the repositories, using a VM (virtual machine or environment)VE is the best and safest way to do that.
Personally I prefer a VM, and use QEMO, for that.
Others claim a VE , like Docker (for example only) and other methods, is more like "bare metal"
hardware,.... The only way I can think of to decide which is best for your particular needs is to experiment, try both methods, then decide for your self which one would best suit your case and why.
I've already looked around the internet
Just "looking around" is use less, you will see some people like a VM better, others prefer a VE, you need to actually try both methods, or select the one that
you understand well enough to install and setup.
In the search string I showed, but instead of just "looking" try reading some of the material, there are many results that go into great detail on the differences, for example: https://stackoverflow.com/questions/205 ... vm-and-lxc
OR here:https://www.quora.com/What-is-the-downs ... ualization
Conceptually, lxc can be seen as a further development of the existing 'chroot' technique with extra dimensions added. Where 'chroot'-ing only offers isolation at the file system level, lxc offers complete logical isolation from a container to the host and all other containers"
I am sure others will jump in here with their opinions, shortly.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: chroot vs lxc

#5 Post by Head_on_a_Stick »

Chrisdb wrote:I would like to install some packages which aren't available in the repositories and for this I would like to use a virtual enviroment
Virtualisation is relatively slow (even with hardware acceleration) and resource-intensive so I would always prefer the container approach, where possible.

http://forums.debian.net/viewtopic.php?f=16&t=129390

See also http://forums.debian.net/viewtopic.php?f=16&t=47078
deadbang

Post Reply