Posted in Information Technology

KVM Cheat Sheet


virsh list                # List running
virsh list --all          # List all

Control instances

virsh start <instance>
virsh shutdown <instance>
virsh destroy <instance>
virsh suspend <instance>
virsh resume <instance>

virsh console <instance>

Define instances

virsh dumpxml <instance> >dump.xml
virsh create dump.xml   # Create from XML
virsh edit <instance>
virsh undefine <instance>

virsh blockresize <instance> --path vda --size 100G

virsh dominfo
virsh vcpuinfo
virsh nodeinfo

virsh quit   # Leave CLI

Check CPU Features

Especially important to have pcid CPU flag present in guests

virsh capabilities | grep feature


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s