On Tue, Feb 10, 2015 at 02:09:33PM -0600, Jeff Brower wrote:
Using mount (read-only) and unmount commands in a script that loops
continuously, we are able to see near instantaneous file
modifications (less than 0.5 sec) performed on a Win7 live guest.
We have to use the sync.exe utility
(
technet.microsoft.com/en-us/sysinternals/bb897438.aspx), otherwise
changes are not visible for 10-20 sec.
We tested sync.exe with our libguestfs test program (using various
methods, including rsync_out, and w/wo sync on Linux side), but
we're still not able to see live guest file changes until we
relaunch the image. Any advice on how to get around the relaunch
requirement (which takes 3-5 sec due to loading the appliance Linux
kernel), would be greatly appreciated. There are many reasons why
using libguestfs is a better solution for us in the long run.
It's not too surprising that sync doesn't work on the libguestfs
appliance side.
BTW you probably should also change the caching mode in qemu to `none'
or maybe `directsync' (default is now `writeback').
Unfortunately about 18 months ago we changed the caching modes and
removed the possibility of using `none':
https://rwmj.wordpress.com/2013/09/02/new-in-libguestfs-allow-cache-mode-...
So you'd have to patch libguestfs to add it back -- it's a fairly
straightforward patch.
I still think what you're trying to do is going to go wrong in
unexpected ways.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html