XK0-005 · Question #10240
Which of the following commands allow an administrator to determine if the current system is a virtual machine?
The correct answer is A. lspci. The lspci command can reveal the hardware devices, and some virtualization platforms will present specific virtualized hardware that indicates the system is a VM.
Question
Options
- Alspci
- Bmdadm
- Cvmstat
- Dvgdisplay
How the community answered
(32 responses)- A94% (30)
- C3% (1)
- D3% (1)
Why each option
The `lspci` command can reveal the hardware devices, and some virtualization platforms will present specific virtualized hardware that indicates the system is a VM.
The `lspci` command lists all PCI devices. In a virtual machine, some PCI devices will be virtualized components provided by the hypervisor (e.g., VMware, VirtualBox, KVM, Xen). The output often includes vendor and device IDs or names that explicitly state "VMware", "VirtualBox", "QEMU", or similar, making it possible to identify the system as a VM.
mdadm is used for managing software RAID arrays, which is unrelated to determining if a system is virtualized.
vmstat reports virtual memory statistics, CPU activity, and I/O, but it does not directly indicate whether the system is a virtual machine or physical hardware.
vgdisplay displays information about LVM (Logical Volume Manager) volume groups, which is a storage management feature and not related to virtualization detection.
Concept tested: Detecting virtualization using hardware information
Source: https://man7.org/linux/man-pages/man8/lspci.8.html
Topics
Community Discussion
No community discussion yet for this question.