On Tue, Jul 12, 2016 at 11:22:24AM +0100, Richard W.M. Jones wrote:
On Tue, Jul 12, 2016 at 04:48:06PM +0800, Baochuan Wu wrote:
> Thanks Pino for quick response.
> Actually I use the libguestfs APIs in C++ program. Following your idea, I
> think I should try guestfs_set_network for this.
Yes this is correct. Calling:
guestfs_set_network (g, 1);
should enable the network inside the appliance.
... And I should say you must call this _before_ you call
guestfs_launch.
Rich.
For further tips on using yum, have a look at how virt-customize
works. In particular you must use "yum -y install ..." to avoid any
unwanted interactivity.
https://github.com/libguestfs/libguestfs/blob/master/customize/customize_...
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v
_______________________________________________
Libguestfs mailing list
Libguestfs(a)redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top