Use this when KVM VM disks are LVM logical volumes.
LVM · KVM Storage
LVM for KVM gives each VM disk its own logical volume as a raw block device, avoiding file-system overhead. Thin pools add snapshots and overcommit; shared VGs on SAN need cluster locking.
1. LVM-backed VM disks: raw block LVs.
2. Fast; snapshots via LVM (thin recommended).
3. Shared LVM requires clustering (lvmlockd).
4. Name volumes after VMs.
5. Monitor VG free.
VM disk → LV → VG
Context & applicabilityCommon mistakes · platform/version boundaries
- Host LVM scanning and activating volume groups inside guest disks — set a
filterorglobal_filterinlvm.conf. - Thick LVs taking all VG space, leaving none for snapshots.
- No snapshot support in libvirt for LVM-backed disks beyond LVM's own snapshots.
Operational reference
Fast context before you go deeper.
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.
- Raw block device without file system overhead.
- Thin pools add snapshots.
- Shared VGs need cluster locking.
virsh pool-info <lvm-pool>— LVM poollvs <vg>— volumesvirsh vol-create-as <pool> <name> 20G— create
ReferenceHow it works1 section · depth on demand
Using LVM with libvirt
virsh pool-define-as vg_vms logical --source-name vg_vms --target /dev/vg_vms
virsh pool-start vg_vms ; virsh pool-autostart vg_vms
virsh vol-create-as vg_vms vm01-disk0 40G
virt-install ... --disk vol=vg_vms/vm01-disk0,bus=virtio
Documented example, not captured output. Raw LVM volumes give near-native performance; snapshots come from LVM (thin pools recommended). Shared LVM on SAN requires coordination (lvmlockd/clvmd) when several hosts use it.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
With LVM for KVM, each VM disk is a logical volume used directly as a block device — no image format overhead. Thin LVs give thin provisioning and snapshots; plain LVs give predictable thick allocation.
virsh pool-define-as vg_vms logical --source-name vg_vms --target /dev/vg_vms
lvcreate -V 100G -T vg_vms/pool0 -n vm1-disk0
virsh attach-disk vm1 /dev/vg_vms/vm1-disk0 vdb --persistent
Disable LVM scanning of guest LVs on the host (global_filter or devices file in lvm.conf), otherwise the host may activate VGs that live inside guest disks.
libvirt pool example
virsh pool-define-as vg_vms logical --source-name vg_vms --target /dev/vg_vms
virsh pool-start vg_vms ; virsh pool-autostart vg_vms
virsh vol-create-as vg_vms vm01-disk0 50G
Documented example, not captured output.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Hypervisor Storage → KVM Storage → LVM. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://pve.proxmox.com/pve-docs/chapter-pvesm.html · confidence 94%