Skip to navigationSkip to content
libvirtd docs
Commands

Manual nav

Search `/` or jump with `g` / `G`.

Portal

  • Home manual
  • Command explorer
Foundations6 sections
  • Overview1
  • Installation2
  • Platform1
  • Concepts5
  • Domains2
  • Domain XML2
Subsystems9 sections
  • Identity1
  • Automation2
  • Daemons3
  • virsh3
  • Networking5
  • Storage4
  • Security3
  • Observability2
  • Remote Access1
Operations6 sections
  • Migration2
  • Backup2
  • Performance3
  • Recovery1
  • Troubleshooting2
  • References2

/ search · g top · G quickstart

guidevirshReviewed March 6, 2026

Common virsh workflows

This page groups the virsh commands that usually travel together during provisioning, incident handling, and cleanup. Inventory and inspect first Do this before changing anything. list all Use virsh list all when you nee

virshstartdumpxmlmigrate

This page groups the virsh commands that usually travel together during provisioning, incident handling, and cleanup.

Inventory and inspect first

Do this before changing anything.

BASH
virsh -c qemu:///system list --all
virsh dominfo vm01
virsh dumpxml vm01 | less
virsh domblklist vm01
virsh domiflist vm01

list --all

Use virsh list --all when you need the authoritative inventory for the current URI, including shut off guests.

dumpxml

Use virsh dumpxml before assuming anything about disks, interfaces, firmware, consoles, or security labels.

Start, stop, and console access

BASH
virsh start vm01
virsh reboot vm01
virsh shutdown vm01
virsh destroy vm01
virsh console vm01

Use shutdown first. Reserve destroy for the same situations where you would force-stop a process.

start

virsh start asks libvirt to boot a defined guest without forcing a configuration change.

shutdown

virsh shutdown is the graceful stop path and should be your default before you escalate to destroy.

Snapshot and migration checks

BASH
virsh snapshot-list vm01
virsh domjobinfo vm01
virsh migrate --live vm01 qemu+ssh://hv-b/system

Safe cleanup

BASH
virsh undefine vm01 --nvram
virsh undefine oldvm --remove-all-storage

Read the XML and storage mapping before using the storage removal flags. They are convenient and easy to misuse.

connect

Use virsh connect URI when you want to switch the interactive shell to a different libvirt endpoint without restarting the client.

Related

  • virsh connection URIs
  • Libvirt network modes
  • Pool and volume workflows

On this page

  • Inventory and inspect first
  • list --all
  • dumpxml
  • Start, stop, and console access
  • start
  • shutdown
  • Snapshot and migration checks
  • Safe cleanup
  • connect