If just one other bad state is detectd, the VM ... Installed,running,but not managed by VMWare. messages are outputted as well and may confuse the user.
For example:
WARNING: 21 VMs checked for VMWare Tools state, 0 are not OK.
1 Installed,running and current.
1 Installed,running,version is not current
19 Installed,running,but not managed by VMWare
VM ... Installed,running,but not managed by VMWare.
VM ... Installed,running,but not managed by VMWare.
VM ... Installed,running,but not managed by VMWare.
VM ... Installed,running,but not managed by VMWare.
VM ... Installed,running,but not managed by VMWare.
VM ... Installed,running,but not managed by VMWare.
VM ... Installed,running,but not managed by VMWare.
VM ... Installed,running,but not managed by VMWare.
VM ... Installed,running,but not managed by VMWare.
VM ... Installed,running,but not managed by VMWare.
VM ...Installed,running,but not managed by VMWare.
VM ... Installed,running,version is not current.
VM ... Installed,running,but not managed by VMWare.
The bad state, which is causing the issue is VM ... Installed,running,version is not current.
If just one other bad state is detectd, the VM ... Installed,running,but not managed by VMWare. messages are outputted as well and may confuse the user.
For example:
The bad state, which is causing the issue is
VM ... Installed,running,version is not current.
Problem could be solved here: https://github.com/BaldMansMojo/check_vmware_esx/blob/37d222ec9a2b662eeb41fe1ae1cce49d0db6dac1/modules/dc_runtime_info.pm#L511
By changing the code as follows: