[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Any tutorial to read/write in qcow2 format by programmi
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] Any tutorial to read/write in qcow2 format by programming way? |
Date: |
Tue, 31 Jul 2018 07:16:26 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
On 07/31/2018 04:44 AM, lampahome wrote:
As titled
I learn some info about qcow2 and tried to write some data and make it
qualified for qcow2 format.
I do it and mount through qemu-nbd successfully.
But I don't know how taking snapshot and backing file works in programming
way.
Can someone tell me some tutorial to know or code snippets to learn?
No real tutorial other than reading the code and the file format
specification (it's open source, after all). See:
block/qcow2*
docs/interop/qcow2.txt
Other potential resources to study:
https://github.com/jnsnow/qcheck.git
implements a rudimentary qcow2 image checker, although it still does not
handle incremental snapshots. Then again, if you want to learn the qcow2
image format, enhancing that tool would be a great asset in your quest.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org