[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] help with understanding qcow2 file format
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] help with understanding qcow2 file format |
Date: |
Wed, 16 Sep 2015 07:46:14 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
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
signature.asc
Description: OpenPGP digital signature