Virt-Manager & Virsh Command Line Cheat Sheet¶
Virt-Manager is a graphical desktop user interface for managing virtual machines through libvirt. Below are the common GUI actions and their underlying virsh and virt-* command-line equivalents for headless management and automation.
Virtual Machine Management (virsh)¶
List Running VMs — Main Window:
List All VMs (Running & Stopped) — Main Window:
Start a VM — Right-click -> Run:
Shutdown a VM (Graceful) — Right-click -> Shut Down:
Force Stop a VM (Power Off) — Right-click -> Force Off:
Restart a VM — Right-click -> Reboot:
Save VM State to Disk — Right-click -> Save:
Restore Saved VM State — File -> Restore Saved State:
Delete/Undefine a VM — Right-click -> Delete:
Inspection & Configuration¶
View VM Details / XML Config:
Edit VM XML Configuration:
Check VM Info & Resource Allocation:
Display Active Network Interfaces:
Display Disk Storage Mappings:
Snapshots (virsh snapshot)¶
Virt-Manager provides a graphical Snapshot GUI under the lightbulb icon in the VM details window.
Create a Snapshot:
List All Snapshots for a VM:
Revert to a Snapshot:
Delete a Snapshot:
Storage & Networks (virsh pool- / net-)¶
List Storage Pools:
Start/Activate a Storage Pool:
List Virtual Networks:
Start a Virtual Network (e.g., default):
Auto-start Network on Boot:
Creating VMs (virt-install)¶
While Virt-Manager uses an interactive wizard to create VMs, you can achieve the exact same backend setup via the terminal.
- Quick Install Example: