[Libguestfs] 答复: Re: libguestfs! help!

tao.zhou at neusoft.com tao.zhou at neusoft.com
Wed Aug 29 12:13:41 UTC 2012


>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/c638e1f03d2700560fe32c0889224ac29bd52334/sysprep/firstboot.ml
>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
4、execute the command in this format
      virt-sysprep -a XXXX.img \
           --firstboot XXX.sh
5、startup my VM



________________________________________
发件人: Richard W.M. Jones [rjones at redhat.com]
发送时间: 2012年8月29日 18:46
收件人: tao.zhou at neusoft.com
Cc: libguestfs
主题: Re: Re: libguestfs! help!

On Wed, Aug 29, 2012 at 05:56:17PM +0800, 周涛 wrote:
> i'm so sorry that i still don't know what to do, i execute the command
> but [virt-sysprep: unknown option `--firstboot' ] execption happens,
> could you show me the detail? Thanks!

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/c638e1f03d2700560fe32c0889224ac29bd52334/sysprep/firstboot.ml

But I don't have the time to translate all that into Java for you.
You'll have to ask a local expert.

> and i have another question:
> now , i use ssh2 api to execute the remote virt-XXX(virt-win-reg virt-sysprep ......) command,
> is there java api like guestfs?

No idea about this.

Rich.

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org
---------------------------------------------------------------------------------------------------
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. 
---------------------------------------------------------------------------------------------------




More information about the Libguestfs mailing list