Compare two isolation environments on the same Linux host.
The first boots its own guest kernel on virtual hardware; the second normally shares the host kernel.
Which pair correctly describes the first and second environments?
A virtual machine runs a guest OS and kernel on virtual hardware. A Linux container uses isolation mechanisms such as namespaces while normally sharing the host kernel.
Detailed explanation
Correct. The first is a virtual machine and the second is a Linux container.
Correct. The first is a virtual machine and the second is a Linux container.
Incorrect. This reverses the two environments.
Incorrect. This reverses the two environments.
Incorrect. An application container is still a container and does not boot a separate guest kernel.
Incorrect. An application container is still a container and does not boot a separate guest kernel.
Incorrect. The second environment is not a physical machine.
Incorrect. The second environment is not a physical machine.
Try it yourself
An example you can run in a temporary verification environment.
systemd-detect-virt --vm; systemd-detect-virt --containerExpected result
実行環境が該当すれば仮想化方式を表示する。環境によりnoneまたは非0終了もあるKey points
- A VM has a guest kernel
- A container shares the host kernel
- The isolation boundaries differ
Notes
- Environment: Linux仮想化の一般モデル/systemd 255
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.