KVM-QEMU-VIRSH Cheat Sheet

List All Virtual Machines

sudo virsh list --all

List only running Virtual Machines

sudo virsh list

Start a Virtual machine

sudo virsh start <vm-name>

Shutdown a virtual machine

sudo virsh shutdown <vm-name>

Connect to the console/serial port

sudo virsh console <vm-name>

Connect to VGA Console

sudo virt-viewer <vm-name>

Dump the XML configuration file for a given VM

sudo virsh dumpxml <vm-name>