weizhouapache opened a new issue, #13261: URL: https://github.com/apache/cloudstack/issues/13261
### problem the power_state is not update immediately when vm is stopped, which cause an issue when change offering of ROOT volume on VMware. resizing volume works well. Steps to reproduce the issue: - create a vm and start it on VMware ``` mysql> select id,name,uuid,state,power_state,power_state_update_time,host_id,last_host_id from vm_instance where id=7; +----+----------+--------------------------------------+---------+-------------+-------------------------+---------+--------------+ | id | name | uuid | state | power_state | power_state_update_time | host_id | last_host_id | +----+----------+--------------------------------------+---------+-------------+-------------------------+---------+--------------+ | 7 | test-wei | 07618433-1617-4ca6-869a-b8abbe4a3db6 | Running | PowerOn | 2026-05-27 07:28:43 | 1 | 1 | +----+----------+--------------------------------------+---------+-------------+-------------------------+---------+--------------+ 1 row in set (0.00 sec) ``` - stop the vm, the state is updated, but power_state is still `PowerOn` ``` mysql> select id,name,uuid,state,power_state,power_state_update_time,host_id,last_host_id from vm_instance where id=7; +----+----------+--------------------------------------+----------+-------------+-------------------------+---------+--------------+ | id | name | uuid | state | power_state | power_state_update_time | host_id | last_host_id | +----+----------+--------------------------------------+----------+-------------+-------------------------+---------+--------------+ | 7 | test-wei | 07618433-1617-4ca6-869a-b8abbe4a3db6 | Stopping | PowerOn | 2026-05-27 07:28:43 | 1 | 1 | +----+----------+--------------------------------------+----------+-------------+-------------------------+---------+--------------+ 1 row in set (0.00 sec) mysql> select id,name,uuid,state,power_state,power_state_update_time,host_id,last_host_id from vm_instance where id=7; +----+----------+--------------------------------------+---------+-------------+-------------------------+---------+--------------+ | id | name | uuid | state | power_state | power_state_update_time | host_id | last_host_id | +----+----------+--------------------------------------+---------+-------------+-------------------------+---------+--------------+ | 7 | test-wei | 07618433-1617-4ca6-869a-b8abbe4a3db6 | Stopped | PowerOn | 2026-05-27 07:28:43 | NULL | 1 | +----+----------+--------------------------------------+---------+-------------+-------------------------+---------+--------------+ 1 row in set (0.00 sec) ``` - change the disk offering of the ROOT volume got an exception <img width="751" height="211" alt="Image" src="https://github.com/user-attachments/assets/c55d9e1a-936a-43db-beaf-b77f98ed7c98" /> - retry when the power_state is updated to `PowerOff`, it worked ``` mysql> select id,name,uuid,state,power_state,power_state_update_time,host_id,last_host_id,update_time from vm_instance where id=7; +----+----------+--------------------------------------+---------+-------------+-------------------------+---------+--------------+---------------------+ | id | name | uuid | state | power_state | power_state_update_time | host_id | last_host_id | update_time | +----+----------+--------------------------------------+---------+-------------+-------------------------+---------+--------------+---------------------+ | 7 | test-wei | 07618433-1617-4ca6-869a-b8abbe4a3db6 | Stopped | PowerOff | 2026-05-27 11:24:43 | NULL | 1 | 2026-05-27 11:24:12 | +----+----------+--------------------------------------+---------+-------------+-------------------------+---------+--------------+---------------------+ 1 row in set (0.00 sec) ``` ### versions ACS 4.22.0.0 VMware 8 it should impact other versions too ### The steps to reproduce the bug 1. 2. 3. ... ### What to do about it? _No response_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
