Why Containers Instead of Hypervisors? (2024)

Our cloud-based IT world is founded on hypervisors. It doesn't have to be that way – and, some say, it shouldn’t be. Containers can deliver more services using the same hardware you're now using for virtual machines, said one speaker at the Linux Collaboration Summit, and that spells more profits for both data centers and cloud services.

I confess that I've long been a little confused about the differences between virtual machine (VM) hypervisors and containers. But at the Linux Collaboration Summit in March 2014, James Bottomley, Parallels' CTO of server virtualization and a leading Linux kernel developer, finally set me straight.

Before I go farther I should dispel a misconception you might have. Yes, Parallels is best known for Parallels Desktop for Mac; it enables you to run Windows VMs on Macs and yes, that is a hypervisor-based system. But where Parallels makes its real money is with its Linux server oriented container business. Windows on Macs is sexier, so it gets the headlines.

So why should you care about hypervisors vs. containers? Bottomley explains that hypervisors, such as Hyper-V, KVM, and Xen, all have one thing in common: "They're based on emulating virtual hardware." That means they're fat in terms of system requirements.

Bottomley also sees hypervisors as ungainly and not terribly efficient. He compares them to a Dalek from Dr. Who. Yes, they're good at "EXTERMINATE," but earlier models could be flummoxed by a simple set of stairs and include way too much extra gear.

Containers, on the other hand, are based on shared operating systems. They are much skinner and more efficient than hypervisors. Instead of virtualizing hardware, containers rest on top of a single Linux instance. This means you can "leave behind the useless 99.9% VM junk, leaving you with a small, neat capsule containing your application," says Bottomley.

That has implications for application density. According to Bottomley, using a totally tuned-up container system, you should expect to see four-to-six times as many server instances as you can using Xen or KVM VMs. Even without making extra effort, he asserts, you can run approximately twice as many instances on the same hardware. Impressive!

Lest you think this sounds like science fiction compared to the hypervisors you've been using for years, Bottomley reminds us that "Google invested in containers early on. Anything you do on Google today is done in a container—whether it's Search, Gmail, Google Docs—you get a container of your own for each service.”

To use containers in Linux you use the LXC userspace tools. With this, applications can run in their own container. As far as the program is concerned, it has its own file system, storage, CPU, RAM, and so on.

So far that sounds remarkably how a VM looks to an application. The key difference is that while the hypervisor abstracts an entire device, containers just abstract the operating system kernel.

LXC's entire point is to "create an environment as close as possible as a standard Linux installation but without the need for a separate kernel," says Bottomley. To do this it uses these Linux kernel features:

  • Kernel namespaces (ipc, uts, mount, pid, network, and user)
  • AppArmor and SELinux profiles
  • Seccomp policies
  • Chroots (using pivot_root)
  • Kernel capabilities
  • Control groups (cgroups)

The one thing that hypervisors can do that containers can't, according to Bottomley, is to use different operating systems or kernels. For example, you can use VMware vSphere to run instances of Linux and Windows at the same time. With LXC, all containers must use the same operating system and kernel. In short, you can't mix and match containers the way you can VMs.

That said, except for testing purposes, how often in a production environment do you really want to run multiple operating system VMs on a server? I'd say "Not very damn often."

You might think that this all sounds nice, but some developers and devops believe that there are way too many different kinds of containers to mess. Bottomley insists that this is not the case. "All containers have the same code at bottom. It only looks like there are lots of containers." He adds that Google (which used cgroups for its containers) and Parallels (which uses "bean-counters" in OpenVZ) have merged their codebases so there's no practical differences between them.

Programs such as Docker are built on top of LXC. In Docker's case, its advantage is that its open-source engine can be used to pack, ship, and run any application as a lightweight, portable, self sufficient LXC container that runs virtually anywhere. It’s a packaging system for applications.

The big win here for application developers, Bottomley notes, is that programs such as Docker enable you to create a containerized app on your laptop and deploy it to the cloud. “Containers gives you instant application portability,” he says. “In theory, you can do this with hypervisors, but in reality there's a lot of time spend getting VMs right. If you're an application developer and use containers you can leave worrying about all the crap to others."

