This lesson is about virtual machines and containers and the differences and details about them.
This is a completely new topic in the Airpark one catalog.
When I took the exam myself, the topic didn't even exist.
But API is, of course, moving with the times because at the moment there is a real container hype
and accordingly it makes sense to include this topic in the exam catalog.
API won't expect you to be an absolute expert in virtual machines or container technologies.
It's more about knowing what it is, what the differences are and what the basic function looks like.
I would like to show you this briefly using a diagram we see here a comparison between a virtual machine
and Aleksi Alex De.
The letter is a Linux container technology.
There are other container technologies, but more on that later.
First, let's take a look at the virtual machines.
If you have installed your Linux test systems via virtual box, as I described in the first videos,
then you have already got to know that machines and practice virtual machines are operating systems
installed in another operating system.
You can install and use a Windows system on the Linux system, so to speak.
It works the other way around.
Of course, how the virtual machines are set up can be seen in the diagram on the left.
At the very bottom, we find the physical server hardware.
The server operating system is installed on this hardware so directly on the hard drive.
A so-called hypervisor is installed within the operating system, the hypervisor is the software that
later connects the virtual operating systems with the server hardware and the host operating system.
There are various providers of such solutions, for example, virtual box cavium or VMware, with the
help of the hypervisor, we can install another operating system.
This virtual operating system is completely installed and indirectly, it also uses the server hardware.
But as I said, only indirectly, because the operating system cannot access the server hardware direct
directly.
I mean, the guest operating system.
Now, the hypervisor emulates the corresponding hardware.
The hypervisor therefore provides virtual hardware that the operating system then can use the operating
system itself, then has the appropriate binaries and libraries installed as well as various applications.
We have three different guests, operating systems in this diagram.
Of course, every single operating system has its own space on the hard drive, for example, 30 gigabytes
system depending on the system.
It can also be significantly more each system uses indirectly, but it uses the appropriate hardware
of the server.
The hypervisor also uses the corresponding hardware.
A lot of computer power is required so that the hardware can be emulated and that these systems run
smoothly and without interference.
The server can become significantly slower the more virtual machines you have installed and the more
virtual machines are currently switched on.
On the other hand, in this case, we have the Linux containers.
It looks a little different here.
Here, too, of course we have the classic server hardware at the bottom.
The host operating system is installed directly on the hardware, which in the case of Alexa, Alexa
is always Linux.
With the help of container technology, there is no need for a hypervisor.
This is no longer necessary.
The virtual operating system, as we know it, is also no longer necessary.
Here in the graphic, it is no longer shown at all as if we were no more virtual operating systems at
all.
In the case of DOCA, this was for example.
Even so, doctors used to simply virtualize applications or to outsource applications in self-contained
containers.
As an example, we will install a Web server.
This docker container then basically just has the Web server in its container and the fights that it
needs for this Web server to work.
This means that such a docker container does not always necessarily need the entire operating system
for the Web server to work.
But as I said, only the hardware itself and the corresponding files that it needs so that the software
can start accordingly.
The hardware load is, of course, significantly lower because if we had installed three Web servers
and three times the corresponding binaries and libraries that are required for the operating of the
Web server, then two important components are missing compared to a virtual machine once the hypervisor
is missing and the complete virtual operating system is missing, too.
If you compare that and the server hardware may produce a maximum of five virtual machines.
On the other hand, we can probably operate 50 containers without causing a bottleneck.
Now, that's not a number that comes from a manufacturer.
I just threw them roughly into the room to make the difference clear with Linux containers.
It is the case that the applications or the operating systems that are installed by a container access
the hardware directly.
This means that there is no emulated hardware, no virtual hardware created by hypervisor.
But each container accesses the physical hardware directly.
Accordingly, the entire physical hardware is available to each container with Linux containers.
It is already the case that a Web server cannot be installed here, but complete operating systems are
actually installed.
But compared to virtual machines, these are minimalist versions of an operating system.
If I now, for example, would like to run an Apache Web server in the container, you do not have to
install a Red Hat enterprise or Ubuntu server with several gigabytes of storage space.
It is sufficient if you use a minimal version of Linux system, for example, upon Linux.
This is about three megabytes in size.
The Web server can then be installed within Linux.
This means that a guest operating system is installed, but in principle it is not worth mentioning
since the system is kept so minimal that it hardly requires any storage space and hardly any CPU and
memory.
Another advantage of containers over virtual machines is that the container is ready and started within
a few seconds in the case of a virtual machine, it can take a few minutes until everything is completely
ready for use.
We will take a look at a small Linux container example in a moment.
However, we will not discuss any commands or anything like that.
This is not required in the exam and that would also go too far for this course.
So I will switch to my terminal now.
With a command Aleksi list, the program shows us which contain us.
We are currently running.
We can see here the name the state, the IP address and what container type and via the command Aleksi
image list, we can see the corresponding images that we have saved on the hard drive.
And we see here.
And open 216 Virgin.
And it has only 160 megabytes.
I think you know it when you download Ubuntu 16 from the website, then I think it should be two gigabytes
or three gigabytes.
Here it is.
One hundred seventeen megabytes.
We have here a fedora.
Thirty three with 97 megabytes.
We have a Debian system here with 65 megabytes and also Davian system with 200.
Thirty seven megabytes and here we have some alpine distributions with.
Two to five megabytes.
So they are very, very small, very, very small operating systems, and, of course, they started
very quickly.
Let's start the open Linux system here.
This one, I think.
Here we just into the command Aleksi launch and then my airplane and I choose the container name.
I'll pick up on.
And the container has already started.
That's it, if we now enter Aleksi list.
We.
See that our new container is running.
And now compare the installation time with the installation by a virtual machine, that's a huge difference.
So let's log in to open Aleksi exec
pick up on.
And now we are on.
On the road in Alpine Lennox.
We see that we can find the evidence directory structure here if we now want to install a Web server
from within the program, we can of course do that.
We can store a website, save it, etc. We can start the next container with the same configuration
within a few seconds to store another Web site and so on.
The system starts of larger containers, takes significantly longer than that of Alpine, maybe 20 seconds
instead of two seconds.
Let's try it out.
I leave the container
and.
We can use this one to 16.
Aleksi Long.
The fingerprints and the name Al Pickleball to, for example, the.
And you see, it takes a little bit longer.
But normally, just 20 or 30 seconds maximum.
So.
So the start of the container is complete now.
Three lists, and here we have all right, I'll pick a one two system, which is running, by the way,
every single container that is active is completely independent of its environment.
This means that even if the container accesses the hardware of the whole operating system directly,
and even if this container produces an error and crashes, the other containers or even the host system
are never affected.
OK, that was a little digression into Alex CLX, the container technology, and I see you in the next
video.