VMware: support for VM diagnostics

Registered by Gary Kotton

VM diagnostics will be returned. An example is:

nicira@os-devstack:~$ nova diagnostics B
+------------------------------+-----------------------------------------------------------------------------------------------+
| Property | Value |
+------------------------------+-----------------------------------------------------------------------------------------------+
| ftSecondaryLatency | -1 |
| suspendInterval | 0 |
| numCpu | 1 |
| distributedMemoryEntitlement | 266 |
| connectionState | connected |
| maxCpuUsage | 2000 |
| overallCpuUsage | 0 |
| overallCpuDemand | 0 |
| swappedMemory | 0 |
| ftLogBandwidth | -1 |
| numVirtualDisks | 1 |
| guestFullName | Other (32-bit) |
| memoryReservation | 0 |
| privateMemory | 121 |
| instanceUuid | 503881f9-2836-b00c-fdb9-367faebe8065 |
| uuid | 42388213-94b3-e7fe-c18a-b2ca24f80c7e |
| numEthernetCards | 1 |
| memoryOverhead | 21417984 |
| memorySizeMB | 512 |
| balloonedMemory | 0 |
| template | False |
| ssdSwappedMemory | 0 |
| staticMemoryEntitlement | 552 |
| compressedMemory | 0 |
| uptimeSeconds | 211605 |
| consolidationNeeded | False |
| installBootRequired | False |
| host | [[u'value', u'host-207'], [u'_type', u'HostSystem']] |
| bootTime | 2013-10-09T23:19:19.367654 |
| guestMemoryUsage | 5 |
| guestId | otherGuest |
| toolsInstallerMounted | False |
| cpuReservation | 0 |
| recordReplayState | inactive |
| annotation | None |
| consumedOverheadMemory | 20 |
| guestHeartbeatStatus | gray |
| numMksConnections | 0 |
| powerState | poweredOn |
| name | c0f2d3a6-7d6a-4551-9a3c-cee0120dbe81 |
| ftLatencyStatus | gray |
| staticCpuEntitlement | 2000 |
| vmPathName | [nfs-instances] c0f2d3a6-7d6a-4551-9a3c-cee0120dbe81/c0f2d3a6-7d6a-4551-9a3c-cee0120dbe81.vmx |
| faultToleranceState | notConfigured
| onlineStandby | False |
| maxMemoryUsage | 512 |
| distributedCpuEntitlement | 0 |
| sharedMemory | 0 |
| hostMemoryUsage | 141 |
+------------------------------+-----------------------------------------------------------------------------------------------+

Blueprint information

Status:
Complete
Approver:
Russell Bryant
Priority:
Low
Drafter:
Gary Kotton
Direction:
Approved
Assignee:
Gary Kotton
Definition:
Approved
Series goal:
Accepted for icehouse
Implementation:
Implemented
Milestone target:
milestone icon 2014.1
Started by
Gary Kotton
Completed by
Thierry Carrez

Related branches

Sprints

Whiteboard

I will add the namespace to the report (we will need to update other drivers with this too). Regarding the bug I agree that we should have a formal definition for common parameters that need to be reported by all of the drivers. I think that that requires discussion on the mail list and someone needs to drive it. I do not think that it should be a blocking issue here as the diagnostics is something that can help an admin address and trouble shoot problems. -- gary

I think this is far enough along to approve the blueprint. John, I like your feedback about namespacing, though. --russellb

How does this interact with the following bug:
https://bugs.launchpad.net/nova/+bug/1240043
I would rather we started deciding on an API before we add more, and at least add a namespace for stuff we know if VMware specific -- johnthetubaguy

Where can openstack docs folks go to get information about what will be included, and what it means? --russellb

The information above will be returned when a diagnostics command is invoked for a VM. This is a combination of information that is gathered from the various vSphere API's for a VirtualMachine (http://pubs.vmware.com/vsphere-51/index.jsp#com.vmware.wssdk.apiref.doc/vim.VirtualMachine.html#field_detail).
More specifically we make use of the summary data that is returned: http://pubs.vmware.com/vsphere-51/index.jsp#com.vmware.wssdk.apiref.doc/vim.vm.Summary.html
In particular:
config - virtual machine configuration summary (http://pubs.vmware.com/vsphere-51/index.jsp?topic=%2Fcom.vmware.wssdk.apiref.doc%2Fvim.vm.Summary.ConfigSummary.html)This provides the characteristics of the VM. cpus, ram etc.
QuickStats - real time statistics for the virtual machine (http://pubs.vmware.com/vsphere-51/index.jsp?topic=%2Fcom.vmware.wssdk.apiref.doc%2Fvim.vm.Summary.QuickStats.html), for example used memory etc.
runtime info - (http://pubs.vmware.com/vsphere-51/index.jsp?topic=%2Fcom.vmware.wssdk.apiref.doc%2Fvim.vm.RuntimeInfo.html) information about the execution state of the VM

The above will be combined to provide a diagnostics data for the VM.

Gerrit topic: https://review.openstack.org/#q,topic:bp/vmware-vm-diagnostics,n,z

Addressed by: https://review.openstack.org/51404
    VMware: add support for VM diagnostics

Addressed by: https://review.openstack.org/50761
    Fix vmwareapi driver get_diagnostics calls

Gerrit topic: https://review.openstack.org/#q,topic:utils-func,n,z

Note to ttx: If https://review.openstack.org/#/c/51404/ makes it through the gate tonight, this will be complete for icehouse-1

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.