Linux list a KVM vm guest using virsh command

Fig.01: Virsh list a KVM vm

Fig.01: Virsh list a KVM vm

Use the following command to list a kvm vm on Linux based server:
# virsh list
Sample outputs:

 Id    Name                           State
----------------------------------------------------
 1     win7                           running
 2     edge				              running
 3     openbsd                        running
 4     freeebsd			              running

To list inactive & active VM/domains:
# virsh list --all
Here are all other options:

OptionDescription
--inactivelist inactive domains
--alllist inactive & active domains
--transientlist transient domains
--persistentlist persistent domains
--with-snapshotlist domains with existing snapshot
--without-snapshotlist domains without a snapshot
--state-runninglist domains in running state
--state-pausedlist domains in paused state
--state-shutofflist domains in shutoff state
--state-otherlist domains in other states
--autostartlist domains with autostart enabled
--no-autostartlist domains with autostart disabled
--with-managed-savelist domains with managed save state
--without-managed-savelist domains without managed save
--uuidlist uuid’s only
--namelist domain names only
--tablelist table (default)
--managed-savemark inactive domains with managed save state
--titleshow domain title

Examples and usage: How to delete KVM VM guest using virsh command

1 comment

    Have a question? Post it on our forum!