Containers vs. virtual machines
1. Containers vs. virtual machines
In this video, you’ll learn how virtual machines and containers use virtualization differently. As a cloud security professional, you’ll need to be familiar with the security implications and best practices of these technologies. Let’s get started! A virtual machine is a full operating system running on a host computer. It can run applications and use its own operating system independent of the host computer. It even includes the hardware layer, just like the hardware you’d find in a physical computer. This layer holds components like the CPU, memory, and disk drives. It also uses a hypervisor. The hypervisor is software that serves as an abstraction layer that sits between the physical computer and the virtual machine, allowing the creation and management of virtualized computing environments. The hypervisor allows one host computer to share its memory, processing, and other resources to support multiple virtual machines. Containers let you run applications online, making them more efficient, and faster. A container is a software package that holds only the components necessary to execute a particular application. When an application goes into a container, it’s just like putting something into a box. And after adding an application, you can then add libraries and other dependencies to the container, just like adding more things to the box. Imagine you need to build a container for a specific Linux distribution. Instead of searching for every required component of that distribution, you can use the search term of the distribution you want. When you query a container repository, that repository will find the specific distribution and all dependencies and libraries needed for the Linux distribution to run and place them in the container. Both containers and virtual machines let you use isolated environments for running software services. But, it’s important to remember, there are differences between them. A virtual machine has its own guest operating system, like Linux, running on top of a host operating system. A benefit of using a virtual machine is that the hypervisor is allowed access to utilize the host's hardware. Containers hold only the dependencies they need, but they don’t have access to their own hardware. A benefit to containers is that they’re lightweight, meaning they use a lot less memory than virtual machines. You can use a deployment platform, like Docker, to deploy your container once the image is created from building the application and all dependencies that were retrieved from the container repository. You can also use Docker to create, deploy, and manage your containers. Docker has its own command-line interface, and builds the containers based on your needs. You can use this interface to interact with Docker in a terminal. Your commands are then sent to a program running in the background called the Docker Daemon. The Docker Daemon manages the containers, and the images those containers are created from. When working in the cloud, you’ll frequently have to use virtualization. Remember, virtual machines are complete virtual systems with hardware access. Containers hold only what you need to run your application but they don’t have hardware-level access. Knowing these differences will help you decide which technology to use depending on the situation.2. Let's practice!
Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.