fu lirong
2015-Jun-01 08:38 UTC
[Libguestfs] Dynamic monitoring of virtual machine disk by libguestfs
Hi all , By using function : guestfs_ls() , I have realized ls -l commond with libguesfs . I am wondering how to inspect the virtual disk dynamically, such as monitor mkdir commond inside the virtual machines, I mean if I create a directory in virtual machine , how can I detect it ? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libguestfs/attachments/20150601/6058bc96/attachment.htm>
Richard W.M. Jones
2015-Jun-01 10:59 UTC
[Libguestfs] Dynamic monitoring of virtual machine disk by libguestfs
On Mon, Jun 01, 2015 at 04:38:18PM +0800, fu lirong wrote:> Hi all , > By using function : guestfs_ls() , I have realized ls -l commond > with libguesfs . I am wondering how to inspect the virtual disk > dynamically, such as monitor mkdir commond inside the virtual machines, > I mean if I create a directory in virtual machine , how can I detect itThis question comes up often enough that I've added an entry in the FAQ: https://github.com/libguestfs/libguestfs/commit/2dc88ba8cb5c772ef071cf94855018d912fbed88 Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/
Kashyap Chamarthy
2015-Jun-01 19:45 UTC
Re: [Libguestfs] Dynamic monitoring of virtual machine disk by libguestfs
On Mon, Jun 01, 2015 at 11:59:13AM +0100, Richard W.M. Jones wrote:> On Mon, Jun 01, 2015 at 04:38:18PM +0800, fu lirong wrote: > > Hi all , > > By using function : guestfs_ls() , I have realized ls -l commond > > with libguesfs . I am wondering how to inspect the virtual disk > > dynamically, such as monitor mkdir commond inside the virtual machines, > > I mean if I create a directory in virtual machine , how can I detect it > > This question comes up often enough that I've added an > entry in the FAQ: > > https://github.com/libguestfs/libguestfs/commit/2dc88ba8cb5c772ef071cf94855018d912fbed88Thanks, that's a nice writeup. Now I can point people to this -- I was asked this question a couple of times before, and I just used to say "you have to relaunch the appliance". This answer explains the range of problems involved. -- /kashyap