wxt9861/esxi_stats

Backwards compatibility to VM Names instead of just UUIDs (or list UUID in entity attributes)

EpicLPer opened this issue · 8 comments

Is your feature request related to a problem? Please describe.
As of 0.7.0 service calls now require the UUID of a VM instead of just the VM name. This breaks existing scripts/automations.

Describe the solution you'd like
Instead of only allowing UUIDs it could be detected (as example by Regex) if the given string is either a UUID or just a simple name, which the script then handles accordingly. In addition to this a service call error could be adjusted in form of "Neither UUID nor VM Name were found".

Describe alternatives you've considered
Getting the UUID is not easy to get and requires SSH access to the given host.

Additional context
Alternatively the integration could get the UUID from a VM and display it as an entity attribute to make this step easier.

Yes, this breaks my automations as well . thankfully i had a snapshot to revert to.
why only the UUID? vm name is much easier in my opinion.

Are you using vCenter or direct connection to host?

I use a direct connection. I did see that one of the two vm's "hassdb" did make a snapshot . and that the vm without a snapshot and the error is called Home Assistant with capitals.

Can you please run diagnostics and post snippet of the output here?

You can go to Settings > Devices & Services > ESXi Stats > Click on the device > Click on Download Diagnostics

You don't need to post the entire file, just the part with the data from the VM that's having issues

I think this is only possible with the latest version?

Yes 0.7x can do diagnostics

i tried to rename the machine from Home Assistant to home assistant.
Unfortunately this didn't help

"home_assistant": {
"name": "home_assistant",
"vm_name": "home assistant",
"status": "green",
"state": "running",
"uptime_hours": 96.5,
"cpu_count": 2,
"cpu_use_pct": 9.42,
"memory_allocated_mb": 5140,
"memory_used_mb": 5164,
"memory_active_mb": 2313,
"used_space_gb": 77.54,
"tools_status": "toolsOk",
"guest_os": "Other 2.6.x Linux (64-bit)",
"guest_ip": "192.168.20.200",
"snapshots": 4,
"uuid": "564d8cf0-cc6f-b5ad-fc8a-efa2726b7a30",
"host_name": "localhost.fritz.box"

for some reason my update to the latess home assistant version killed the esxi integration. I updated and found out that using the name instead of vm_name solved it for me. So home_assistant for me.