From owner-svn-src-all@freebsd.org Tue May 5 15:44:36 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A171713A818; Tue, 5 May 2020 15:44:36 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 49GkYc1Y82z48mG; Tue, 5 May 2020 15:44:35 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id VzkFjVvnmYYpxVzkHjaWuk; Tue, 05 May 2020 09:44:34 -0600 X-Authority-Analysis: v=2.3 cv=OubUNx3t c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=sTwFKg_x9MkA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=KFYbhEvEi3z-stj11P0A:9 a=VU1E-WD-kY0SBYkw:21 a=MmK4iBbd0oKw5cNV:21 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 a=Z5ABNNGmrOfJ6cZ5bIyy:22 a=UDnyf2zBuKT2w-IlGP_r:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id 4F504172E; Tue, 5 May 2020 08:44:31 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id 045FiV8q049669; Tue, 5 May 2020 08:44:31 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id 045FiUHA049666; Tue, 5 May 2020 08:44:30 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202005051544.045FiUHA049666@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: John Baldwin cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: 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... In-reply-to: <202005050002.04502576094544@repo.freebsd.org> References: <202005050002.04502576094544@repo.freebsd.org> Comments: In-reply-to John Baldwin message dated "Tue, 05 May 2020 00:02:05 -0000." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 05 May 2020 08:44:30 -0700 X-CMAE-Envelope: MS4wfKr+WYzZnXkodgqn4KW2m7IxNvx5SzWdk+rb/USrIN0GgG0EfT6IowMhoimsLGjht8thoLiPXOBUvifKcuV8a3HJgr5WJv26xs6KBGCSObQDwkxsmtFX BE1d1einchmwbn4L3a0EX6I9Kyf6b1xPUwGzqZGHmGvqhXFGibJki/ZXcj9qZKKfgwDJTYcHiLN7iMCEZ87u4XaV0dnkzAZY0Zq/73MuDX7lgMKtanubpbLF PvGLEiF7vEonubAwWYe8rtnUVuELEhhVgXqLul/nvdriWapinB6NLTzv3zGM48ZS X-Rspamd-Queue-Id: 49GkYc1Y82z48mG X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 May 2020 15:44:36 -0000 In message <202005050002.04502576094544@repo.freebsd.org>, John Baldwin writes: > 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. > > Save and restore (also known as suspend and resume) permits a snapshot > to be taken of a guest's state that can later be resumed. In the > current implementation, bhyve(8) creates a UNIX domain socket that is > used by bhyvectl(8) to send a request to save a snapshot (and > optionally exit after the snapshot has been taken). A snapshot > currently consists of two files: the first holds a copy of guest RAM, > and the second file holds other guest state such as vCPU register > values and device model state. > > To resume a guest, bhyve(8) must be started with a matching pair of > command line arguments to instantiate the same set of device models as > well as a pointer to the saved snapshot. > > While the current implementation is useful for several uses cases, it > has a few limitations. The file format for saving the guest state is > tied to the ABI of internal bhyve structures and is not > self-describing (in that it does not communicate the set of device > models present in the system). In addition, the state saved for some > device models closely matches the internal data structures which might > prove a challenge for compatibility of snapshot files across a range > of bhyve versions. The file format also does not currently support > versioning of individual chunks of state. As a result, the current > file format is not a fixed binary format and future revisions to save > and restore will break binary compatiblity of snapshot files. The > goal is to move to a more flexible format that adds versioning, > etc. and at that point to commit to providing a reasonable level of > compatibility. As a result, the current implementation is not enabled > by default. It can be enabled via the WITH_BHYVE_SNAPSHOT=yes option > for userland builds, and the kernel option BHYVE_SHAPSHOT. > > Submitted by: Mihai Tiganus, Flavius Anton, Darius Mihai > Submitted by: Elena Mihailescu, Mihai Carabas, Sergiu Weisz > Relnotes: yes > Sponsored by: University Politehnica of Bucharest > Sponsored by: Matthew Grooms (student scholarships) > Sponsored by: iXsystems > Differential Revision: https://reviews.freebsd.org/D19495 Could also be the basis of a vmotion-like function. And possibly a hot-failover facility like VMware has. Vmotion and hot-failover require shared disk but we could use ZFS snapshots instead. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few.