Use this topic when the symptom or planned change has been narrowed to KVM / QEMU → RAW. Establish effective host/runtime state before changing configuration.
RAW · KVM / QEMU
The guest sees a virtual block device while QEMU maps requests to a host file or block backend; simplicity of format does not remove filesystem, device, cache or capacity dependencies.
1. raw: fastest, no internal snapshots.
2. Use on LVM/ZFS/RBD for storage-level snapshots.
3. Sparse files save space.
4. Convert to qcow2 when snapshots are needed.
5. Simple to recover.
raw → guest disk
Context & applicabilityCommon mistakes · platform/version boundaries
RAW removes image-format metadata layers but does not show the underlying storage path, allocation or guest filesystem is healthy.
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
Guest block I/O → QEMU virtual disk → raw block mapping → host file/block device → filesystem/storage stack → media
Step 2 Common mistakes Narrow the fault
- RAW on file systems without sparse support, using full space.
- Expecting snapshots on RAW files.
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 ≠ automatically a physical disk.
- RAW file size ≠ guaranteed physical allocation on sparse host filesystems.
- No QCOW2 metadata ≠ no storage corruption risk.
- Simple format ≠ guaranteed higher workload performance in every stack.
qemu-img info <disk.raw>— rawqemu-img create -f raw disk.raw 50G— createcp --sparse=always src dst— copy sparse
ReferenceWhy it matters1 section · depth on demand
In depth
Raw images on KVM: simplest and fastest, sparse files on ext4/XFS, or block devices (LV, zvol, RBD).
qemu-img create -f raw web01.raw 40G
fallocate -l 40G web01.raw # fully allocate to avoid fragmentation
virt-resize --expand /dev/sda2 old.raw new.raw
guestfish -a web01.raw -i ls /etc # inspect offline (libguestfs)
For snapshots on raw files use external qcow2 overlays (virsh snapshot-create-as --disk-only) or snapshots of the underlying storage.
ReferenceImportant terms & boundaries2 sections · depth on demand
What this shows and what it does not
RAW removes image-format metadata layers but does not show the underlying storage path, allocation or guest filesystem is healthy.
Reference
qemu-img create -f raw disk.raw 50G
qemu-img convert -O raw disk.qcow2 disk.raw
qemu-img info disk.raw
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 KVM / QEMU → RAW. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.qemu.org/docs/master/ · confidence 94%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.
Quick lookup tables
KVM / QEMU → RAW reference map
Fast operational boundaries and evidence limits for KVM / QEMU → RAW.
| Boundary | What to verify | Evidence limit |
|---|---|---|
| Definition/config | Expected KVM / QEMU → RAW definition or configuration is present | Configured state does not prove runtime behavior |
| Runtime | Relevant KVM/QEMU/libvirt object or process is active without matching errors | Runtime state does not prove dependencies or guest outcome |
| Dependency | Host CPU/memory, storage, network or device backend required by this path is healthy | Local success does not prove the next boundary |
| Acceptance | Original guest/application test succeeds after the change or observation | Required for end-to-end closure |