LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Containers
User Name
Password
Linux - Containers This forum is for the discussion of all topics relating to Linux containers. Docker, LXC, LXD, runC, containerd, CoreOS, Kubernetes, Mesos, rkt, and all other Linux container platforms are welcome.

Notices


Reply
  Search this Thread
Old 04-25-2018, 02:21 AM   #1
rksyeung
Member
 
Registered: Feb 2018
Posts: 71

Rep: Reputation: Disabled
Containers vs. Hypervisors


I'm new to virtualization, and had read a number of articles on this topic. What is the current state of the art, esp. in terms of security aspect? Is one noticeably better than another? What is the prevalent industry standard, and is it changing any time soon?

We've a new project that needs to make a decision real soon on whether to use one or the other. Your insights would be much appreciated. And if there's any authoritative reference published on this, would appreciate your pointer(s).
 
Old 04-25-2018, 03:01 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,980

Rep: Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337
1. there is no current state, it is continuously changing.
2. without knowing the details of your project noone can suggest you anything.
3. I would rather try to test both and use the one which suits better your needs.
4. security depends on the users/admin, not on the system itself.
 
1 members found this post helpful.
Old 04-25-2018, 08:17 AM   #3
simosx
Member
 
Registered: Jul 2005
Posts: 66

Rep: Reputation: 11
Cool

Indeed, security does not have a quick answer.

The rule of thumb with security, is that the more security features you add to the project,
it becomes more expensive and has worse overall usability (for example, takes much longer to add a new server).

Since you know the details of the project, it's up to you to figure out how much of security to require.

You have three practical options,
  1. Docker-style application containers. Here, each application becomes a container. You need to convert each application to a Docker container (dockerize).
  2. LXC/LXD-style machine containers. Here, the containers behave and work like virtual machines. You get many of the security features of virtualization at the speed and efficiency of typical containers. You should go for LXD, which provides a hypervisor for the machine containers.
  3. Virtualization assisted by hardware. This is KVM, or Virtualbox or VMWare. They need more resources. A rule of thumb, for the resources of one virtual machine with hardware-assisted virtualization, you can have at least 10 machine containers.
 
1 members found this post helpful.
Old 04-25-2018, 10:49 AM   #4
rksyeung
Member
 
Registered: Feb 2018
Posts: 71

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
1. there is no current state, it is continuously changing.
2. without knowing the details of your project noone can suggest you anything.
3. I would rather try to test both and use the one which suits better your needs.
4. security depends on the users/admin, not on the system itself.
Hi,

1. Even when things change continuously (e.g. source code in version controlled repository) could have a snapshot. What is the snapshot like today?
2. I could elaborate some key requirements for the project -
a. There's no need to have different OS (e.g. Windows vs. Linux vs. QNX vs...). Rather the virtualized environment (container or VM) would be assigned to
different customers doing pretty much similar things (maybe some differences in feature sets/options).
b. These customers may want to upgrade their software dependent of each other.
c. Ideally, they could fail independently
d. Security is very important - isolation of the customers' networks, data, etc.
3. We'd do prototyping soon, but not sure if we'd have enough time to check out both paradigms.
 
Old 04-25-2018, 11:27 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,980

Rep: Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337
from network side the isolation/security is almost the same, there are no big differences. from storage/data side again, data is usually not stored inside the VM or container, therefore irrelevant.
 
Old 04-27-2018, 11:45 AM   #6
rksyeung
Member
 
Registered: Feb 2018
Posts: 71

Original Poster
Rep: Reputation: Disabled
Can either one of them share a core in a CPU? Specifically, say the workload for 1 VM is 1.5 cores, can the remaining 0.5 core be used by any other VM? By the same token, can another container use the remaining 0.5 core in container environment?
 
Old 04-27-2018, 04:28 PM   #7
Pearlseattle
Member
 
Registered: Aug 2007
Location: Zurich, Switzerland
Distribution: Gentoo
Posts: 999

Rep: Reputation: 142Reputation: 142
Question:
when using "containers" (and I'm personally thinking about "docker"), don't people tend to install images from questionable / potentially untrusted sources?

Meaning:
when using VMs (through hypervisors) people might end up using mostly the official packages of the distribution being used, but when using Containers people might start using a much larger (and interconnected) pool of sources?

Last edited by Pearlseattle; 04-27-2018 at 04:29 PM.
 
Old 04-28-2018, 02:26 AM   #8
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,980

Rep: Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337
I don't know those "tends", but we use docker containers only with official canonical repositories (the only exception is the initial docker image, which is coming from docker.io.

to #6, containers have no "own" process management, it relies on the host (and its kernel). Actually the dockerized processes will run by the same host system, the same way as any other process.
in VM it is definitely different, the usage of the cores depends on the configuration of hypervisor.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Containers Running Containers with LinuxKit LXer Syndicated Linux News 0 06-09-2017 06:52 AM
Containers or Hypervisors ? hack3rcon Linux - Virtualization and Cloud 13 06-08-2015 09:06 AM
LXer: Containers vs Hypervisors: The Battle Has Just Begun LXer Syndicated Linux News 0 08-28-2014 05:52 PM
LXer: Type 1 Open Source Hypervisors and More LXer Syndicated Linux News 0 08-02-2013 11:10 AM
[SOLVED] Disabling Hypervisors u03pje Red Hat 1 11-11-2009 07:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Containers

All times are GMT -5. The time now is 05:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration