Difference between revisions of "Virsh list"
Jump to navigation
Jump to search
Tags: Mobile web edit, Mobile edit |
(→Errors) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | {{lowercase}} | ||
* Man page: https://linux.die.net/man/1/virsh | * Man page: https://linux.die.net/man/1/virsh | ||
Line 20: | Line 21: | ||
</pre> | </pre> | ||
− | + | virsh list --all | |
− | virsh list --all | + | Id Name State |
− | + | ---------------------------------------------------- | |
− | ---------------------------------------------------- | + | 4 VM_NAME_1 running |
− | + | 5 VM_NAME_2 in shutdown | |
− | + | - VM_NAME_3 [[shut off]] | |
− | + | ||
− | |||
Line 48: | Line 48: | ||
<code>virsh list --no-[[autostart]]</code> | <code>virsh list --no-[[autostart]]</code> | ||
− | + | ||
− | virsh list | + | == Errors == |
− | error: failed to connect to the hypervisor | + | |
− | error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied | + | virsh list |
− | </ | + | error: failed to connect to the hypervisor |
+ | error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied | ||
+ | |||
+ | Check: <code>[[systemctl status libvirtd]]</code> or start it <code>[[systemctl start libvirtd]]</code> | ||
+ | |||
See man page https://linux.die.net/man/1/virsh for complete list of VMs States. | See man page https://linux.die.net/man/1/virsh for complete list of VMs States. | ||
Line 70: | Line 74: | ||
* <code>[[virsh domdisplay]]</code>, <code>[[virsh vncdisplay]]</code> | * <code>[[virsh domdisplay]]</code>, <code>[[virsh vncdisplay]]</code> | ||
* <code>[[virsh capabilities]]</code> | * <code>[[virsh capabilities]]</code> | ||
+ | * <code>[[virsh nodedev-list]]</code> | ||
== See also == | == See also == |
Latest revision as of 16:10, 10 December 2023
- Man page: https://linux.die.net/man/1/virsh
virsh list
virsh list --all
virsh list --name
virsh list --no-autostart
virsh list --with-snapshot
virsh list --title
virsh -c qemu:///system list
Examples[edit]
virsh list Id Name State ---------------------------------------------------- 1 HostedEngineLocal running 2 VM_NAME_2 in shutdown
virsh list --all Id Name State ---------------------------------------------------- 4 VM_NAME_1 running 5 VM_NAME_2 in shutdown - VM_NAME_3 shut off
virsh list --with-snapshot Id Name State ----------------------------------------------------
virsh list Id Name State ----------------------------- 2 root_default paused
virsh list --name HostedEngineLocal VM_NAME_2
virsh list --no-autostart
Errors[edit]
virsh list error: failed to connect to the hypervisor error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied Check:systemctl status libvirtd
or start itsystemctl start libvirtd
See man page https://linux.die.net/man/1/virsh for complete list of VMs States.
- shutdown The domain is in the process of shutting down, i.e. the guest operating system has been notified and should be in the process of stopping its operations gracefully
Activities[edit]
- Dump config for all running machines:
for NAME in `virsh list --name`; do virsh dumpxml $NAME > $NAME.xml; done
Related commands[edit]
virsh vol-list POOL_NAME
virsh net-list
virsh reboot
virsh shutdown
orvirsh destroy
virt-list-filesystems
virsh domdisplay
,virsh vncdisplay
virsh capabilities
virsh nodedev-list
See also[edit]
virsh
: Storage information, Connecting, Operations, Memory, Snapshots, Networking, CPU, release notes,virsh nodedev-list
- virsh Info:
virsh list
,virsh version
,virsh dominfo
,virsh pool-info
,virsh domstats
,virsh vol-info
,virsh net-info
,virsh dumpxml
- KVM, Installation, QEMU,
virsh
,virtinst
,libguestfs-tools
, libvirt, qemu, Red Hat Virtualization (RHV), MacVTap, Virtio, oVirt, KVM services, KVM networking, KVM graphics, CPU, KVM on ARM
Advertising: