NS0-402 practice question 9 of 15

What are two differences between a container and a VM? (Choose two.)

Full set: 58 questions
Answer options
A: Containers can only communicate with other containers on the same host; VMs can communicate across routable networks.
B: Containers that are deployed on a host all share the OS kernel, whereas VMs do not. Correct answer
C: Containers are more portable than VMs because they isolate the applications from the infrastructure. Correct answer
D: VMs boot up faster than containers exposing the same application.
Correct Answer:
B. Containers that are deployed on a host all share the OS kernel, whereas VMs do not.; C. Containers are more portable than VMs because they isolate the applications from the infrastructure.
Explanation

The fundamental architectural difference between containers and Virtual Machines (VMs) lies in their level of abstraction. Containers virtualize the operating system, allowing multiple containers on a single host to share the host's OS kernel. This makes them lightweight and fast. Each VM, in contrast, virtualizes the hardware and includes a full copy of a guest operating system with its own kernel. This lightweight nature, combined with packaging an application and all its dependencies into a single image, makes containers highly portable. A container image can run consistently across any environment with a compatible container runtime, effectively isolating the application from the underlying infrastructure.

Why Incorrect

A. Containers are not limited to same-host communication; they can communicate across hosts and routable networks using various networking models like overlay networks.
D. Containers start significantly faster than VMs. They only need to start the application process, whereas VMs must boot an entire guest operating system.

References

1. NetApp Official Documentation: Introduction to containers, Kubernetes, and Astra Trident. NetApp, Inc.

Reference for B: In the section "What are containers?", the documentation states, "Unlike virtual machines (VMs), which virtualize a server’s hardware, containers virtualize a server’s operating system. This means that all containers on a host share that host’s OS kernel."

Reference for C: The same section notes, "Because containers are small and have everything they need to run, they are very portable."

2. University Courseware: Lecture 20: Virtual Machines. CS 162: Operating Systems and System Programming, University of California, Berkeley.

Reference for B & D: Slide 4, "Containers vs. Virtual Machines," explicitly shows that containers share the host OS kernel while VMs have a guest OS. It lists "Fast startup" as a key advantage for containers, directly contradicting option D.

3. Peer-reviewed Academic Publication: P. M. Mell and T. Grance, "The NIST Definition of Cloud Computing," National Institute of Standards and Technology, Special Publication 800-145, September 2011. https://doi.org/10.6028/NIST.SP.800-145

Reference for C: While not a direct comparison, the definition of "Resource pooling" and "Rapid elasticity" aligns with the principles that make container portability a key enabler for modern cloud infrastructure, isolating applications from specific physical resources.

Scroll to Top