Alexander Nelson
2013-Jun-09 21:49 UTC
Re: [Libguestfs] libguestfs support snapshot based virutal disk analysis?
I've used QEMU to read .vmdk snapshots. The VM directory layout in my case (Fusion, and I've seen Workstation do the same) created a .vmdk file per snapshot, and qemu-img could use that .vmdk file and the base .vmdk to convert the disk image to a raw image. IIRC there is a manifest file that ties .vmdk files to the snapshot they represent. So, from my experience, qemu does read disk snapshots in the .vmdk format. It might need a little extending to also look for and parse that manifest file, to treat a directory with .vmdk's as a snapshot tree. Does this help? --Alex On Sunday, June 9, 2013, Richard W.M. Jones wrote:> On Sun, Jun 09, 2013 at 03:40:42PM +0800, 雨居轩 wrote: > > Hi dear all: > > I have browsed almost all architecture of libGuestFs and use it on > Fedora 18. It really seems greate! > > However, > > 1. No virtual disk (*.vdi, *.vmdk...) based snashot analysis code > > Current LibGuestFs could recognize and virtual disk format > > (e.g. *.VDI) and the file syste inside it (e.g. NTFS ), but find > > no support for snapshot virtual disk. > > libguestfs relies on qemu for all disk / format support. So we > support whatever qemu supports. As qemu doesn't appear to be able to > read snapshots (except for the "top" one obviously) from a VMDK or VDI > file, we can't read them either. If support for this was added to > qemu, then libguestfs would get it for free, or nearly for free. > > > Virtual Machine such VirtualBox will generate snapshot (*.VDI for > > virtual disk diff, *.sav for virtual memory diff), and these > > snapshots are always diff towards based virtutual disk. > > > > 2. So I missed this feature? Or these feature not supported now? > > If not support, so does libguestFs will support it in the future? > > It totally depends on qemu. You or someone would have to add this > feature to qemu. libguestfs would get it for free after that. > > Rich. > > -- > Richard Jones, Virtualization Group, Red Hat > http://people.redhat.com/~rjones > libguestfs lets you edit virtual machines. Supports shell scripting, > bindings from many languages. http://libguestfs.org > > _______________________________________________ > Libguestfs mailing list > Libguestfs@redhat.com <javascript:;> > https://www.redhat.com/mailman/listinfo/libguestfs
Richard W.M. Jones
2013-Jun-10 10:11 UTC
Re: [Libguestfs] libguestfs support snapshot based virutal disk analysis?
On Sun, Jun 09, 2013 at 05:49:44PM -0400, Alexander Nelson wrote:> I've used QEMU to read .vmdk snapshots. The VM directory layout in my case > (Fusion, and I've seen Workstation do the same) created a .vmdk file per > snapshot, and qemu-img could use that .vmdk file and the base .vmdk to > convert the disk image to a raw image. IIRC there is a manifest file that > ties .vmdk files to the snapshot they represent. > > So, from my experience, qemu does read disk snapshots in the .vmdk > format. It might need a little extending to also look for and parse that > manifest file, to treat a directory with .vmdk's as a snapshot tree.Are these real VMDK files, or do you mean the "vmdk" files which are really raw that ESX produces? TBH I don't know a lot about the VDMK format, except that the specifications are intimidating. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW
Alex Nelson
2013-Jun-10 14:03 UTC
Re: [Libguestfs] libguestfs support snapshot based virutal disk analysis?
(Sorry, Rich, I managed to miss reply-all.) These VMDK files are difference files from a baseline VMDK file. I'm not familiar with ESX's storage, but the size indicators on these tell me they aren't raw. For a virtual disk that has 3.2GB of data in its current state, against 3.0GB of data in its baseline, the current state's .vmdk file is 200MB. --Alex On Mon, Jun 10, 2013 at 6:11 AM, Richard W.M. Jones <rjones@redhat.com>wrote:> On Sun, Jun 09, 2013 at 05:49:44PM -0400, Alexander Nelson wrote: > > I've used QEMU to read .vmdk snapshots. The VM directory layout in my > case > > (Fusion, and I've seen Workstation do the same) created a .vmdk file per > > snapshot, and qemu-img could use that .vmdk file and the base .vmdk to > > convert the disk image to a raw image. IIRC there is a manifest file that > > ties .vmdk files to the snapshot they represent. > > > > So, from my experience, qemu does read disk snapshots in the .vmdk > > format. It might need a little extending to also look for and parse that > > manifest file, to treat a directory with .vmdk's as a snapshot tree. > > Are these real VMDK files, or do you mean the "vmdk" files which > are really raw that ESX produces? > > TBH I don't know a lot about the VDMK format, except that the > specifications are intimidating. > > Rich. > > -- > Richard Jones, Virtualization Group, Red Hat > http://people.redhat.com/~rjones > Fedora Windows cross-compiler. Compile Windows programs, test, and > build Windows installers. Over 100 libraries supported. > http://fedoraproject.org/wiki/MinGW >
Maybe Matching Threads
- Re: libguestfs support snapshot based virutal disk analysis?
- Re: libguestfs support snapshot based virutal disk analysis?
- libguestfs support snapshot based virutal disk analysis?
- Re: libguestfs support snapshot based virutal disk analysis?
- rsync, --sparse and VM disk images