<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-IE link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Hello mailing list,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I built a small application that uses the OCCI and EC2 interface to automatically start and delete Virtual Machines in my private OpenNebula cloud. Each VM runs a service that reports how busy a certain VM actually is. Using this service, my application creates and deletes VMs depending on the overall load of the cluster.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Now, my problem is that I always want to delete the VM with the lowest load, but the application does not know the VM to which a particular service belongs. Therefore, I need to know the VM ID, which has been assigned automatically by OpenNebula, from inside a running VM. Then, each service could also report the VM ID to my application so that it can delete the right VM.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Is there a way to query this VM ID from inside the VM? Or can I configure OpenNebula to automatically store the VM ID in, for example, a text file inside a VM when it creates the VM? It would also help if the application could query an IP-to-VM ID mapping from OpenNebula, if such a mapping exists for VMs that are created with bridged DHCP network access.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Many thanks for your help in advance,<o:p></o:p></p><p class=MsoNormal>Thorsten Papenbrock<o:p></o:p></p></div></body></html>