freebsd · virtualization · homelab · proxmox
FreeBSD bhyve gets live migration, as an RFC
A working bhyve live migration RFC for FreeBSD 15.1: how pre-copy works, what is missing, and how it stacks up against Proxmox and KVM.

A working live migration for bhyve, the FreeBSD hypervisor, was published on November 13 as a work in progress RFC. The author, who writes as gyptazy, shows a running amd64 guest moving between two FreeBSD 15.1 hosts over TCP, paused only for the final copy. It is not part of FreeBSD, the code is not public yet, and the post lists seven blockers before upstreaming can even be evaluated. Still, it is the most concrete progress on this in years, and the Hacker News thread picked it up fast.
I spend most of my days in Proxmox, so my question was simple: how far is this from what KVM users take for granted?
What live migration actually does
A VM is disk, memory, and CPU and device state. The disk often sits on shared storage and does not move. The hard part is memory, because the guest keeps writing to it while you copy.
The usual answer is pre-copy. Send all guest memory while the VM runs, then send only the pages that changed since, and repeat while the rounds shrink. When little is left, pause the guest, send the last dirty pages plus CPU and device state, and resume on the other host. If the pause is short, TCP sessions survive.
The Proxmox docs describe QEMU doing exactly this: memory goes over in passes until the difference "is small enough to be sent in a few milliseconds", and the target takes over "in well under a second".
How the bhyve prototype works
According to the RFC post, the new code builds on the experimental snapshot support in bhyve (the BHYVE_SNAPSHOT option) and adds two pieces: dirty page tracking in the vmm kernel module, and a migration protocol in bhyve and bhyvectl.
The flow, as described:
- The source sends populated guest memory, then keeps fetching a bitmap of pages changed since the previous scan and sends only those.
- When the remaining dirty set fits a configured downtime target, stops shrinking, or hits a round limit, bhyve pauses the guest and its devices.
- It sends the final dirty pages plus the existing snapshot state for vCPUs, kernel state and emulated devices.
- The destination checks protocol version, page size, memory layout and vCPU count, restores everything and reports it is ready.
- Only then does the source send
GO, the commit point. BeforeGO, a failure lets the source resume the guest. WithoutGO, the destination never starts it.
There is also a warm mode, plain stop and copy, kept as fallback and baseline. One detail I liked: bhyvectl opens the migration socket and hands it to bhyve, so bhyve can stay inside its Capsicum sandbox.
The numbers are modest and honest. On a two host test bed, a slowly dirtying 512 MiB guest saw roughly 138 to 171 ms of downtime. A guest that dirties memory fast may never converge in pre-copy; it then falls back to stop and copy with a longer pause, but still finishes correctly. The author calls these "encouraging engineering results, not a production support promise". Testing covered memory rewrite workloads checked for stale pages, fsync heavy disk writes verified after a cold reboot, and a target disappearing mid migration.
The limits, from the author's own list
Scope today: amd64 only, experimental snapshot code required, snapshot capable emulated devices only, no PCI passthrough. The test bed mostly ran a single vCPU guest.
Before upstreaming can be evaluated, the post says, the kernel dirty log must be shown never to lose a write, with a reviewable locking argument. A real compatibility contract is needed, since matching RAM and vCPU count is not enough: CPU capabilities, snapshot format versions, device topology and shared storage identity all need checks. The TCP transport has no authentication and no encryption. Device restore must not cause visible side effects before commit. Storage and network handoff (tap, bridge, MAC and IP movement) need a definition. And it needs in tree automated tests and a split into reviewable patches.
That last point has history. In June 2023, Elena Mihailescu, from a team at University Politehnica of Bucharest, posted a warm and live migration implementation to the freebsd-virtualization list. Same pre-copy idea, same shape on the command line (bhyve -R on the receiver, bhyvectl --migrate on the sender). Their first patches went up in 2021, and the feedback was that they were "too big to be reviewed", so they were split into smaller ones. In an October 2024 post, gyptazy wrote that this line of work had reached about 14 GB of guest RAM according to AsiaBSDCon 2023 material, still had memory corruption issues, and that it had "become very quiet around this topic". The new RFC does not say whether it reuses that code.
As for the code: the post says it will be published on git.gyptazy.com and on GitHub and that some people already have access. When I checked both links on November 14, they returned 404. For now there is the write up and a demo video, nothing to run.
Next to Proxmox and KVM
What a Proxmox user already has, per the official docs, next to the RFC:
- Storage. Proxmox can live migrate a VM with local disks by sending the disks to the target. The bhyve work assumes shared storage.
- Transport. Proxmox has a migration type setting:
securesends guest RAM over an encrypted channel,insecureis faster and sends it in the clear, and the docs strongly recommend secure unless you control the network. The bhyve prototype is plain TCP for now. - Passthrough. Same limit on both sides. Proxmox says passed through PCI or USB devices block live migration; the RFC says PCI passthrough is not migratable yet.
- Compatibility. Proxmox asks for the same CPU architecture, same or newer packages on the target, and CPUs from the same vendor with similar capabilities. The RFC checks the basics and lists the rest as open work.
- Orchestration. On Proxmox it is
qm migrate <vmid> <target> --onlineor a button. For bhyve the author points to Sylve, a BSD licensed web UI for bhyve, jails and ZFS which the post says aims to be a Proxmox-like platform, and to the author's free VPS service BoxyBSD, where the missing feature is "a current show stopper".
The best HN subthread started when someone pointed to Oxide's Propolis, which has worked on live migration with bhyve. A commenter who said they were the original Propolis architect and did much of the bhyve port to illumos replied that illumos "soft-forked" the kernel VMM, partly because FreeBSD's save and restore exposed too many emulation internals for their taste. So the bhyve family has tackled this before, outside FreeBSD and with a different design.
What I would do with this
If you run production VMs and need to patch hosts without downtime, nothing changes for you this year. Stay on Proxmox or whatever KVM stack you trust. The prototype has no encryption or authentication, was tested mostly with one vCPU, and has no public code. If you run FreeBSD in a homelab, once the repo is up it is worth two spare boxes and a weekend, because the author is asking operators to break it. For a small team, live migration on Proxmox is boring, and boring is what you want when a host needs a reboot. If you are on Proxmox already, we wrote about Mia, our Proxmox dashboard that ships as one binary. I would like a credible BSD option for clusters, and this RFC is the most honest step toward one in years.
Cover photo: Carl Lender, CC BY 2.0, via Wikimedia Commons.
Join the builders
New projects, the code behind them and what broke on the way. One e-mail when there is something worth opening.
We send a link to confirm. Leave anytime with one click. Never sold or shared. How we handle it
Keep reading
Mia: a Proxmox dashboard that installs with one command
Why our Proxmox dashboard ships as one Go binary, has no accounts of its own, never runs as root, and installs apps in a terminal you can read.
A false alarm nearly flooded a Jane Street datacenter
Construction dust tripped a smoke alarm, the cooling shut off and the sprinklers armed. What it teaches about single points of failure.
Why I stopped renting my movies
Five streaming subscriptions replaced by one 2013 office PC running Plex. Better picture, lossless audio, and a catalog that never disappears.
Comments
No comments yet. Start the conversation.
Sign in with Google to comment
Signing in keeps out bots and spam. Only your Google name and photo appear next to what you write; your e-mail is never shown.