List only the currently running libvirt domains.
Which command is appropriate?
virsh list displays currently running libvirt domains by default.
Detailed explanation
virsh start --listIncorrect. start is an action and does not list running domains in this form.
virsh listCorrect. virsh list shows active domains.
virsh console --allIncorrect. console connects to a guest and does not list domains.
virsh destroy --dry-runIncorrect. destroy forcibly stops a domain and is not a dry-run listing command.
Try it yourself
An example you can run in a temporary verification environment.
virsh help list 2>/dev/null | head -n 8 || trueExpected result
virshがある場合はlistのhelp。libvirtへ接続しないKey points
- virsh list
- Running domain
- libvirt
Notes
- Environment: virsh helpのみ
- Use a disposable VM or container when validating lifecycle commands.
- Exact command output can vary slightly by distribution and runtime version.
Foundation review
Identify the layer
Starting a domain, opening its console, and listing domains are distinct virsh operations.
Check the side effect
Record the domain name or ID from the listing before issuing a lifecycle command.