Bottomley thinks "We're only beginning to touch what this new virtualization and packing paradigm can mean to us. Eventually, it will make it easier to create true cloud-only applications and server programs that can fit on only almost any device." Indeed, he believes containers will let us move our programs from any platform to any other platform in time and space... sort of like Dr. Who's TARDIS.

See also:

  • High-Availability Basics for Developers
  • The Pre-History of Software as a Service
  • Frontiers in Virtualization for Quality Assurance

[dfads params='groups=937&limit=1&orderby=random']

Why Containers Instead of Hypervisors? (2024)

FAQs

Why Containers Instead of Hypervisors? ›

In short: Virtual machines and hypervisors abstract away hardware and enable you to run operating systems. Containers

Containers
The containers are basically a fully functional and portable cloud or non-cloud computing environment surrounding the application and keeping it independent of other environments running in parallel.
https://en.wikipedia.org › wiki › Containerization_(computing)
(technically container engines) abstract away operating systems and enable you to run applications.

What are the advantages of using containers instead of virtualization? ›

Containers have a number of benefits over traditional virtualization methods. As they are more lightweight and portable than VMs, containers support decomposition of a monolith into microservices. Containers are faster to manage and deploy than VMs, which can save time and money with application deployment.

What is the advantage of Docker over hypervisor? ›

Furthermore, a Docker container uses docker-engine instead of a hypervisor, like in a virtual machine. As the host kernel is not shared, using docker-engine makes containers small, isolated, compatible, high performance-intensive, and quickly responsive.

What is the difference between a container and hypervisor? ›

Container engine coordinates with the underlying operating system for resources. Hypervisor coordinates with underlying operating system or hardware. Lighter weight (think in terms of MB).

Why use Docker instead of VM? ›

VMs abstract hardware details to make it easier to run applications on different hardware architectures and use hardware resources more efficiently. Docker, on the other hand, was designed to provide a lightweight and portable way to package and run applications in an isolated and reproducible environment.

What is the major advantage of using container? ›

Benefits of containers

DevOps teams know applications in containers will run the same, regardless of where they are deployed. Containers allow applications to be more rapidly deployed, patched, or scaled. Containers support agile and DevOps efforts to accelerate development, test, and production cycles.

What are the pros and cons of containers? ›

They offer many benefits, such as portability, scalability, and resource efficiency. However, they also have drawbacks, such as complexity, security risks, and storage and networking challenges.

What do containers abstract that hypervisors do not? ›

While a hypervisor abstracts away hardware for the virtual machines so they can run an operating system, a container engine abstracts away an operating system so containers can run applications.

When to use virtualization vs. containerization? ›

Therefore, a virtual machine is best when a business runs multiple applications that each requires its own dedicated operating system. In contrast, containers, share the host machine's OS kernel, requiring applications to be compatible with the host OS.

Is Kubernetes a hypervisor? ›

In a container, the underlying OS handles networking. In addition, containers don't require a virtualized network adapter, which a VM does. Final answer: Kubernetes and containers are not hypervisors, despite similar appearances on the surface.

What are the disadvantages of Docker? ›

Docker can be resource-intensive, especially when running multiple containers or large applications. Each container requires its own resources, including CPU, memory, and disk space, which can lead to resource contention and inefficiencies, particularly on resource-constrained systems.

Why VM is more secure than container? ›

In contrast, running within a single OS while using containers in cloud computing allows defects to damage the entire system. Because of the complete isolation provided by VMs, security is improved, and vulnerabilities are more difficult to exploit.

Why does everyone use Docker? ›

Why is Docker so popular? Docker is popular because it offers portability, consistency, and scalability for deploying applications in different environments. Docker containers are lightweight, isolated, and easy to deploy, making them a popular choice for modern application development and deployment.

Which of the following is a benefit of using containers instead of whole system virtualization? ›

Expert-Verified Answer. Lower resource overhead is a benefit of using containers instead of whole-system virtualization.

Does container technology replace virtualization? ›

