apache / cloudstack

Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform
https://cloudstack.apache.org/
Apache License 2.0
2.1k stars 1.11k forks source link

VM State Not Updating in CloudStack After Shutdown on KVM Hypervisor in Version 4.19.1.1 #9593

Closed Bart-vanDongen closed 2 months ago

Bart-vanDongen commented 2 months ago
ISSUE TYPE
COMPONENT NAME
KVM / Agent
CLOUDSTACK VERSION
4.19.1.1
CONFIGURATION
KVM Hypervisor
OS / ENVIRONMENT
N/A
SUMMARY

In Apache CloudStack version 4.19.1.1, the state of a VM does not update in the CloudStack UI when the VM is shut down directly on the KVM hypervisor using virsh. The state remains "Running" even after the VM has been shut down. This issue does not occur in version 4.19.0.2, where the VM state is correctly updated.

STEPS TO REPRODUCE
1. Start a VM instance using the Apache CloudStack UI.
2. On the hypervisor, execute `virsh shutdown <instance>` to shut down the VM directly.
3. Wait a few minutes and check the VM state in the Apache CloudStack UI.
EXPECTED RESULTS
The VM state in the CloudStack UI should update to "Stopped" after the VM is shut down on the hypervisor.
ACTUAL RESULTS
In version 4.19.1.1, the VM state remains "Running" in the CloudStack UI even though the VM has been shut down on the hypervisor.
boring-cyborg[bot] commented 2 months ago

Thanks for opening your first issue here! Be sure to follow the issue template!

DaanHoogland commented 2 months ago

@Bart-vanDongen I just tried a 4.19.1 version to test your scenario, but the VM was marked as stopped quite quickly. It could take about 3 minutes with my settings but it was withing half a minute. In the UI I did have to press refresh to see it but internally there was no delay.

Bart-vanDongen commented 2 months ago

I tested in a didn't environment and this was indeed still working. After restarting management servers this issue was resolved on the existing environment.