Page MenuHomeFreeBSD

Live Migration feature for bhyve [Part 1]
Needs ReviewPublic

Authored by mihaiburcea15_gmail.com on Mar 31 2022, 6:57 AM.
Tags
Referenced Files
Unknown Object (File)
Mon, Oct 28, 8:29 AM
Unknown Object (File)
Sat, Oct 12, 2:50 AM
Unknown Object (File)
Thu, Oct 10, 3:27 AM
Unknown Object (File)
Oct 4 2024, 8:55 PM
Unknown Object (File)
Oct 2 2024, 8:15 PM
Unknown Object (File)
Oct 2 2024, 3:20 AM
Unknown Object (File)
Oct 1 2024, 11:57 PM
Unknown Object (File)
Sep 29 2024, 11:27 PM

Details

Reviewers
corvink
Group Reviewers
bhyve
Summary

These 2 tickets represent an implementation for the live migration feature https://reviews.freebsd.org/D30954, as specified in the first ticket.

This feature sends the guest's memory while it is still running. To do this, it uses migration rounds. In the first round, all the memory is sent over. In subsequent rounds, because the guest is still running and its memory can be modified anytime, only the modified pages since the last round are sent over in order to update the destination's memory. Currently, it uses a fixed number of rounds, 4 (this may be changed in the future). After these rounds finish, the source guest is stopped and the remaining modified memory pages are sent over, alongside the kernel structures' and emulated devices' states. Once this is completed, the guest can be resumed at the destination.

For detecting the pages that were modified between rounds, we use a flag (VPO_VMM_DIRTY) for each vm_page. This flag is set each time vm_page->dirty field is updated but can only be reset when the page is migrated.

The features transfers only through IPv4. The migration procedure works only between identical workstations.

More information regarding the implementation can be found here:

The usage of the feature is detailed here: Virtual Machine Migration using bhyve.

This first part adds the VPO_VMM_DIRTY bit and related functions in the virtual memory system, as well as an ioctl to search for such dirty pages.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

mihaiburcea15_gmail.com retitled this revision from Live Migration feature for bhyve [Part 5] to Live Migration feature for bhyve [Part 1].
mihaiburcea15_gmail.com added a child revision: Restricted Differential Revision.Mar 31 2022, 6:59 AM
mihaiburcea15_gmail.com removed a child revision: Restricted Differential Revision.Apr 6 2022, 4:31 PM
elenamihailescu22_gmail.com changed the visibility from "All Users" to "Public (No Login Required)".Apr 1 2023, 5:00 AM