xenserver / xe-guest-utilities

XenServer guest utilities for unix-like operating systems
BSD 2-Clause "Simplified" License
59 stars 58 forks source link

CP-41689 extend pm_freeze_timeout during migration #162

Closed LunfanZhang closed 2 months ago

LunfanZhang commented 3 months ago

Create a Xenstore watcher for control/process_suspend_status. When an event occurs, signal that the guest VM is going to suspend or migrate. After the suspend operation is complete(presume every time suspend is done, the guest agent will be restarted), reset /sys/power/pm_freeze_timeout to the default value. Additionally, ensure that after each guest agent restart or resume, the timeout is set back to the default value.

DeliZhangX commented 3 months ago

The code is not completely same to ticket DoD.

LunfanZhang commented 3 months ago

The code is not completely same to ticket DoD.

some detail of implementation is not totally matching the DoD of ticket due to the approach on the Dod is not actually work, like via sysctl -w will report error which because the pm_freeze_timeout is under /sys/power/ but not /proc/sys, so it is not under control of sysctl. the design on the ticket is just a draft. I will update the ticket with current design

LunfanZhang commented 3 months ago

I updated the xenstore entry from control/process_suspend_status to /control/suspend_initiate in another PR because I believe the latter more accurately represents our intention.