A Linux administrator needs to manage KVM-based virtual machines on a headless server. The administrator must use a command-line tool to interact with the libvirt daemon to list all virtual machines, including those that are currently shut down. Which of the following commands would accomplish this task?
The correct command is virsh list --all. The virsh command is the main command-line interface for managing guest virtual machines controlled by the libvirt daemon. The list subcommand, by default, shows only running VMs. To include inactive (shut down) VMs, the --all option is required.
virt-manager is a graphical user interface, not a command-line tool, and is unsuitable for a headless server.
libvirtd is the daemon (service) that manages the virtualization platform; it is not a user-facing command-line tool for managing individual VMs.
qemu-img is a command-line tool used for creating, converting, and modifying virtual machine disk images, not for listing or managing the state of VMs.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the purpose of the libvirt daemon in managing virtual machines?
Open an interactive chat with Bash
How is the `virsh` tool different from `virt-manager`?
Open an interactive chat with Bash
Why is the `--all` option necessary with the `virsh list` command?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
System Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access