LLI Wiki — My Digital Knowledge Base

KVM command-line cheat sheet

virsh, virt-manager and brctl commands to list, start, suspend and resume KVM virtual machines on Linux.

A quick reference for the most useful commands to manage KVM/QEMU virtual machines on Linux (Debian, Ubuntu) with libvirt.

Check that KVM and QEMU are running

sudo netstat -nap | egrep '(kvm|qemu)'

Graphical tools

Tool Usage
virt-manager Graphical virtual machine manager
vncviewer 127.0.0.1:5900 Open the VNC console of a VM (the port depends on the VM configuration)

Manage virtual machines with virsh

sudo virsh list --all
sudo virsh start vm01
sudo virsh shutdown vm01
sudo virsh suspend vm01
sudo virsh resume vm01

Networking: bridges

sudo brctl show

brctl is provided by the bridge-utils package and lists network bridges and their interfaces.

Notes

Mastodon LLIMastodon SocialFosstodon