:) ________________________________________ 发件人: Richard W.M. Jones [rjones@redhat.com] 发送时间: 2012年8月29日 20:34 收件人: tao.zhou@neusoft.com Cc: libguestfs 主题: Re: 答复: Re: libguestfs! help! On Wed, Aug 29, 2012 at 12:13:41PM +0000, tao.zhou@neusoft.com wrote:
Well as I said, the --firstboot option was only added very recently. You could try to copy what this option does by looking at the source code: https://github.com/libguestfs/libguestfs/blob/c638e1f03d2700560fe32c0889224a... But I don't have the time to translate all that into Java for you. You'll have to ask a local expert.
thanks for your help,at last,is the following right? 1、update my local libguest envirment to recent virsion 2、create a shell to execute my command(for example : chkconfig --add tomcat) 3、upload the shell to vm
You don't need to upload the shell script. The --firstboot option uploads it for you.
4、execute the command in this format virt-sysprep -a XXXX.img \ --firstboot XXX.sh 5、startup my VM
Yes. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v --------------------------------------------------------------------------------------------------- Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) is intended only for the use of the intended recipient and may be confidential and/or privileged of Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying is strictly prohibited, and may be unlawful.If you have received this communication in error,please immediately notify the sender by return e-mail, and delete the original message and all copies from your system. Thank you. ---------------------------------------------------------------------------------------------------