svn commit: r360648 - in head: lib/libvmmapi share/man/man5 share/mk sys/amd64/include sys/amd64/vmm sys/amd64/vmm/amd sys/amd64/vmm/intel sys/amd64/vmm/io sys/conf sys/modules/vmm tools/build/opti...

John Baldwin jhb at FreeBSD.org
Tue May 5 17:06:21 UTC 2020


On 5/4/20 5:02 PM, John Baldwin wrote:
> Author: jhb
> Date: Tue May  5 00:02:04 2020
> New Revision: 360648
> URL: https://svnweb.freebsd.org/changeset/base/360648
> 
> Log:
>   Initial support for bhyve save and restore.

This represents a lot of work by the folks at UPB.  I merely fixed a few
nits.  This does need further maturing, but it is easier to do that in
the tree at this point than to keep maintaining this patchset out-of-tree.

You can find instructions on using this and testing it here:

https://github.com/FreeBSD-UPB/freebsd/wiki/Save-and-Restore-a-virtual-machine-using-bhyve

Though you will want to build world with WITH_BHYVE_SNAPSHOT=yes and
add 'options BHYVE_SNAPSHOT' to your kernel config.

My own todo list of small cleanups is below, but a bigger issue is defining
a more flexible file format for snapshots that encodes the machine
configuration and is not as tied to internal ABIs of device models.  That
is quite a lift, but one that can be done somewhat incrementally I think.

My next set of cleanups:

- Remove int arg from VM_RESTORE_TIME ioctl
- Remove 'ctx' from vm_snapshot ioctl structure
- Add /var/run/bhyve to mtree, remove makedirs, remove checkpoint
  subdir
- block_if.c
  - Change blockif_flush_bc to return ioctl / fsync return value
  - Axe bc_paused_cond and just use bc_cond
  - Use pointer arith for idx in block_if.c
- snapshot.c
  - rewrite strcat_extension to use asprintf
  - review other bits of this file
- remove lseek from vm_mem_read_file?
- remove <sys/errno.h> from vmm_snapshot.h?
- fix to work with capsicum

-- 
John Baldwin


More information about the svn-src-head mailing list