On Thu, Apr 07, 2016 at 10:12:07PM +0800, Baochuan Wu wrote:
Hi All,
I installed CentOS 7 as Xen Guest OS(DomU OS), I wonder if it is possible to use libguestfs in this CentOS 7 VM? libguestfs-test-tools reports error: [...] Original error from libvirt: internal error: process exited while connecting to monitor: Cannot set up guest memory 'pc.ram': Cannot allocate memory [...] Cannot set up guest memory 'pc.ram': Cannot allocate memory libguestfs: error: appliance closed the connection unexpectedly, see earlier error messages
It looks as if you VM has very limited RAM, not enough to start up the qemu instance. If you give your VM more memory, then libguestfs should work fine. We run libguestfs nested all the time.
After running "*export LIBGUESTFS_BACKEND=direct*", it seems libguestfs will launch another VM inside my VM. Is this necessary?
That's how libguestfs works: http://libguestfs.org/guestfs-internals.1.html 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/