<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.6000.17095" name=GENERATOR><LINK
href="BLOCKQUOTE{margin-Top: 0px; margin-Bottom: 0px; margin-Left: 2em}"
rel=stylesheet></HEAD>
<BODY style="FONT-SIZE: 10pt; FONT-FAMILY: verdana">
<DIV><FONT face=Verdana size=2>
<DIV><FONT face=Verdana size=2>
<DIV><FONT face=Verdana size=2>Hi,All</FONT></DIV>
<DIV> </DIV>
<DIV style="TEXT-INDENT: 2em">When I call
¡°one.image.allocate¡± of xml-rpc API
,the new image file can't be created .</DIV>
<DIV style="TEXT-INDENT: 2em">but,oneimage register is no problem!</DIV>
<DIV style="TEXT-INDENT: 2em"> </DIV>
<DIV style="TEXT-INDENT: 2em"> oneimage list command follows:</DIV>
<DIV style="TEXT-INDENT: 2em"> </DIV>
<DIV style="TEXT-INDENT: 2em"><FONT face=Verdana
size=2> 35 oneadmin 0328_mkImg_1 OS Mar 28, 2011 02:12 Yes No disa 0
</FONT></DIV>
<DIV style="TEXT-INDENT: 2em"></DIV>
<DIV style="TEXT-INDENT: 2em"> oneimage show 35 follows</DIV>
<DIV style="TEXT-INDENT: 6em"><FONT
style="BACKGROUND-COLOR: #99ccff">IMAGE INFORMATION </FONT></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<BLOCKQUOTE style="TEXT-INDENT: 2em">
<DIV><FONT
style="BACKGROUND-COLOR: #99ccff">ID : 35 </FONT></DIV>
<DIV><FONT
style="BACKGROUND-COLOR: #99ccff">NAME : 0328_mkImg_1 </FONT></DIV>
<DIV><FONT
style="BACKGROUND-COLOR: #99ccff">TYPE : OS </FONT></DIV>
<DIV><FONT
style="BACKGROUND-COLOR: #99ccff">REGISTER TIME : 03/28 10:12:57 </FONT></DIV>
<DIV><FONT
style="BACKGROUND-COLOR: #99ccff">PUBLIC : Yes </FONT></DIV>
<DIV><FONT
style="BACKGROUND-COLOR: #99ccff">PERSISTENT : No </FONT></DIV>
<DIV><FONT
style="BACKGROUND-COLOR: #ffff00">SOURCE : /opt/nebula/images/afa5ebb70546e3786197e607b4092f1e13c5a5e4</FONT></DIV>
<DIV><FONT
style="BACKGROUND-COLOR: #99ccff">STATE : disa </FONT></DIV>
<DIV><FONT
style="BACKGROUND-COLOR: #99ccff">RUNNING_VMS : 0 </FONT></DIV>
<DIV><FONT style="BACKGROUND-COLOR: #99ccff"></FONT></DIV>
<DIV><FONT
style="BACKGROUND-COLOR: #99ccff">IMAGE TEMPLATE </FONT></DIV>
<DIV><FONT
style="BACKGROUND-COLOR: #99ccff">DESCRIPTION=0328_mkImg_1 desc</FONT></DIV>
<DIV><FONT style="BACKGROUND-COLOR: #99ccff">DEV_PREFIX=hd</FONT></DIV>
<DIV><FONT style="BACKGROUND-COLOR: #99ccff">NAME=0328_mkImg_1</FONT></DIV>
<DIV><FONT
style="BACKGROUND-COLOR: #99ccff">PATH=/one_images/8/images/disk.0</FONT></DIV>
<DIV><FONT
style="BACKGROUND-COLOR: #99ccff">TYPE=OS</FONT></DIV></BLOCKQUOTE></BLOCKQUOTE>
<DIV style="TEXT-INDENT: 2em"> </DIV>
<DIV style="TEXT-INDENT: 2em">The file path to <FONT
style="BACKGROUND-COLOR: #ffff00">SOURCE </FONT><FONT>Attribute,but
the actual file isn't generated!</FONT></DIV>
<DIV style="TEXT-INDENT: 2em"> </DIV>
<DIV style="TEXT-INDENT: 2em">My java project code the following:</DIV>
<BLOCKQUOTE dir=ltr style="TEXT-INDENT: 2em; MARGIN-RIGHT: 0px">
<DIV>StringBuffer template = new StringBuffer();</DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV>template.append("NAME=").append("\"").append(name).append("\"").append("\n"); </DIV>
<DIV>template.append("DESCRIPTION=").append("\"").append(desc).append("\"").append("\n");</DIV>
<DIV>template.append("PUBLIC = ").append("YES").append("\n"); </DIV>
<DIV>template.append("TYPE=").append("OS").append("\n"); </DIV>
<DIV>template.append("PERSISTENT=").append("NO").append("\n"); </DIV>
<DIV>template.append("DEV_PREFIX=").append("\"hd\"").append("\n"); // ¿ÉÑ¡. </DIV>
<DIV>//template.append("BUS=").append("").append("\n"); </DIV>
<DIV>template.append("PATH=").append("/one_images/").append(vminfo.getVmId()).append("/images/disk.0").append("\n"); </DIV></BLOCKQUOTE></BLOCKQUOTE>
<DIV dir=ltr> </DIV>
<DIV dir=ltr> </DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV dir=ltr>
<DIV>Vector params = new Vector();</DIV>
<DIV>params.add(template);</DIV>
<DIV>RPCUtil util = new RPCUtil(this.imageDAO.getDataCenterIp(null));//get
opennebula ip/username/passwd</DIV>
<DIV>Object[] rsObject = util.executeRpcMethod("one.image.allocate", params);</DIV>
<DIV>if (!(Boolean) rsObject[0]){</DIV>
<DIV> runLog.error((String)rsObject[1]);</DIV>
<DIV> throw new BaseException("failed to image register!");</DIV>
<DIV>}</DIV>
<DIV> </DIV>
<DIV> </DIV></DIV></BLOCKQUOTE></BLOCKQUOTE>
<DIV dir=ltr style="TEXT-INDENT: 2em">From opennebula.org document said£º</DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV dir=ltr style="TEXT-INDENT: 2em"><FONT
style="BACKGROUND-COLOR: #6e7406">When a new image template is allocated, the
core will insert the image in the system in <CODE>DISABLED</CODE> state. The
developer has to request the extended information for the new image, and copy
(or create) the file to the <CODE>SOURCE</CODE> attribute (added by the core).
After the file is copied (or created), the image has to be enabled.
</FONT></DIV></BLOCKQUOTE>
<DIV dir=ltr> </DIV>
<DIV dir=ltr style="TEXT-INDENT: 2em">When I used the command "oneimage
register xxx.one" ,the new image file has generated!</DIV>
<DIV dir=ltr style="TEXT-INDENT: 2em"> </DIV>
<DIV dir=ltr
style="TEXT-INDENT: 2em">Waiting for your reply!</DIV>
<DIV dir=ltr style="TEXT-INDENT: 2em"> </DIV>
<DIV dir=ltr style="TEXT-INDENT: 2em">Thanks and Regars£¡</DIV>
<DIV dir=ltr style="TEXT-INDENT: 2em">david.</DIV></FONT></DIV></FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV align=left><FONT face=Verdana color=#c0c0c0 size=2>2011-03-30
</FONT></DIV><FONT face=Verdana size=2>
<HR style="WIDTH: 122px; HEIGHT: 2px" align=left SIZE=2>
<DIV><FONT face=Verdana color=#c0c0c0 size=2><SPAN>liudewei</SPAN>
</FONT></DIV></FONT><font face="monospace">---------------------------------------------------------------------------------------------------<br>
Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) <br>
is intended only for the use of the intended recipient and may be confidential and/or privileged of <br>
Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is <br>
not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying <br>
is strictly prohibited, and may be unlawful.If you have received this communication in error,please <br>
immediately notify the sender by return e-mail, and delete the original message and all copies from <br>
your system. Thank you. <br>
---------------------------------------------------------------------------------------------------</font></BODY></HTML>