[one-users] VM LCM status not reported correclty when VM is stopped using VMware Infrastructure Client

Tino Vazquez tinova at fdi.ucm.es
Fri Sep 11 02:37:11 PDT 2009


Hi there,

I did some changes in the code to handle states taking into account
the external state changes you mentioned.

To use it, please replace lines 609-621 in
src/vmm_mad/vmware/OneVmmVmware.java  from

---8<---
                             String vmCPUMhz =

gPVM.getObjectProperty("summary.quickStats.overallCpuUsage").toString();

                             String vmMEMMb  =

gPVM.getObjectProperty("summary.quickStats.guestMemoryUsage").toString();

                             gPVM.disconnect();

                             int hostCPUMhz_i =
Integer.parseInt(hostCPUMhz);
                             int vmCPUMhz_i   =
Integer.parseInt(vmCPUMhz);
                             int vmCPUperc    = (vmCPUMhz_i /
hostCPUMhz_i) * 100;

                             pollInfo = "STATE=a USEDMEMORY=" +
vmMEMMb + " USEDCPU=" + vmCPUperc;
-->8----

to

----8<-----
                             String powerState =

gPVM.getObjectProperty("runtime.powerState").toString();

                             if (powerState.equals("poweredOn"))
                            {

                                 String vmCPUMhz =

gPVM.getObjectProperty("summary.quickStats.overallCpuUsage").toString();

                                 String vmMEMMb  =

gPVM.getObjectProperty("summary.quickStats.guestMemoryUsage").toString();

                                 gPVM.disconnect();

                                 int hostCPUMhz_i =
Integer.parseInt(hostCPUMhz);
                                 int vmCPUMhz_i   =
Integer.parseInt(vmCPUMhz);
                                 int vmCPUperc    = (vmCPUMhz_i /
hostCPUMhz_i) * 100;

                                 pollInfo = "STATE=a USEDMEMORY=" +
vmMEMMb + " USEDCPU=" + vmCPUperc;
                             }
                             else
                             {
                                 if (powerState.equals("suspended"))
                                 {
                                     pollInfo = "STATE=p";
                                 }
                                 else // Machine poweredOff
                                 {
                                     pollInfo = "STATE=d";
                                 }
                             }
--->8------

Please let me know if this works for you and I will include it in the
trunk so it will be available in the release of the stable 1.4
version.

Best regards, and thanks for the feedback,

-Tino

--
Constantino Vázquez, Grid Technology Engineer/Researcher:
http://www.dsa-research.org/tinova
DSA Research Group: http://dsa-research.org
Globus GridWay Metascheduler: http://www.GridWay.org
OpenNebula Virtual Infrastructure Engine: http://www.OpenNebula.org



On Thu, Sep 10, 2009 at 4:03 PM,  <senthil.rajasekaran at wipro.com> wrote:
> Hi,
> We are creating VM in VMWare exsi hypervisor using ovevm create command. VM
> is ceated successfully.
> We have used VMWare Infrastructure client to power down the created VM, but
> the opennebula monitoring scheduler does not
> refresh VM status from runn(RUNNING) to shut (SHUTDOWN).
>
> Please Note:  We are not able to see the trace message called "Monitoring VM
> <vmid>" in oned.log file. We are able to see monitoring trace message only
> for host monitoring.
>
> In oned.conf following lines are present.
> HOST_MONITORING_INTERVAL = 60
> VM_POLLING_INTERVAL      = 60
>
> Please let us know how to enable VM monitoring if VM state is changed
> externally using VMWare Infrastructure client.
>
> Thanks ad Regards,
> Senthil Kumaran R
>
>
> Please do not print this email unless it is absolutely necessary.
>
> The information contained in this electronic message and any attachments to
> this message are intended for the exclusive use of the addressee(s) and may
> contain proprietary, confidential or privileged information. If you are not
> the intended recipient, you should not disseminate, distribute or copy this
> e-mail. Please notify the sender immediately and destroy all copies of this
> message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient should
> check this email and any attachments for the presence of viruses. The
> company accepts no liability for any damage caused by any virus transmitted
> by this email.
>
> www.wipro.com
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>



More information about the Users mailing list