List all libvirt domains, including inactive ones.
Which command is appropriate?
virsh list --all includes both running and inactive domains.
Detailed explanation
virsh listIncorrect. Plain virsh list normally shows active domains only.
virsh dominfo --runningIncorrect. dominfo inspects one domain rather than listing all states.
virsh list --allCorrect. virsh list --all includes inactive domains.
virsh net-list --allIncorrect. net-list lists virtual networks, not domains.
Try it yourself
An example you can run in a temporary verification environment.
virsh help list 2>/dev/null | grep -E -- '--all|-a' || trueExpected result
virshがある場合は--allのhelpKey points
- virsh list --all
- Inactive domain
- Domain state
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
An inactive domain can still have a persistent definition even though it has no running process or active ID.
Check the side effect
Confirm the domain state and name with a full listing before starting, undefining, or deleting anything.