With WITH_BHYVE_SNAPSHOT=yes in /etc/src.conf bhyve fails to build on arm64 with the following error: --- bhyverun.pieo --- In file included from /mnt/data/aarch64/freebsd-src/usr.sbin/bhyve/bhyverun.c:94: /mnt/data/aarch64/freebsd-src/usr.sbin/bhyve/snapshot.h:79:20: error: field has incomplete type 'enum snapshot_req' 79 | enum snapshot_req req; /* request type */ | ^ /mnt/data/aarch64/freebsd-src/usr.sbin/bhyve/snapshot.h:79:7: note: forward declaration of 'enum snapshot_req' 79 | enum snapshot_req req; /* request type */ | ^ --- all_subdir_lib --- --- atof.3.gz --- --- all_subdir_usr.sbin --- 1 error generated.
src.conf(5): WITH_BHYVE_SNAPSHOT Include support for save and restore (snapshots) in bhyve(8) and bhyvectl(8). This option only affects amd64/amd64. From your logs it looks like you are trying to compile on aarch64
(In reply to Simon Wollwage from comment #1) > This option only affects amd64/amd64. Does it mean it should fail buildworld like that on other arches? > From your logs it looks like you are trying to compile on aarch64 Yes, the bug title does mention that.
(In reply to Roman Bogorodskiy from comment #2) Not sure how that case should be handled. On aarch64, the header is empty. Should it provide an empty enum and empty stubs for the functions? If the feature isn't supported, it shouldn't build with the feature enabled. Otherwise it would be a misleading flag, wouldn't it? You can't enable snapshots and build it and then have no snapshot functionality. Not an opinion, just trying to troubleshoot.
We can make BHYVE_SNAPSHOT a BROKEN_OPTIONS in share/mk/src.opts.mk until this is resolved, which might help make the situation more clear. That said, we really need to add support for non-x86 archs.
Perhaps the FreeBSD Foundation can allocate resources to help review and potentially support the work being done here ... https://reviews.freebsd.org/D51555 It's my understanding that Hans Rosenfeld is attempting to backport a subset of patches from IllumOS to FreeBSD bhyve related to snapshot and migration support. The bhyve code in IllumOS has matured far past FreeBSD in this regard. His stated goals here are to reduce differences between the two platforms, mature the feature set and potentially make them interoperate ( ie. support migration between the IllumOS & FreeBSD ). The CPUID feature work referenced above is foundational to solving issues relate to the snapshot and migration features that IllumOS has already sorted. Unfortunately it seems that his work is stalled waiting on review. For more info, please see his presentation at bhyvecon 2025 ... https://www.youtube.com/watch?v=DPafGgfWaJU&list=PLkIW-zZY-vLHwsS6R87yDp9DDtvAF9tfN&index=10 The bhyve hypervisor tech really needs to be pushed forward. Not much runs on physical hardware these days. What does is mostly to support virtualized guest work. When very capable folks like Hans step up to do heavy lifting, I hate to see it die on the vine.
Sorry. I meant to share a link that jumped forward to his stated goals ... https://youtu.be/DPafGgfWaJU?si=hYxhKLXRQYgnnCKV&t=843
(In reply to mgrooms from comment #5) Hans' work is sponsored by the Foundation
Amazing news. Thank you.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=b01763b2b2ab2d87f7d3c6ae57783c731ce548dd commit b01763b2b2ab2d87f7d3c6ae57783c731ce548dd Author: Roman Bogorodskiy <novel@FreeBSD.org> AuthorDate: 2026-01-26 18:24:15 +0000 Commit: Roman Bogorodskiy <novel@FreeBSD.org> CommitDate: 2026-01-27 16:55:17 +0000 bhyve: make BHYVE_SNAPSHOT amd64-only Build fails with BHYVE_SNAPSHOT enabled on non-amd64, so add it to BROKEN_OPTIONS for these arches. PR: 292686 Reviewed by: emaste, markj MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54873 share/mk/src.opts.mk | 4 ++++ 1 file changed, 4 insertions(+)
A commit in branch stable/15 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=50b0a2002c15a9961e7ff78369dcb012dc52fcb1 commit 50b0a2002c15a9961e7ff78369dcb012dc52fcb1 Author: Roman Bogorodskiy <novel@FreeBSD.org> AuthorDate: 2026-01-26 18:24:15 +0000 Commit: Roman Bogorodskiy <novel@FreeBSD.org> CommitDate: 2026-01-31 11:56:12 +0000 bhyve: make BHYVE_SNAPSHOT amd64-only Build fails with BHYVE_SNAPSHOT enabled on non-amd64, so add it to BROKEN_OPTIONS for these arches. PR: 292686 Reviewed by: emaste, markj MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54873 (cherry picked from commit b01763b2b2ab2d87f7d3c6ae57783c731ce548dd) share/mk/src.opts.mk | 4 ++++ 1 file changed, 4 insertions(+)
A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=139f620c0c9056ddec81fce3738396b145bd69b7 commit 139f620c0c9056ddec81fce3738396b145bd69b7 Author: Roman Bogorodskiy <novel@FreeBSD.org> AuthorDate: 2026-01-26 18:24:15 +0000 Commit: Roman Bogorodskiy <novel@FreeBSD.org> CommitDate: 2026-01-31 13:24:33 +0000 bhyve: make BHYVE_SNAPSHOT amd64-only Build fails with BHYVE_SNAPSHOT enabled on non-amd64, so add it to BROKEN_OPTIONS for these arches. PR: 292686 Reviewed by: emaste, markj MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54873 (cherry picked from commit b01763b2b2ab2d87f7d3c6ae57783c731ce548dd) share/mk/src.opts.mk | 4 ++++ 1 file changed, 4 insertions(+)
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=bffa54b58cbfc41e0502b97065726dc3fbaea6c7 commit bffa54b58cbfc41e0502b97065726dc3fbaea6c7 Author: Roman Bogorodskiy <novel@FreeBSD.org> AuthorDate: 2026-01-26 18:24:15 +0000 Commit: Roman Bogorodskiy <novel@FreeBSD.org> CommitDate: 2026-01-31 15:43:55 +0000 bhyve: make BHYVE_SNAPSHOT amd64-only Build fails with BHYVE_SNAPSHOT enabled on non-amd64, so add it to BROKEN_OPTIONS for these arches. PR: 292686 Reviewed by: emaste, markj MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54873 (cherry picked from commit b01763b2b2ab2d87f7d3c6ae57783c731ce548dd) share/mk/src.opts.mk | 4 ++++ 1 file changed, 4 insertions(+)
Closing this one. I guess it'd make sense to track snapshot development for arm64 separately.