On 21.04.2015 08:47, fu lirong wrote:
Hi all:
I am studying Libvirt API , I am wondering the API about the disk
manage is TBD(to be difine). The edition is
libvirt 0.7.5 ,but the edition is too old ,The website is
http://libvirt.org/guide/html/Application_Development_Guide-Introduction....
That guide is outdated; no one has touched it for a long time.
So, if I want to manage the VM disk , for example read the disk,
what
should I do ?
This is mostly out of libvirt scope, unless you really want to read raw
data stored on the disk. Libvirt is unaware of any filesystem on the
disk, or any data or data structure on the disk. If you're interested in
working with guest disk images I'd strongly recommend libguestfs:
http://libguestfs.org/
It's libvirt based project, and to demonstrate its capabilities, here's
how to change a Windows guest wallpaper:
https://rwmj.wordpress.com/2011/05/16/tip-change-the-background-image-in-...
If you are, however, really interested in peeking a disk image, you
should look at virStorageVolDownload().
Michal