F #2771: add VM name on vCenter (#4084)

Signed-off-by: Carlos Herrera <cherrera@opennebula.systems>
This commit is contained in:
Carlos J. Herrera authored and Tino Vázquez committed 2020-01-13 11:44:46 +01:00
1 parent 337d92ea4f
commit e9e36427d9
1 file changed
+7
@@ -403,6 +403,12 @@ module VirtualMachineMonitor
vmware_tools = self['guest.toolsRunningStatus'].to_s
end
if @vm_info
vm_name = @vm_info['name'].to_s
else
vm_name = self['name'].to_s
end
if @vm_info
vmtools_ver = @vm_info['guest.toolsVersion'].to_s
else
@@ -453,6 +459,7 @@ module VirtualMachineMonitor
str_info << 'VCENTER_ESX_HOST="' << esx_host << '" '
str_info << 'VCENTER_GUEST_STATE=' << guest_state << ' '
str_info << 'VCENTER_VM_NAME=' << vm_name << ' '
str_info << 'VCENTER_VMWARETOOLS_RUNNING_STATUS=' << vmware_tools << ' '
str_info << 'VCENTER_VMWARETOOLS_VERSION=' << vmtools_ver << ' '
str_info << 'VCENTER_VMWARETOOLS_VERSION_STATUS=' \