Skip to content
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

feat(vm): support auto pause and resume vm #10

Merged
merged 1 commit into from
Oct 27, 2023

Conversation

BlackHole1
Copy link
Member

@BlackHole1 BlackHole1 commented Oct 27, 2023

In macOS system, if the computer goes into sleep mode, the virtual machine kernel will crash after 30 ~ 40 minutes, and the issue is related to the CPU clock. To avoid this problem, we need to pause the virtual machine when the system goes to sleep, and resume the virtual machine when the system wakes up.

Although vfkit provides the --timesync interface, unfortunately, the virtual machine relies on qemu-ga and can only sync the virtual machine time, unable to solve the issue of kernel crashes.

Deps:

TODO:

  • After the virtual machine is awakened, we need to set the time of the virtual machine and restart the ntp or chrony service of the virtual machine. (See: time sync #6)

https://oomol.atlassian.net/browse/OOM-820

@BlackHole1 BlackHole1 merged commit 7a3aec6 into oomol-lab:main Oct 27, 2023
@BlackHole1 BlackHole1 deleted the support-vm-pause branch October 27, 2023 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant