Index: lib/libvmmapi/vmmapi.h =================================================================== --- lib/libvmmapi/vmmapi.h +++ lib/libvmmapi/vmmapi.h @@ -255,19 +255,6 @@ /* * Save and restore */ - -#define MAX_SNAPSHOT_VMNAME 100 - -enum checkpoint_opcodes { - START_CHECKPOINT = 0, - START_SUSPEND = 1, -}; - -struct checkpoint_op { - unsigned int op; - char snapshot_filename[MAX_SNAPSHOT_VMNAME]; -}; - int vm_snapshot_req(struct vm_snapshot_meta *meta); int vm_restore_time(struct vmctx *ctx); Index: usr.sbin/bhyve/snapshot.h =================================================================== --- usr.sbin/bhyve/snapshot.h +++ usr.sbin/bhyve/snapshot.h @@ -42,6 +42,8 @@ #include #include +#define MAX_SNAPSHOT_VMNAME 100 + struct vmctx; struct restore_state { @@ -57,6 +59,16 @@ ucl_object_t *meta_root_obj; }; +enum checkpoint_opcodes { + START_CHECKPOINT = 0, + START_SUSPEND = 1, +}; + +struct checkpoint_op { + unsigned int op; + char snapshot_filename[MAX_SNAPSHOT_VMNAME]; +}; + struct checkpoint_thread_info { struct vmctx *ctx; int socket_fd; Index: usr.sbin/bhyvectl/Makefile =================================================================== --- usr.sbin/bhyvectl/Makefile +++ usr.sbin/bhyvectl/Makefile @@ -18,6 +18,14 @@ .if ${MK_BHYVE_SNAPSHOT} != "no" CFLAGS+= -DBHYVE_SNAPSHOT + +# usr.sbin/bhyve/snapshot.h needs ucl header +CFLAGS+= -I${SRCTOP}/contrib/libucl/include + +BHYVE= ${.CURDIR:H}/bhyve +CFLAGS+= -I${BHYVE} + +.PATH: ${BHYVE} .endif .include Index: usr.sbin/bhyvectl/bhyvectl.c =================================================================== --- usr.sbin/bhyvectl/bhyvectl.c +++ usr.sbin/bhyvectl/bhyvectl.c @@ -63,6 +63,10 @@ #include "amd/vmcb.h" #include "intel/vmcs.h" +#ifdef BHYVE_SNAPSHOT +#include "snapshot.h" +#endif + #define MB (1UL << 20) #define GB (1UL << 30)