[Libguestfs] any read/write raw image function or API in Python?

Pino Toscano ptoscano at redhat.com
Wed Jul 12 09:24:10 UTC 2017


On Wednesday, 12 July 2017 10:45:35 CEST 陳培泓 wrote:
> I know there's lots of functions that can access/modify the internal fs of
> img or qcow2 through libguestfs.
> 
> I want to know is there any library can modify the raw/qcow2 image directly
> in Python?
> 
> For example, there's function called read_qcow2(), and I can know the
> content of tmp.qcow2 through the function read_qcow2().

The only library I know for qcow2 is: https://github.com/libyal/libqcow
although it seems to not be fully up-to-date with the state of QEMU's
later additions to the format.

RAW files are just 1:1 representation of disks, so you will need to
read partitions, filesystems, etc directly from there.

-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20170712/10762622/attachment.sig>


More information about the Libguestfs mailing list