You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As such (for reasons not clear to me), I have VMs on my Proxmox server that are not returning anything for QMPStatus, so IsRunning() always returns false despite the fact that the VMs are running.
Should this be checking for empty values before comparing QMPStatus? If so, I am willing to try to make a PR for that. I Just wanted to make sure I'm not misunderstanding what is happening before I attempt that.
Thanks!
The text was updated successfully, but these errors were encountered:
brandonllocke
changed the title
VirtualMachine.IsRunning and VirtualMachine.IsStopped rely on fields that VirtualMachine may not have
VirtualMachine.IsRunning and VirtualMachine.IsStopped unconditionally rely on fields that VirtualMachine may not have
Mar 30, 2024
I can't say much for certain as the documentation on what that value actually means is not very clear, but it does appear QMPStatus is optional, so it being required to determine if a VM is running/stopped/etc. feels like a bug. I'm open to being wrong.
Starting this issue with the full disclosure that I know enough Go and enough Proxmox to be dangerous, but not much more than that.
It seems that the
VirtualMachine
type is written in such a way that it is not necessarily expected to always get a value for QMPStatus:But the
VirtualMachine.IsRunning()
andVirtualMachine.IsStopped()
functions (and likely others) essentially require QMPStatus to be set to work.As such (for reasons not clear to me), I have VMs on my Proxmox server that are not returning anything for QMPStatus, so
IsRunning()
always returnsfalse
despite the fact that the VMs are running.Should this be checking for empty values before comparing QMPStatus? If so, I am willing to try to make a PR for that. I Just wanted to make sure I'm not misunderstanding what is happening before I attempt that.
Thanks!
The text was updated successfully, but these errors were encountered: