<br>Hi Carlos,<br><br>Thanks for the inputs. I don't think there will any problems with the current behavior. Is there any way I can get the Host Name for the Host on which a Virtual Machine is currently running ( given the Virtual Machine ID ) ? <br>
<br>The following is the XML output returned by <a href="http://vm.info">vm.info</a>().getMessage() for a particular VM whose ID is 23. I don't see Host information listed anywhere except in the HISTORY section.<br><br>
If the VM is running, can the value of vm.xpath("/VM/HISTORY/HOSTNAME") be considered as the Host Name of Host the VM is currently running on ?<br><br><VM><br> <ID>23</ID><br> <UID>0</UID><br>
<NAME>ReactOS</NAME><br> <LAST_POLL>0</LAST_POLL><br> <STATE>3</STATE><br> <LCM_STATE>3</LCM_STATE><br> <STIME>1272620457</STIME><br> <ETIME>0</ETIME><br>
<DEPLOY_ID>one-23</DEPLOY_ID><br> <MEMORY>0</MEMORY><br> <CPU>0</CPU><br> <NET_TX>0</NET_TX><br> <NET_RX>0</NET_RX><br> <TEMPLATE><br> <CPU>1</CPU><br>
<DISK><br> <CLONE>no</CLONE><br> <SOURCE>/mnt/onenfs/ReactOS-LiveCD.iso</SOURCE><br> <TARGET>hdb</TARGET><br> <TYPE>cdrom</TYPE><br>
</DISK><br> <GRAPHICS><br> <LISTEN>127.0.0.1</LISTEN><br> <PORT>5</PORT><br> <TYPE>vnc</TYPE><br> </GRAPHICS><br>
<MEMORY>100</MEMORY><br> <NAME>ReactOS</NAME><br> <OS><br> <BOOT>cdrom</BOOT><br> </OS><br> <VMID>23</VMID><br> </TEMPLATE><br>
<HISTORY><br> <SEQ>0</SEQ><br> <HOSTNAME>localhost</HOSTNAME><br> <HID>4</HID><br> <STIME>1272620486</STIME><br> <ETIME>0</ETIME><br>
<PSTIME>1272620486</PSTIME><br> <PETIME>1272620486</PETIME><br> <RSTIME>1272620486</RSTIME><br> <RETIME>0</RETIME><br> <ESTIME>0</ESTIME><br>
<EETIME>0</EETIME><br> <REASON>0</REASON><br> </HISTORY><br></VM><br><br><br>
<br><div class="gmail_quote">2010/4/30 Carlos Martín Sánchez <span dir="ltr"><<a href="mailto:cmartins@fdi.ucm.es" target="_blank">cmartins@fdi.ucm.es</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Shashank, I'm copying your email to the list (I guess you meant to send it here):<br><br><br><div class="gmail_quote"><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi<br><br>Thanks for guiding me through the examples. I will go through them to gain a better understanding. Consider the following code where I am able to fetch information w.r.t Virtual Machines providing invalid user name and password.<br>
<br> Client oneClient = new Client("someuser:password","<a href="http://localhost:2633/RPC2" target="_blank">http://localhost:2633/RPC2</a>");<br> int vmID = 2;<br><br> VirtualMachine vm = new VirtualMachine(vmID,oneClient);<div>
<br>
<a href="http://vm.info" target="_blank">vm.info</a>();<br> System.out.println(vm.getName());<br></div> System.out.println(vm.stateStr());<br><br>The output of the above code is:<br>ReactOS<br>
DONE<br><br>Please note that there is only one valid user with name shashank as shown below.<br>
<br>Also, I have noticed that operations which tend to change the state of cloud entity objects are not allowed with these invalid credentials. Only operations which involve fetching state information are allowed. Is this a desired behavior ?<br>
<br>root@shashank:/# oneuser list<br> ID USER PASSWORD ENABLE<br> 0 shashank 8b832b62abf2bd5180f6a225e4b99cac1392ea10 True<br>root@shashank:/# onehost list<br>
ID NAME RVM TCPU FCPU ACPU TMEM FMEM STAT<br> 4 localhost 1 200 78 78 1801900 1256364 on<br>root@shashank:/# onevm list<br> ID USER NAME STAT CPU MEM HOSTNAME TIME<br>
3 shashank ReactOS runn 0 524288 localhost 00 00:07:59<br>root@shashank:/# <br><br></blockquote></div><div><br><br>Yes, right now this is how OpenNebula works. The xml-rpc server side, in the ONE core, allows information request for some pools without checking who is asking.<br>
If you need to change this behaviour for some reason, let us know and we'll help you to narrow down the c++ methods you have to modify.<br><br>Regards,<br><font color="#888888">Carlos.</font><div><br><br clear="all">
Carlos Martín, Cloud Technology Engineer/Researcher<br>
DSA
Research Group: web <a href="http://dsa-research.org" target="_blank">http://dsa-research.org</a> and blog
<a href="http://blog.dsa-research.org" target="_blank">http://blog.dsa-research.org</a><br>OpenNebula Open Source Toolkit for Cloud
Computing: <a href="http://www.OpenNebula.org" target="_blank">http://www.OpenNebula.org</a><br></div></div></div>
<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>
<br></blockquote></div><br><br clear="all"><br>-- <br>Regards,<br>Shashank Rachamalla<br>