[Libguestfs] getting guestfs_rsync_out to work

Jeff Brower jbrower at signalogic.com
Mon Feb 9 21:39:41 UTC 2015


Richard-

> On Mon, Feb 09, 2015 at 08:27:22AM -0600, Jeff Brower wrote:
>> Yes we know that it doesn't know.  We'd be ok to re-launch the image
>> to pick up changes except for the time it takes (if we could get
>> into 1 to 10 msec range it would be ok).
> 
> There's no feasible way to start a Linux kernel in under about 1-2
> seconds.  It just takes that long for the kernel to initialize itself.
> Even if you use the User-mode Linux backend (which just runs vmlinux
> as a userspace process) you'll experience approximately the same
> overhead.

Ok got it.  Thanks again for your reply.  We tried guestfs_drop_caches() as follows:

  while(1) {

    guestfs_mount(g, "/dev/sda2", "/");

    printf("%s\n", guestfs_cat(g, "/HostShared/temp.txt"));

    guestfs_umount(g, "/");

    guestfs_drop_caches(g, 3);

    usleep(1000*1000);   
 }

and still we cannot see changes made to temp.txt (from inside the Win7 guest VM)
while this loop continues to run on the host Linux.  We still have to re-launch the
image to see changes.

In general, it would be great if the "kernel load" and "disk refresh / sync"
functions in guestfs_launch() could be separated.  If there was a way to do read-only
file sharing, a very limited subset of what virtFs/9p can do, that would be great for
Win guests.

-Jeff




More information about the Libguestfs mailing list