Virtual Machines vs Containers - Which is right for you?

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
are you confused over whether you should be using virtual machines or containers well i'm don pizzat edutainer at itprotv and in this versus video i'm going to show you the differences between virtual machines and containers [Music] virtual machines and containers can be confusing partly because there's so many players in the space in the world of virtual machines we have players like zen and kvm the largest open source virtualization platforms we have vmware's vsphere microsoft's hyper-v oracle's virtual box over on the container side well we have docker who's the undisputable champion right now but we also have rocket lxc even microsoft windows has their own container platform so how do we know which one to use well before we pick let's start with making sure we understand exactly what their purpose is i've got a little analogy i want to share with you virtual machines are based on this idea of virtualization which is very much like carpooling when i drove to work this morning i drove my car i have five seats in the car i occupied one i wasted eighty percent of the capacity of my car with virtualization we put more than one workload on the same piece of hardware to maximize the resource utilization i could have fit four more people in my car five of us could have driven well from my house to here right we kind of expect a somewhat common workload with containers it's different when i drive i might drive a motorcycle a car a semi truck all three drive different ways i have to have different licenses for each one containers make them drive the same way i can actually hop onto a motorcycle onto a car onto a semi truck and be able to drive it because containers hide all the complexity underneath and give me a common set of controls that i use to steer and drive the vehicle now let's say we're having to pick between one and another let's talk about how they work to understand where the efficiencies are with virtual machines think of that carpool analogy we have multiple operating systems running on one piece of hardware we have our hardware and we have some host operating system that acts as a hypervisor it's like a traffic cop determining who gets access to hardware when on top of that we have partitions in each partition we install a full operating system with any binaries and libraries and ultimately the applications we want to run each partition has its own completely separate operating system all running on top of that shared hypervisor containers are a little bit different we still have hardware we still have some kind of host operating system but instead of a hypervisor we have a container engine and what that container engine is doing is exposing parts of the host operating system into the partitions the partitions only contain the binaries and libraries the applications that we need they don't contain an entire operating system they don't have to they can share the kernel of the underlying operating system by having a little bit of shared resources like that we lose the separation and independence but we gain a ton of efficiency and that's where containers become really powerful let's talk about some of the other differences between virtual machines and containers when we talk about startup time virtual machines have an entire copy of an operating system that takes time to boot it can take a minute or two to boot up and then get customized and up and operational in an environment virtual machines are great for on-prem deployments and uses like that but in the cloud they can be a little sluggish containers on the other hand just contain the applications they're running off of a kernel that's already running they boot up in milliseconds that makes them very rapid to deploy which is great for cloud auto scaling we also talk about disk space right when you have an entire copy of an operating system running in a virtual machine that's going to consume disk space and the more vms you have the more duplicate data that you have for those os's and that consumes extra storage containers they share they use a container image they fire up with just their applications they're far more efficient as far as the storage they consume portability virtual machines can move between hardware assuming that hardware is running the same hypervisor but with containers most of the container services that are out there are compatible with docker containers that means i can write a docker container and i know that i can run it on my laptop i can run it on a server here in the building i can run it in the aws cloud or microsoft azure very very portable very easy to move around we don't really have that with virtual machines and then just general efficiency virtual machines have entire copies of operating systems so they consume more ram more cpu more disk space containers are far more efficient we're trading a little bit of isolation in exchange for performance and efficiency gains and then lastly that operating system in kernel i've kind of already spoiled this one a bit right with virtual machines you have dedicated operating systems and kernels per virtual machine so if one vm crashes it doesn't affect the others but with container platforms they use a shared kernel that makes them more efficient and faster but if that kernel were to crash all the containers were to go down now fortunately they're so small i could just rapidly redeploy them somewhere else so that's a big bonus to have with those workloads all right so let's sum up some of the differences that we've got here virtual machines give us isolated independent operating systems that we can install applications on we can run different operating systems on top of the same hardware and we can maximize our hardware utilization in exchange for a little bit more sluggish performance containers on the other hand are much faster they take less space they deploy more rapidly and are wonderful for auto-scaled cloud deployments but they leverage a shared kernel under the hood and that makes them a little susceptible to not being isolated from the other containers running on the system well that's it for this versus episode be sure to check out the playlist below for more versus videos and be sure to subscribe to our youtube channel thanks for watching
Info
Channel: ITProTV
Views: 31,067
Rating: 4.9228487 out of 5
Keywords: virtual machines vs containers, container vs vm pros and cons, virtual machines and containers, container vs vmware, containers vs virtual machines, virtual machines vs docker containers, docker containers vs virtual machines, docker vs vmware, vmware containers vs docker, docker vs vmware vs virtualbox, container vs vm vs docker, docker vs virtual machine, docker vs vm, docker vs vm difference, docker vs vm youtube, virtual machine explained, docker container
Id: XCWWPpfdbsM
Channel Id: undefined
Length: 5min 54sec (354 seconds)
Published: Fri Sep 04 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.