Running microservices on a VM would involve spinning up a separate VM for every microservice, which is an inefficient allocation of resources. Or it involves running multiple services on the same VM, which doesn't have the benefit of isolation. Despite their popularity, containers have not replaced VMs completely.

What disadvantages do containers have over VMs? ›

Container Cons:

All containers must run atop the same OS – no mix and match of OSs or versions. Containers may be less secure than VMs since the underlying OS is shared. Containers are a newer technology, and the ecosystem is still evolving.

Why are containers more secure than VMs? ›

Reduced attack surface: Containers are lightweight and only include the runtime environment and the necessary dependencies of an application. This means that the overall attack surface is much smaller than a comparable VM, reducing the potential attack points.

Top Articles
The top 8 supply chain management certifications
Supply Chain Management for the Manufacturing Industry
Algebra Calculator Mathway
Vaya Timeclock
Driving Directions To Fedex
Otterbrook Goldens
Mama's Kitchen Waynesboro Tennessee
Graveguard Set Bloodborne
Swimgs Yung Wong Travels Sophie Koch Hits 3 Tabs Winnie The Pooh Halloween Bob The Builder Christmas Springs Cow Dog Pig Hollywood Studios Beach House Flying Fun Hot Air Balloons, Riding Lessons And Bikes Pack Both Up Away The Alpha Baa Baa Twinkle
The Connecticut Daily Lottery Hub
2016 Hyundai Sonata Price, Value, Depreciation & Reviews | Kelley Blue Book
Discover Westchester's Top Towns — And What Makes Them So Unique
What Time Chase Close Saturday
7 Low-Carb Foods That Fill You Up - Keto Tips
Gemita Alvarez Desnuda
360 Tabc Answers
Craigslist Missoula Atv
Quest: Broken Home | Sal's Realm of RuneScape
Qual o significado log out?
Dallas Mavericks 110-120 Golden State Warriors: Thompson leads Warriors to Finals, summary score, stats, highlights | Game 5 Western Conference Finals
Galaxy Fold 4 im Test: Kauftipp trotz Nachfolger?
F45 Training O'fallon Il Photos
Kabob-House-Spokane Photos
Inter Miami Vs Fc Dallas Total Sportek
Mami No 1 Ott
Stubhub Elton John Dodger Stadium
The Bold and the Beautiful
Xfinity Outage Map Lacey Wa
Pnc Bank Routing Number Cincinnati
Edward Walk In Clinic Plainfield Il
Ket2 Schedule
Shoreone Insurance A.m. Best Rating
Delaware judge sets Twitter, Elon Musk trial for October
Mckinley rugzak - Mode accessoires kopen? Ruime keuze
Elisabeth Shue breaks silence about her top-secret 'Cobra Kai' appearance
„Wir sind gut positioniert“
Craigs List Hartford
Ladyva Is She Married
Best Conjuration Spell In Skyrim
Skyward Cahokia
20 Mr. Miyagi Inspirational Quotes For Wisdom
The Sports Academy - 101 Glenwest Drive, Glen Carbon, Illinois 62034 - Guide
3367164101
Das schönste Comeback des Jahres: Warum die Vengaboys nie wieder gehen dürfen
Pronósticos Gulfstream Park Nicoletti
Spn 3464 Engine Throttle Actuator 1 Control Command
Erica Mena Net Worth Forbes
Powah: Automating the Energizing Orb - EnigmaticaModpacks/Enigmatica6 GitHub Wiki
Free Carnival-themed Google Slides & PowerPoint templates
Affidea ExpressCare - Affidea Ireland
Latest Posts
Article information

Author: Nicola Considine CPA

Last Updated:

Views: 5850

Rating: 4.9 / 5 (49 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Nicola Considine CPA

Birthday: 1993-02-26

Address: 3809 Clinton Inlet, East Aleisha, UT 46318-2392

Phone: +2681424145499

Job: Government Technician

Hobby: Calligraphy, Lego building, Worldbuilding, Shooting, Bird watching, Shopping, Cooking

Introduction: My name is Nicola Considine CPA, I am a determined, witty, powerful, brainy, open, smiling, proud person who loves writing and wants to share my knowledge and understanding with you.