On Sun, Aug 26, 2012 at 09:52:23PM -0400, tao zhou wrote:
hello everyone!
first i use libguestfs API to upload a file into my linux VM , and then i want to execute some command(for example : tar xzvf XXX、 chkconfig --add XXX) to config my application by java libguestfs API,what should i do? could you show me an example in java? Thanks!
Attached is a simple example in Java. However to run the command it may be better to run the command using a "firstboot" script. See: http://libguestfs.org/guestfs.3.html#running-commands http://libguestfs.org/virt-sysprep.1.html#firstboot- (Note that the ability to use firstboot scripts was only added very recently to virt-sysprep). Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw