-
Notifications
You must be signed in to change notification settings - Fork 41
VEP 64: vm Hibernation #66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
|
||
| ## User Stories | ||
|
|
||
| A user exec `virtctl pmsuspendToDisk vm.name` commend, the vm stopped with memory state saved, exec `virtctl start vm.name` to start the stopped vm. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not virtctl suspend $VM_NAME with additional flags to suspend to disk etc?
Avoids leaking the fact that we are using libvirt underneath through our API/commands etc.
|
@mhenriks could you please take a look? |
|
I wonder what guarantees we would provide around this functionality? Also, have you considered a more gitops friendly approach? My main concern here is that hibernation can potentially indefinitelly block system operations, drain for example. Since hibernation can take a very long time in some cases. |
|
@mansam may have some thoughts on this I think the API should be gitops compatible (triggered by update to VM spec). Unlike pause, the VM will only get into this state via user request. A VM may get paused automatically by an I/O error for example. Also, unlike pause I see this as a VM only operation. The big question is where to write the VM state and how that's configured? Can look at memory dump volume for a pattern. But I know @ShellyKa13 may be proposing a more generic "utility" volume type for uses such as this |
Thank you! I also like the direction of a utility volume or the larger idea of a disks and memory snapshot. |
|
Hi, @vladikr @mhenriks Thanks for the discussion. Perhaps my question below is not very professional. When I mentioned this VEP, I only wanted to use the “dompmsuspend” interface. Is this interface not universal? From our previous discussion, it seems that we are discussing the use of the 'save' interface? |
Good question! Yes, I was assuming "save" and not "dompmsuspend target disk". Nice thing about 'dompmsuspend' is that it doesn't require any additional storage. But it does require the guest agent. The 'save' function will work for any VM. I think I'd be open to supporting dompmsuspend with disk target. But we may want to do both eventually. I think next step for this VEP is to design a declarative API (maybe just a new runstrategy) and map out the flow |
In my opinion, the timeout mechanism here is somewhat similar to hot migration. I think it is enough to set a default timeout and make this time user-configurable. |
|
Hi, @vladikr @mhenriks . I've updated the flow and interface design. The relevant process references dumpmemory and is just a rough outline. Since save and restore are a complete process, I've designed a lot of phases in vm HibernationStatuses.phase, while I'm not sure if this is appropriate.
|
Signed-off-by: zhuanlan <[email protected]>
06474a7 to
594aadc
Compare
VEP Metadata
Tracking issue: #64
SIG label: /sig/compute
What this PR does
This proposal introduces a VM hibernation mechanism for KubeVirt, enabling users to stop and start virtual machines by saving and restoring their running memory state.
Special notes for your reviewer