Please stop sending a daily mail with the same problem. It's annoying and counter-productive.<div><br></div><div>You will get better help if you put some effort in your question. I really like how this is explained in the Stack Overflow guide on how to ask [1].</div>
<div><br></div><div><br></div><div>Can you execute CLI commands with those "<span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">oneadmin:rajesh" </span>credentials? Try any command, like 'oneuser show' or 'onevm list'; and paste the output of:</div>
<div><br></div><div>$ cat ~/.one/one_auth</div><div><br></div><div><br></div><div>Good luck</div><div><br></div><div>[1] <a href="http://stackoverflow.com/questions/how-to-ask" target="_blank">http://stackoverflow.com/questions/how-to-ask</a><br clear="all">
--<br>Carlos Martín, MSc<br>Project Engineer<br>
OpenNebula - The Open-source Solution for Data Center Virtualization<div><span style="border-collapse:collapse;color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px"><a href="http://www.OpenNebula.org" target="_blank">www.OpenNebula.org</a> | <a href="mailto:cmartin@opennebula.org" target="_blank">cmartin@opennebula.org</a> | <a href="http://twitter.com/opennebula" target="_blank">@OpenNebula</a></span><span style="border-collapse:collapse;color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px"><a href="mailto:cmartin@opennebula.org" style="color:rgb(42,93,176)" target="_blank"></a></span></div>
<br>
<br><br><div class="gmail_quote">On Wed, Oct 17, 2012 at 6:04 AM, rajesh kannan <span dir="ltr"><<a href="mailto:asrajeshkannan@gmail.com" target="_blank">asrajeshkannan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Pls Help me<br>
<br>
Give me any changes on this program<br>
<br>
Still i Had problem<br>
<br>
Trying to allocate the virtual machine... failed!<br>
[VirtualMachineAllocate] User couldn't be authenticated, aborting call.<br>
<br>
import java.lang.*;<br>
import java.io.*;<br>
import org.opennebula.client.Client;<br>
import org.opennebula.client.vm.VirtualMachine;<br>
import org.opennebula.client.OneResponse;<br>
import org.apache.xmlrpc.XmlRpcException;<br>
<br>
public class vmcre<br>
{<br>
public static void main(String args[])<br>
{<br>
try<br>
{<br>
Client oneClient = new Client("$ONE_AUTH","$ONE_XMLRPC");<br>
<br>
//or<br>
<br>
//Client oneClient = new Client("oneadmin:rajesh","$ONE_XMLRPC");<br>
<br>
//or<br>
<br>
//Client oneClient = new<br>
Client("/var/lib/one/.one/one_auth","<a href="http://localhost:2633/RPC2" target="_blank">http://localhost:2633/RPC2</a>");<br>
<br>
<br>
<br>
String vmTemplate =<br>
"NAME = vm_from_java CPU = 0.1 MEMORY = 64\n"<br>
+ "DISK = [\n"<br>
+ "\tsource = \"/var/lib/one/ttylinux.img\",\n"<br>
+ "\ttarget = \"hda\",\n"<br>
+ "\treadonly = \"no\" ]\n"<br>
+ "FEATURES = [ acpi=\"no\" ]";<br>
<br>
System.out.print("Trying to allocate the virtual machine... ");<br>
OneResponse rc = VirtualMachine.allocate(oneClient, vmTemplate);<br>
<br>
if( rc.isError() )<br>
{<br>
System.out.println( "failed!");<br>
throw new Exception( rc.getErrorMessage() );<br>
}<br>
int newVMID = Integer.parseInt(rc.getMessage());<br>
System.out.println("ok, ID " + newVMID + ".");<br>
<br>
VirtualMachine vm = new VirtualMachine(newVMID, oneClient);<br>
<br>
System.out.print("Trying to hold the new VM... ");<br>
rc = vm.hold();<br>
<br>
if(rc.isError())<br>
{<br>
System.out.println("failed!");<br>
throw new Exception( rc.getErrorMessage() );<br>
}<br>
<br>
rc = <a href="http://vm.info" target="_blank">vm.info</a>();<br>
<br>
if(rc.isError())<br>
throw new Exception( rc.getErrorMessage() );<br>
<br>
System.out.println();<br>
System.out.println(<br>
"This is the information OpenNebula stores for the new VM:");<br>
System.out.println(rc.getMessage() + "\n");<br>
<br>
System.out.println("The new VM " +<br>
vm.getName() + " has status: " + vm.status());<br>
<br>
System.out.println("The path of the disk is");<br>
System.out.println( "\t" + vm.xpath("template/disk/source") );<br>
<br>
rc = vm.finalizeVM();<br>
System.out.println("\nTrying to finalize (delete) the VM " +<br>
vm.getId() + "...");<br>
<br>
}<br>
catch (Exception e)<br>
{<br>
System.out.println(e.getMessage());<br>
}<br>
}<br>
}<br>
<br>
<br>
Regards<br>
<br>
A S RAJESH KANNAN<br>
ANNA UNIVERSITY,CEG<br>
M.TECH(IT)<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opennebula.org" target="_blank">Users@lists.opennebula.org</a><br>
<a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><br>
</blockquote></div><br></div>