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 July 15, 2026

Daily domain operations with virsh

Start every change by pinning the URI, capturing current state, and defining the evidence that will prove success. Inventory before change Apply and verify Use config, live, or both deliberately for device changes. A liv

virshoperationsinventoryconsole

Start every change by pinning the URI, capturing current state, and defining the evidence that will prove success.

Inventory before change

BASH
virsh -c qemu:///system list --all
virsh -c qemu:///system dominfo guest01
virsh -c qemu:///system dumpxml guest01 > /root/guest01.before.xml
virsh -c qemu:///system domblklist guest01 --details
virsh -c qemu:///system domiflist guest01

Apply and verify

BASH
virsh shutdown guest01
virsh domstate guest01 --reason
virsh start guest01
virsh domstate guest01 --reason
virsh domifaddr guest01 --source agent

Use --config, --live, or both deliberately for device changes. A live-only change can disappear at reboot; a config-only change will not affect the running guest.

Recovery boundary

Keep the pre-change XML until the guest has restarted and service checks pass. Reapply it with virsh define /root/guest01.before.xml when the persistent definition must be restored.

Related

  • Domain lifecycle and state transitions
  • Common virsh workflows
  • Logs, events, and long-running job state

On this page

  • Inventory before change
  • Apply and verify
  • Recovery boundary