Hi,
Apparently,
guestmount -o allow_other -a "/path/to/raw_file" -m /dev/sda1
"/path/to/mountfolder"
is much slower than
kpartx -av "/path/to/raw_file"
mount /dev/mapper/loop0p1 /path/to/mountfolder
(Doing lots of read/write inside the image.)
I thought guestmount "only" scripts the above. Seems I was wrong on that.
I am currently using libguestfs 1.18.1-1 (because it comes with Debian
wheezy/stable) and read the FAQ [1] [2], but still have questions.
Seems my version is higher than 1.13.16, so far so good. I am using
guestmount inside a virtual machine (to prevent damaging my hosts due to
own stuff).
It's a sparse raw image (because the tool I am using to create them
(grml-debootstrap [3]) can only create raw images).
With guestmount,
time sudo chroot /path/to/mountfolder sudo -u user echo test
takes ~1 second. In comparison, doing the same using kpartx/mount only
takes ~0.01 seconds.
Converting the image to a metadata preallocated qcow2 image didn't help
either.
Is there anything I can do to speed up guestmount?
Cheers,
Patrick
[1]
http://libguestfs.org/guestfs-faq.1.html#upload-or-write-seem-very-slow
[2]
http://libguestfs.org/guestfs-performance.1.html
[3]
http://grml.org/grml-debootstrap/