go-qcow2reader is a Go library that provides io.ReaderAt access to qcow2 disk images.
The library solves the problem of reading qcow2 images in Go applications by implementing the qcow2 format specification as an io.ReaderAt interface. This allows standard Go I/O patterns to work with qcow2 files. The tool can be wrapped with io.NewSectionReader to provide sequential reading when needed. It includes a convert package that can copy qcow2 images to other formats, skipping unallocated and zero extents for efficiency. The convert package supports writing to raw files or to VHDX format via a dedicated vhdx.Writer, which automatically sizes the output file.
Projects that need to work with qcow2 images in Go should consider this library if they require programmatic access to qcow2 data without external dependencies. It is particularly suited for tools that manipulate virtual machine images, containerization systems, or disk image conversion utilities. The library does not support encrypted qcow2 images using AES or LUKS encryption, nor does it handle external data files. Extended L2 Entries are available but marked as experimental.
The project maintains a focused scope on core qcow2 reading functionality and image conversion, with clear documentation of unsupported features. Development activity shows attention to compatibility with the qcow2 specification and practical use cases like VHDX conversion.