Pcornel
Browse topics
Options
Recent
Favorites
Virtualization · Technical reference

libvirt

Direct answer

Treat libvirt as desired/persistent domain configuration plus runtime orchestration over a hypervisor driver; persistent XML, live runtime state and the underlying QEMU process can differ.

When to use this

Use this topic when the symptom or planned change has been narrowed to KVM / QEMU → libvirt. Establish effective host/runtime state before changing configuration.

First 30 seconds

1. libvirt manages VMs (domains), networks, storage pools and node devices.

2. qemu:///system for system VMs.

3. Remote: qemu+ssh://host/system.

4. XML definitions in /etc/libvirt/qemu/.

5. Edit with virsh edit, not files.

Operational verification

client → libvirt → QEMU/KVM

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common traps

It does not show root cause from one status line, process state or log message, and it does not show unobserved guest/application or external dependency health. libvirt can show what it requested or observes through the driver; it does not automatically show guest-internal or external dependency health.

Platform / version applicability
kvm-qemu
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformkvm-qemu
Scope / prerequisiteUse this topic when the symptom or planned change has been narrowed to KVM / QEMU → libvirt. Establish effective host/r…
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification path Verify boundary

Management client → libvirt API/URI → QEMU driver → domain XML/live state → QEMU process → guest/backends → workload

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • libvirt ≠ hypervisor.
  • Persistent domain XML ≠ live domain configuration after runtime-only changes.
  • Domain Active ≠ guest/application healthy.
  • A libvirt API success may prove management action completion without proving the resulting workload outcome.
Key checks
  • virsh uri — connection URI
  • virsh list --all — domains
  • virsh net-list --all; virsh pool-list --all — networks and pools
ReferenceWhy it matters1 section · depth on demand

In depth

libvirt is the management layer for KVM/QEMU (and other hypervisors): domain XML definitions, storage pools, networks, a stable API and the virsh CLI. Tools built on it include virt-manager, Cockpit, OpenStack Nova and KubeVirt.

virsh -c qemu:///system list --all
virsh dumpxml vm1 > vm1.xml
virsh edit vm1                       # validated edit
virsh define vm1.xml; virsh undefine vm1 --nvram
virsh -c qemu+ssh://root@kvm02/system list

qemu:///system manages system-wide VMs; qemu:///session runs per-user VMs with fewer privileges.

ReferenceImportant terms & boundaries2 sections · depth on demand

What this shows and what it does not

libvirt can show what it requested or observes through the driver; it does not automatically show guest-internal or external dependency health.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor dockvm-qemu current

Authoritative/upstream documentation reviewed for bounded claims in KVM / QEMU → libvirt. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.qemu.org/docs/master/ · confidence 94%
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
libvirtlibvirt qemudomain xmllibvirt api
Embedded reference data

Quick lookup tables

KVM / QEMU → libvirt reference map

Fast operational boundaries and evidence limits for KVM / QEMU → libvirt.

BoundaryWhat to verifyEvidence limit
Definition/configExpected KVM / QEMU → libvirt definition or configuration is presentConfigured state does not prove runtime behavior
RuntimeRelevant KVM/QEMU/libvirt object or process is active without matching errorsRuntime state does not prove dependencies or guest outcome
DependencyHost CPU/memory, storage, network or device backend required by this path is healthyLocal success does not prove the next boundary
AcceptanceOriginal guest/application test succeeds after the change or observationRequired for end-to-end closure
Confirmation

Confirm action

Continue?