On 09/16/2015 05:04 AM, Laszlo Ersek wrote:
> On 09/16/15 12:56, Vasiliy Tolstov wrote:
>> Hi, I'm need help to understand qcow2 file format, can somebody explain
>> to me, for example if i need to read 1K from offset 512?
>>
>> As i'm understand i need to calculate offset in qcow2 file using some
>> things from header, can somebody explains my how can i do that?
> 
> All I can say is, "docs/specs/qcow2.txt".

qemu-img map file.qcow2

is a great way to learn which physical host offsets hold the data at
which guest offsets.

As for coding interactions with qcow2, see the source under block/qcow2.c.

You may also be interested in the visual representation of qcow2 in my
KVM Forum slides, part 1:

http://events.linuxfoundation.org/sites/events/files/slides/2015-qcow2-expanded.pdf

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to