File Formats
  • Audio
  • Video
  • Images
  • 3D & CAD
  • Documents
  • Data
  • Code
  • System
System
  • Disk & VM images
  • Floppy & tape images
  • Keys & certificates
  • Network captures
  • Shortcuts & settings
  • Logs
  1. Home
  2. System
  3. Disk & VM images
  4. QCOW2
.QCOW2
  • Overview

.QCOW2

QEMU copy-on-write disk image, version 2

Introduction

QCOW2 is the disk image format of QEMU, and the usual format for virtual machines on Linux with KVM. The file only grows as the guest writes to the disk, so a large virtual disk starts out small.

QCOW2 supports snapshots, compression and encryption, and backing files: a new image can record only the changes made on top of a base image, so many virtual machines can share one base. Version 3 of the format, still saved with the .qcow2 extension, adds further features through a feature table in the header.

Software

  • QEMU and qemu-img (Windows, macOS, Linux)
  • Virtual Machine Manager, using libvirt (Linux)
  • Proxmox Virtual Environment (Linux)

Structure

The file starts with a big-endian header beginning with the magic bytes QFI followed by 0xFB, then the version number. The header gives the size of the virtual disk, the cluster size, the path of any backing file, and the positions of the tables that follow. The file is divided into clusters, 64 KB by default.

A two-level table maps the virtual disk onto the file. The L1 table points to L2 tables, and each L2 entry points to the cluster that holds that part of the disk, or marks it as unallocated, zero or compressed. A separate refcount table counts how many times each cluster is used, which lets snapshots share clusters until one of them is written to.

  1. 0Header magic QFI\xFB, version, disk size, cluster size, table offsets72 bytes or more
  2. …Refcount table and refcount blocksclusters
  3. …L1 table pointers to the L2 tablesclusters
  4. …L2 tables pointers to data clustersclusters
  5. …Data clusters the written parts of the diskrepeated
The main parts of a QCOW2 image.
© 2026 fileformats.org About Contact Made by Lewpen