wxt9861 / esxi_stats

ESXi component for Home Assistant
MIT License
145 stars 40 forks source link

"VM UUID not found" no matter what combinations are tried #95

Open EpicLPer opened 7 months ago

EpicLPer commented 7 months ago

Describe the bug The integration always throws a "VM UUID not found" error no matter what UUID combination I try.

To Reproduce Steps to reproduce the behavior:

  1. Enable SSH
  2. Start VM on the host
  3. Run esxcli vm process list or get UUID from .vmx file
  4. Try the given UUID with or without spaces, same error always occurs (as example: 52 xx 92 xx f0 xx 60 07-d2 xx 58 af xx xx 81 f1 or 52xx92xxf0xx6007-d2xx58afxxxx81f1)

Expected behavior VM should react to service calls accordingly.

Screenshots X

ESXi environment (please complete the following information):

Additional context The Readme does not state how to get the VM UUID properly and still mentions to use the old, now defunct VM Name instead.

Shogun1978 commented 7 months ago

I got the same error message "UUID not found", but in another issue post I found the solution:

https://github.com/wxt9861/esxi_stats/issues/41

You need the VM name, not the UUID, and all in lower case. I had lower/upper case mix which worked well till last week. Then I did an upgrade on Home Assistant and ESXi-stats and it stopped working.

Maybe this solves you issue.

swvw commented 7 months ago

Changed the names of the VM's to only lower case. and the names in the home assistant config.

and the automation started working again 👍

Shogun1978 commented 7 months ago

Great to hear that :-)

wxt9861 commented 7 months ago

The case and spacing in VM is what I was trying to fix by using UUID. UUID is being pulled by the component, so user should not have to do anything, however I think the way vCenter and ESXi host asigns UUIDs to VM is different which might be the issue here.

Either way, there is a new attribute in the latest release which capture the VM name as it is in vCenter/Host so I will likely rework it again to use the attribute instead of UUID.