PGDCA, BCA, B-Tech, MCA, M-Tech, B.Sc computer science राजस्थान सूचना सहायक व कंप्यूटर शिक्षक विशेष नोट्स: इस अध्याय में हम Virtual Machines (VM) vs Containers (Docker Engine Architecture) (वर्चुअल मशीन (VM) बनाम कंटेनर्स (Docker): OS कर्नेल शेयरिंग और गति) की संपूर्ण थ्योरी, मुख्य तकनीकी बिंदु, तुलनात्मक तालिका और विगत परीक्षाओं के पैटर्न पर आधारित 20 अति-महत्वपूर्ण बहुविकल्पीय प्रश्न (MCQs) विस्तृत हिंदी व अंग्रेजी व्याख्या सहित पढ़ेंगे।
Overview: Virtual Machines virtualize physical hardware so each VM boots a complete guest OS kernel, whereas containers implement OS-level virtualization by sharing the host OS kernel through Linux namespaces and cgroups. Docker Engine orchestrates container lifecycles via a client-server architecture (dockerd, containerd, runc), delivering millisecond startup times, minimal footprint, and consistent application portability.
अध्याय सार: वर्चुअल मशीनें भौतिक हार्डवेयर को वर्चुअलाइज करती हैं जिससे प्रत्येक VM एक पूर्ण गेस्ट OS कर्नेल बूट करता है, जबकि कंटेनर Linux नेमस्पेस और cgroups के माध्यम से होस्ट OS कर्नेल को साझा करके OS-स्तरीय वर्चुअलाइजेशन लागू करते हैं। डॉकर इंजन क्लाइंट-सर्वर आर्किटेक्चर (dockerd, containerd, runc) द्वारा कंटेनरों को प्रबंधित करता है, जो मिलीसेकंड में स्टार्टअप, अत्यंत कम ओवरहेड और सुसंगत पोर्टेबिलिटी प्रदान करता है।
Virtual Machines (VM) vs Containers (Docker Engine Architecture): Detailed Notes & Architecture (वर्चुअल मशीन (VM) बनाम कंटेनर्स (Docker): OS कर्नेल शेयरिंग और गति)
1. Hardware-Level Virtualization (VMs) vs OS-Level Virtualization (Containers) (हार्डवेयर-स्तरीय वर्चुअलाइजेशन (VM) बनाम OS-स्तरीय वर्चुअलाइजेशन (कंटेनर))
[EN] Virtual Machines emulate physical hardware via a hypervisor, requiring every VM to carry its own full guest OS kernel, system daemons, and gigabytes of disk storage while booting in tens of seconds to minutes. By contrast, containers package solely the application binary, runtime, and dependencies, executing as isolated user-space processes directly on the shared host OS kernel. Avoiding duplicate kernels and boot sequences keeps container images in tens of megabytes and yields sub-second startup times. Consequently, cloud hosts support significantly higher container density than VM density for microservice architectures.
[HI] वर्चुअल मशीनें हाइपरवाइजर द्वारा हार्डवेयर को एम्युलेट करती हैं, जिससे प्रत्येक VM अपना पूर्ण गेस्ट OS कर्नेल, सिस्टम डेमन और गीगाबाइट्स का स्टोरेज रखता है तथा बूट होने में दसियों सेकंड से मिनट लेता है। इसके विपरीत, कंटेनर केवल एप्लिकेशन बाइनरी, रनटाइम और निर्भरताओं को पैकेज करते हैं और साझा होस्ट OS कर्नेल के ऊपर आइसोलेटेड प्रोसेस के रूप में चलते हैं। दोहरे कर्नेल और बूट प्रक्रिया से बचने के कारण कंटेनर इमेज मेगाबाइट्स में रहती हैं और मिलीसेकंड में स्टार्ट होती हैं। परिणामस्वरूप, माइक्रोसर्विस आर्किटेक्चर के लिए एक होस्ट पर VM की तुलना में कहीं अधिक कंटेनर घनत्व (density) प्राप्त होता है।
2. Linux Kernel Primitives: Namespaces, Cgroups, and UnionFS (लिनक्स कर्नेल मूल तत्व: नेमस्पेस, Cgroups और UnionFS)
[EN] Container isolation relies natively on Linux kernel features rather than hypervisors, chiefly Namespaces and Control Groups (cgroups). Namespaces partition global system resources per container: PID (process hierarchy), NET (virtual NICs, ports, routing), MNT (filesystem mounts), IPC, UTS (hostname), and USER (UID mapping). Control groups (cgroups v1/v2) meter and enforce hardware quotas—capping CPU shares, physical RAM, and disk I/O so one runaway container cannot starve the node. Meanwhile, Union File Systems such as Overlay2 stack immutable read-only image layers beneath a thin writable container layer via copy-on-write (CoW).
[HI] कंटेनर आइसोलेशन हाइपरवाइजर के बजाय सीधे लिनक्स कर्नेल की विशेषताओं—मुख्यतः Namespaces और Control Groups (cgroups)—पर निर्भर करता है। नेमस्पेस प्रत्येक कंटेनर के लिए सिस्टम संसाधनों को अलग करते हैं: PID (प्रोसेस ट्री), NET (वर्चुअल NIC और पोर्ट), MNT (माउंट पॉइंट), IPC, UTS (होस्टनेम) और USER (UID मैपिंग)। Cgroups (v1/v2) CPU शेयर, RAM और डिस्क I/O की सीमा तय करते हैं ताकि एक कंटेनर पूरे नोड के संसाधन न खा जाए। वहीं, Overlay2 जैसे यूनियन फाइल सिस्टम कॉपी-ऑन-राइट (CoW) द्वारा अपरिवर्तनीय रीड-ओनली इमेज लेयर्स के ऊपर एक पतली राइटेबल लेयर जोड़ते हैं।
3. Docker Engine Architecture: CLI, dockerd, containerd, and runc (डॉकर इंजन आर्किटेक्चर: CLI, dockerd, containerd और runc)
[EN] Docker Engine follows a modular client-server architecture communicating via REST API over a Unix socket (/var/run/docker.sock) or TCP (port 2375 plaintext / 2376 TLS). The docker CLI transmits commands (build, pull, run) to the persistent dockerd daemon, which manages images, networks, and build caching. dockerd delegates container lifecycle control over gRPC to containerd, a CNCF industry-standard daemon handling image transfers and runtime supervision. Finally, containerd invokes runc (an OCI-compliant runtime) to configure namespaces and cgroups and spawn the container process before exiting, leaving a lightweight containerd-shim to monitor stdio and exit codes.
[HI] डॉकर इंजन एक मॉड्यूलर क्लाइंट-सर्वर आर्किटेक्चर का पालन करता है जो Unix सॉकेट (/var/run/docker.sock) या TCP (पोर्ट 2375 बिना TLS / 2376 TLS सहित) पर REST API से संवाद करता है। docker CLI उपयोगकर्ता के कमांड (build, pull, run) dockerd डेमन को भेजता है, जो इमेज, नेटवर्क और बिल्ड कैश संभालता है। dockerd कंटेनर लाइफसाइकिल नियंत्रण gRPC द्वारा CNCF-मानक containerd डेमन को सौंपता है। अंततः, containerd कर्नेल नेमस्पेस और cgroups सेट करने के लिए runc (OCI-अनुरूप रनटाइम) को कॉल करता है, और एक हल्का containerd-shim प्रोसेस stdio व एग्जिट कोड की निगरानी करता है।
4. Security Boundaries, Portability, and Hybrid VM-Container Patterns (सुरक्षा सीमाएं, पोर्टेबिलिटी और हाइब्रिड VM-कंटेनर पैटर्न)
[EN] Because co-located containers share a single host OS kernel, their isolation boundary is narrower than hardware-isolated VMs: a kernel exploit or privileged container misconfiguration (--privileged or exposed /var/run/docker.sock) can compromise the host. Security hardening applies rootless execution, Seccomp syscall filtering (blocking ~44+ risky syscalls by default), AppArmor/SELinux profiles, and dropped Linux capabilities. Moreover, containers depend on the host kernel ABI—running Linux containers on Windows or macOS transparently spins up a lightweight Linux VM (such as WSL 2) underneath. Production clouds like Kubernetes on AWS EKS or GKE combine both layers by running hardened containers inside VMs for multi-tenant isolation plus rapid CI/CD agility.
[HI] चूंकि एक ही नोड पर सभी कंटेनर एक साझा होस्ट OS कर्नेल का उपयोग करते हैं, उनकी सुरक्षा सीमा हार्डवेयर-आइसोलेटेड VM से संकीर्ण होती है: कर्नेल एक्सप्लॉइट या एक्सपोज्ड /var/run/docker.sock पूरे होस्ट को खतरे में डाल सकता है। सुरक्षा बढ़ाने के लिए रूटलेस मोड, Seccomp सिस्टम कॉल फिल्टरिंग, AppArmor/SELinux प्रोफाइल और न्यूनतम Linux कैपेबिलिटीज का उपयोग होता है। इसके अलावा, कंटेनर होस्ट कर्नेल ABI पर निर्भर होते हैं—Windows या macOS पर Linux कंटेनर चलाने के लिए पृष्ठभूमि में एक हल्का Linux VM (जैसे WSL 2) चलता है। प्रोडक्शन क्लाउड (जैसे Kubernetes) में मल्टी-टेनेंट सुरक्षा और तेज CI/CD के लिए VM के अंदर कंटेनर चलाने का हाइब्रिड पैटर्न अपनाया जाता है।
Syntax, Formula & Technical Example (Virtual Machines (VM) vs Containers (Docker Engine Architecture))
# Multi-stage Dockerfile creating a minimal OCI container image
FROM python:3.11-alpine AS builder
WORKDIR /app
COPY requirements.txt app.py ./
RUN pip install --no-cache-dir -r requirements.txt
EXPOSE 8000
CMD ["python", "app.py"]
# Run container with cgroup limits & port mapping via Docker Engine
# docker run -d --name api --memory="256m" --cpus="0.5" -p 8080:8000 myapi:1.0
Virtual Machines (VM) vs Containers (Docker Engine Architecture) Quick Reference & Comparison Table
| Comparison Dimension | Virtual Machines (VMs) | Containers (Docker / OCI) |
|---|---|---|
| Abstraction & Kernel | Hardware virtualization via hypervisor; separate guest OS kernel per VM | OS-level virtualization via namespaces/cgroups; shared host OS kernel |
| Boot Time & Footprint | Slow startup (seconds to minutes); GBs of OS image storage and RAM | Millisecond startup; MBs of layered UnionFS (Overlay2) footprint |
| Isolation & Security Boundary | Strong hardware-enforced ring isolation; supports mixed Windows/Linux OSes | Process-level kernel isolation; hardened via Seccomp, AppArmor, user namespaces |
| Architecture & Orchestration | Managed by VMM (ESXi, KVM) and tools like vCenter or OpenStack | Managed by dockerd -> containerd -> runc and orchestrated by Kubernetes |
Virtual Machines (VM) vs Containers (Docker Engine Architecture) Top 20 Bilingual MCQs with Answers
Q1. How do containers achieve lightweight virtualization compared to Virtual Machines?
(वर्चुअल मशीनों की तुलना में कंटेनर हल्का वर्चुअलाइजेशन कैसे प्राप्त करते हैं?)
(A) By sharing the host OS kernel across isolated user-space processes
(B) By translating x86 machine instructions into Java bytecode
(C) By booting a separate BIOS and guest kernel inside every container
(D) By disabling CPU caches and running strictly on disk swap space
Correct Answer: (A)
[EN] Containers use OS-level virtualization, avoiding duplicate guest kernels so processes start quickly with minimal memory overhead.
[HI] कंटेनर OS-स्तरीय वर्चुअलाइजेशन का उपयोग करते हैं, जिससे अलग गेस्ट कर्नेल के बिना प्रोसेस कम मेमोरी में तुरंत शुरू हो जाते हैं।
Q2. Which Linux kernel feature gives each container an isolated process tree (PID), network stack (NET), and filesystem view (MNT)?
(कौन-सी Linux कर्नेल विशेषता प्रत्येक कंटेनर को अलग प्रोसेस ट्री (PID), नेटवर्क स्टैक (NET) और फाइलसिस्टम दृश्य (MNT) देती है?)
(A) Linux Namespaces
(B) Page Table Dirty Bits
(C) Virtual BIOS Interrupts
(D) Hypervisor Binary Translation
Correct Answer: (A)
[EN] Namespaces scope kernel resources (PID, NET, MNT, IPC, UTS, USER) so processes inside a container cannot see or touch sibling containers.
[HI] नेमस्पेस कर्नेल संसाधनों (PID, NET, MNT, IPC, UTS, USER) को सीमित करते हैं ताकि कंटेनर के अंदर की प्रक्रियाएं अन्य कंटेनरों को न देख सकें।
Q3. Which Linux kernel mechanism enforces RAM and CPU limits (such as --memory=256m) on a Docker container?
(कौन-सा Linux कर्नेल तंत्र डॉकर कंटेनर पर RAM और CPU की सीमा (जैसे --memory=256m) लागू करता है?)
(A) DNS Round-Robin Records
(B) Overlay2 Read-Only Metadata Tags
(C) Dynamic Host Configuration Protocol (DHCP)
(D) Control Groups (cgroups)
Correct Answer: (D)
[EN] Control groups (cgroups) track and throttle CPU, memory, and block I/O consumption across container process trees.
[HI] कंट्रोल ग्रुप्स (cgroups) कंटेनर प्रोसेस के लिए CPU, मेमोरी और ब्लॉक I/O के उपयोग को मापते और नियंत्रित करते हैं।
Q4. What is the default copy-on-write Union File System storage driver used by modern Docker Engine on Linux?
(Linux पर आधुनिक डॉकर इंजन द्वारा उपयोग किया जाने वाला डिफ़ॉल्ट कॉपी-ऑन-राइट यूनियन फाइल सिस्टम स्टोरेज ड्राइवर कौन-सा है?)
(A) NTFS-Sparse
(B) overlay2
(C) ISO9660
(D) FAT32
Correct Answer: (B)
[EN] Docker uses overlay2 to combine read-only image layers (lowerdir) with a single writable container layer (upperdir) efficiently.
[HI] डॉकर रीड-ओनली इमेज लेयर्स को एक पतली राइटेबल कंटेनर लेयर के साथ कुशलता से जोड़ने के लिए overlay2 का उपयोग करता है।
Q5. In Docker Engine's architecture, which OCI-compliant low-level runtime directly creates namespaces/cgroups and spawns the container process?
(डॉकर इंजन के आर्किटेक्चर में कौन-सा OCI-अनुरूप लो-लेवल रनटाइम सीधे नेमस्पेस/cgroups बनाकर कंटेनर प्रोसेस शुरू करता है?)
(A) kube-proxy
(B) VirtualBox VBoxManage
(C) runc
(D) kubectl
Correct Answer: (C)
[EN] dockerd calls containerd, which invokes runc to interact with Linux kernel syscalls and launch the container process.
[HI] dockerd containerd को कॉल करता है, जो Linux कर्नेल सिस्कॉल्स से कंटेनर प्रोसेस शुरू करने के लिए runc को निष्पादित करता है।
Q6. Which Unix socket path and encrypted TCP port are standard for the Docker daemon (dockerd) API?
(डॉकर डेमन (dockerd) API के लिए कौन-सा Unix सॉकेट पथ और एन्क्रिप्टेड TCP पोर्ट मानक हैं?)
(A) /dev/null and TCP port 25 (SMTP)
(B) /var/run/docker.sock and TCP port 2376 (TLS)
(C) /etc/passwd and UDP port 69 (TFTP)
(D) /boot/vmlinuz and TCP port 21 (FTP)
Correct Answer: (B)
[EN] By default dockerd listens locally on /var/run/docker.sock, while TLS-secured remote API access uses TCP port 2376 (unencrypted uses 2375).
[HI] डिफ़ॉल्ट रूप से dockerd /var/run/docker.sock पर सुनता है, जबकि TLS-सुरक्षित रिमोट API के लिए TCP पोर्ट 2376 उपयोग होता है।
Q7. Why does Docker Engine insert a lightweight containerd-shim process between containerd and each running container?
(डॉकर इंजन containerd और प्रत्येक चलने वाले कंटेनर के बीच एक हल्का containerd-shim प्रोसेस क्यों रखता है?)
(A) To emulate a full Windows NT kernel inside Linux user space
(B) To broadcast BGP routing tables across WAN routers
(C) To recompile C++ code on every container health check
(D) To keep stdio pipes open, capture exit status after runc exits, and allow daemonless restarts
Correct Answer: (D)
[EN] Because runc exits immediately after spawning the container, containerd-shim acts as the parent process maintaining streams and allowing dockerd/containerd upgrades without killing containers.
[HI] क्योंकि कंटेनर शुरू करते ही runc बंद हो जाता है, containerd-shim स्ट्रीम और एग्जिट कोड को संभाले रखता है जिससे डेमन रीस्टार्ट पर भी कंटेनर बंद नहीं होते।
Q8. In a Dockerfile, what does the instruction EXPOSE 8000 actually do?
(Dockerfile में 'EXPOSE 8000' निर्देश वास्तव में क्या करता है?)
(A) Documents the network port the container listens on without auto-publishing it to the host
(B) Configures cloud security groups and registers a public DNS A-record
(C) Blocks all loopback TCP connections inside the container
(D) Allocates 8000 MB of physical host RAM to the container
Correct Answer: (A)
[EN] EXPOSE serves as metadata documentation; publishing a port to the host still requires -p or -P with docker run.
[HI] EXPOSE केवल पोर्ट मेटाडेटा दस्तावेज़ करता है; होस्ट पर पोर्ट प्रकाशित करने के लिए docker run के साथ -p या -P लगाना आवश्यक है।
Q9. Why are multi-stage builds (FROM ... AS builder) widely used in Dockerfiles?
(Dockerfiles में मल्टी-स्टेज बिल्ड (FROM ... AS builder) का व्यापक उपयोग क्यों किया जाता है?)
(A) To combine physical disks across hosts into a RAID-5 array
(B) To disable layer caching and deliberately slow down CI/CD pipelines
(C) To strip build compilers and temporary files so the final runtime image stays small and secure
(D) To force every container to boot two separate hypervisor kernels
Correct Answer: (C)
[EN] Multi-stage builds compile artifacts in a heavy builder stage and copy only the final binary into a minimal base image like Alpine or Distroless.
[HI] मल्टी-स्टेज बिल्ड भारी बिल्डर स्टेज में कोड कम्पाइल करते हैं और अंतिम इमेज में केवल आवश्यक बाइनरी कॉपी करके इमेज को छोटा व सुरक्षित रखते हैं।
Q10. In 'docker run -d --name api -p 8080:8000 myapi:1.0', what does the flag '-p 8080:8000' specify?
('docker run -d --name api -p 8080:8000 myapi:1.0' में फ्लैग '-p 8080:8000' क्या निर्दिष्ट करता है?)
(A) Assigns 8080 CPU threads and 8000 MB of virtual swap
(B) Sets the container PID to 8080 and host PID to 8000
(C) Forwards host TCP port 8080 to container TCP port 8000
(D) Forwards container port 8080 outward to host port 8000
Correct Answer: (C)
[EN] Docker port mapping syntax follows HOST_PORT:CONTAINER_PORT, routing incoming host traffic on 8080 into port 8000 inside the container.
[HI] डॉकर पोर्ट मैपिंग सिंटैक्स HOST_PORT:CONTAINER_PORT होता है, जो होस्ट पोर्ट 8080 के ट्रैफिक को कंटेनर पोर्ट 8000 पर भेजता है।
Q11. Why do Docker containers typically start in milliseconds while Virtual Machines take tens of seconds or minutes?
(डॉकर कंटेनर आमतौर पर मिलीसेकंड में क्यों स्टार्ट हो जाते हैं जबकि वर्चुअल मशीनें दसियों सेकंड या मिनट लेती हैं?)
(A) Containers store their entire executable state solely in CPU L1 cache
(B) Containers skip virtual BIOS initialization and full OS kernel booting
(C) Containers disable all TCP/IP network namespaces during startup
(D) Containers run without allocating any virtual memory pages
Correct Answer: (B)
[EN] Since the host OS kernel is already running, launching a container simply creates kernel namespaces and executes the target binary.
[HI] चूंकि होस्ट OS कर्नेल पहले से चल रहा होता है, कंटेनर लॉन्च करने के लिए केवल नेमस्पेस बनाकर मुख्य प्रोसेस चलाना होता है।
Q12. When running Linux Docker containers on Windows via Docker Desktop, why does WSL 2 run a lightweight Linux VM silently underneath?
(Docker Desktop द्वारा Windows पर Linux कंटेनर चलाते समय पृष्ठभूमि में WSL 2 एक हल्का Linux VM क्यों चलाता है?)
(A) Because the docker CLI only runs inside 16-bit MS-DOS interpreters
(B) Because Overlay2 requires files to be larger than 4 GB each
(C) Because Linux containers depend directly on Linux kernel APIs for namespaces and cgroups
(D) Because Windows lacks support for TCP/IP socket networking
Correct Answer: (C)
[EN] Containers share a compatible host kernel; Linux ELF binaries and cgroup/namespace syscalls cannot execute natively on the Windows NT kernel.
[HI] कंटेनर संगत होस्ट कर्नेल साझा करते हैं; Linux नेमस्पेस और cgroup सिस्कॉल सीधे Windows NT कर्नेल पर नहीं चल सकते।
Q13. Why is mounting /var/run/docker.sock inside an untrusted container considered a critical security risk?
(किसी अविश्वसनीय कंटेनर के अंदर /var/run/docker.sock को माउंट करना एक गंभीर सुरक्षा जोखिम क्यों माना जाता है?)
(A) It forces the container into immutable read-only memory space
(B) It grants the container root-equivalent control over the Docker daemon and host machine
(C) It permanently deletes all public base layers stored on Docker Hub
(D) It switches the physical host NIC into half-duplex Ethernet mode
Correct Answer: (B)
[EN] Anyone with access to docker.sock can instruct dockerd to launch a privileged container mounting the entire host root filesystem.
[HI] docker.sock तक पहुँच रखने वाला कोई भी प्रोसेस dockerd से होस्ट फाइलसिस्टम को माउंट करने वाला प्रिविलेज्ड कंटेनर चलवा सकता है।
Q14. Which Linux kernel security mechanism does Docker apply by default to block roughly 44+ dangerous system calls inside containers?
(डॉकर कंटेनरों के भीतर लगभग 44+ खतरनाक सिस्टम कॉल को ब्लॉक करने के लिए डिफ़ॉल्ट रूप से किस Linux सुरक्षा तंत्र का उपयोग करता है?)
(A) Spanning Tree Protocol
(B) Seccomp (Secure Computing Mode)
(C) ICMP Echo Redirect
(D) BGP Route Filtering
Correct Answer: (B)
[EN] Docker's default Seccomp profile filters high-risk kernel syscalls (such as kexec_load or unshare in restricted contexts) to shrink the kernel attack surface.
[HI] डॉकर का डिफ़ॉल्ट Seccomp प्रोफाइल उच्च-जोखिम वाले कर्नेल सिस्कॉल्स को रोककर कर्नेल अटैक सरफेस को कम करता है।
Q15. Why do multi-tenant cloud platforms like Kubernetes on AWS EKS deploy containers inside Virtual Machines instead of purely bare-metal shared hosts?
(AWS EKS या GKE जैसे मल्टी-टेनेंट क्लाउड प्लेटफॉर्म शुद्ध बेयर-मेटल साझा होस्ट के बजाय वर्चुअल मशीनों के अंदर कंटेनर क्यों चलाते हैं?)
(A) To combine hardware-enforced VM tenant isolation with container packaging agility
(B) Because Kubernetes refuses to start unless Windows 95 is the guest OS
(C) Because Docker Engine cannot execute without VMware Workstation GUI
(D) Because hypervisors automatically shrink container disk size to zero bytes
Correct Answer: (A)
[EN] Running containers inside VMs pairs strong hypervisor isolation between cloud tenants with fast container CI/CD deployment inside each tenant.
[HI] VM के अंदर कंटेनर चलाने से क्लाउड टेनेंट्स के बीच मजबूत हाइपरवाइजर आइसोलेशन और अंदर तेज कंटेनर डिप्लॉयमेंट दोनों का लाभ मिलता है।
Q16. Which of the following statements is NOT true regarding Virtual Machines and Containers?
(वर्चुअल मशीनों और कंटेनरों के संबंध में निम्नलिखित में से कौन-सा कथन सत्य नहीं (NOT true) है?)
(A) Every standard Docker container boots its own independent guest OS kernel separate from the host
(B) Overlay2 uses copy-on-write layering to share immutable base image layers
(C) Docker uses cgroups to enforce memory and CPU resource quotas
(D) VMs offer stronger kernel isolation than shared-kernel Linux containers
Correct Answer: (A)
[EN] Standard containers share the underlying host OS kernel; booting a separate guest OS kernel per instance is the defining trait of a Virtual Machine.
[HI] सामान्य कंटेनर अंतर्निहित होस्ट OS कर्नेल को साझा करते हैं; प्रत्येक इंस्टेंस के लिए अलग गेस्ट OS कर्नेल बूट करना वर्चुअल मशीन की विशेषता है।
Q17. Within Virtual Machines (VM) vs Containers (Docker Engine Architecture), which comparison dimension directly maps to: "Hardware virtualization via hypervisor; separate guest OS kernel per VM"?
(Virtual Machines (VM) vs Containers (Docker Engine Architecture) में कौन सा Comparison Dimension सीधे "Hardware virtualization via hypervisor; separate guest OS kernel per VM" से संबंधित है?)
(A) Abstraction & Kernel
(B) Architecture & Orchestration
(C) Isolation & Security Boundary
(D) Boot Time & Footprint
Correct Answer: (A)
[EN] In Virtual Machines (VM) vs Containers (Docker Engine Architecture), 'Abstraction & Kernel' handles 'Hardware virtualization via hypervisor; separate guest OS kernel per VM' (OS-level virtualization via namespaces/cgroups; shared host OS kernel).
[HI] Virtual Machines (VM) vs Containers (Docker Engine Architecture) में 'Abstraction & Kernel' का कार्य/विवरण 'Hardware virtualization via hypervisor; separate guest OS kernel per VM' (OS-level virtualization via namespaces/cgroups; shared host OS kernel) है।
Q18. Which option accurately describes 'Boot Time & Footprint' in Virtual Machines (VM) vs Containers (Docker Engine Architecture)?
(Virtual Machines (VM) vs Containers (Docker Engine Architecture) के संदर्भ में 'Boot Time & Footprint' की सही विशेषता कौन सी है?)
(A) Strong hardware-enforced ring isolation; supports mixed Windows/Linux OSes
(B) Managed by VMM (ESXi, KVM) and tools like vCenter or OpenStack
(C) Slow startup (seconds to minutes); GBs of OS image storage and RAM
(D) Hardware virtualization via hypervisor; separate guest OS kernel per VM
Correct Answer: (C)
[EN] 'Boot Time & Footprint' provides 'Slow startup (seconds to minutes); GBs of OS image storage and RAM' — key point: Millisecond startup; MBs of layered UnionFS (Overlay2) footprint.
[HI] 'Boot Time & Footprint' का मुख्य विवरण 'Slow startup (seconds to minutes); GBs of OS image storage and RAM' है (Millisecond startup; MBs of layered UnionFS (Overlay2) footprint)।
Q19. In Virtual Machines (VM) vs Containers (Docker Engine Architecture), identify the correct parameter for the specification: "Strong hardware-enforced ring isolation; supports mixed Windows/Linux OSes".
(Virtual Machines (VM) vs Containers (Docker Engine Architecture) में "Strong hardware-enforced ring isolation; supports mixed Windows/Linux OSes" विवरण किस विकल्प के लिए सही है?)
(A) Architecture & Orchestration
(B) Abstraction & Kernel
(C) Isolation & Security Boundary
(D) Boot Time & Footprint
Correct Answer: (C)
[EN] 'Isolation & Security Boundary' corresponds to 'Strong hardware-enforced ring isolation; supports mixed Windows/Linux OSes' (Process-level kernel isolation; hardened via Seccomp, AppArmor, user namespaces).
[HI] 'Isolation & Security Boundary' का संबंध 'Strong hardware-enforced ring isolation; supports mixed Windows/Linux OSes' (Process-level kernel isolation; hardened via Seccomp, AppArmor, user namespaces) से है।
Q20. Considering Virtual Machines (VM) vs Containers (Docker Engine Architecture), what key behavior defines 'Architecture & Orchestration'?
(Virtual Machines (VM) vs Containers (Docker Engine Architecture) में 'Architecture & Orchestration' की मुख्य भूमिका या मान क्या है?)
(A) Strong hardware-enforced ring isolation; supports mixed Windows/Linux OSes
(B) Slow startup (seconds to minutes); GBs of OS image storage and RAM
(C) Managed by VMM (ESXi, KVM) and tools like vCenter or OpenStack
(D) Hardware virtualization via hypervisor; separate guest OS kernel per VM
Correct Answer: (C)
[EN] 'Architecture & Orchestration' represents 'Managed by VMM (ESXi, KVM) and tools like vCenter or OpenStack' (Managed by dockerd -> containerd -> runc and orchestrated by Kubernetes).
[HI] 'Architecture & Orchestration' का अर्थ/मान 'Managed by VMM (ESXi, KVM) and tools like vCenter or OpenStack' है (Managed by dockerd -> containerd -> runc and orchestrated by Kubernetes)।
Virtual Machines (VM) vs Containers (Docker Engine Architecture) — Exam FAQs
Q1: Can a Windows host run native Linux containers without any Virtual Machine?
क्या एक Windows होस्ट बिना किसी वर्चुअल मशीन के नेटिव Linux कंटेनर चला सकता है?
[EN] No; because containers depend directly on host kernel primitives (Linux namespaces and cgroups), running Linux containers on Windows or macOS transparently provisions a lightweight Linux VM such as WSL 2.
[HI] नहीं; चूंकि कंटेनर सीधे होस्ट कर्नेल इंटरफेस (Linux नेमस्पेस और cgroups) पर निर्भर होते हैं, इसलिए Windows या macOS पर Linux कंटेनर चलाने के लिए पृष्ठभूमि में WSL 2 जैसा हल्का Linux VM चलाना पड़ता है।
Q2: What is the exact difference between a Docker image and a Docker container?
डॉकर इमेज और डॉकर कंटेनर में सटीक अंतर क्या है?
[EN] A Docker image is an immutable, read-only layered template containing application code and dependencies, whereas a container is a live running instance created by attaching a thin writable layer and isolated namespaces atop that image.
[HI] डॉकर इमेज एप्लिकेशन कोड और निर्भरताओं वाली एक अपरिवर्तनीय (read-only) लेयर्ड टेम्पलेट होती है, जबकि कंटेनर उस इमेज के ऊपर एक पतली राइटेबल लेयर और आइसोलेटेड नेमस्पेस जोड़कर बनाया गया एक लाइव रनिंग इंस्टेंस होता है।
Q3: Why do cloud platforms still deploy Virtual Machines if containers are faster and smaller?
यदि कंटेनर तेज और छोटे हैं, तो क्लाउड प्लेटफॉर्म अभी भी वर्चुअल मशीनें क्यों तैनात करते हैं?
[EN] VMs provide hardware-enforced isolation across separate OS kernels—essential for multi-tenant security and mixed OS workloads—whereas containers share one kernel and are commonly deployed inside VMs for defense-in-depth.
[HI] VM अलग-अलग OS कर्नेल के साथ हार्डवेयर-स्तरीय आइसोलेशन प्रदान करते हैं—जो मल्टी-टेनेंट सुरक्षा और मिश्रित OS चलाने के लिए आवश्यक है—जबकि कंटेनर एक कर्नेल साझा करते हैं और गहन सुरक्षा के लिए अक्सर VM के अंदर चलाए जाते हैं।
Post a Comment
Post a Comment