[Libguestfs] modify running VM's image

Richard W.M. Jones rjones at redhat.com
Thu Sep 6 10:25:52 UTC 2012


On Thu, Sep 06, 2012 at 04:07:23PM +0800, 周涛 wrote:
> Thanks!

Wanlong Gao is correct that using libguestfs on a running
VM will (not maybe, *will*) cause disk corruption.

However you might want to look at libguestfs-live, which
involves installing a daemon in the VM that libguestfs talks to:
https://rwmj.wordpress.com/2011/07/06/libguestfs-live/
https://rwmj.wordpress.com/tag/libguestfs-live/
(Currently this only works for Linux VMs)

Also, if the VM is switched off, you can install a firstboot
script (as previously discussed).  This script runs when the
guest boots, and can install software etc.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top




More information about the Libguestfs mailing list