From nobody Tue May 02 15:38:15 2023 X-Original-To: freebsd-virtualization@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9kk82gNjz495rq; Tue, 2 May 2023 15:38:08 +0000 (UTC) (envelope-from rob.fx907@gmail.com) Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9kk73lkfz4HFB; Tue, 2 May 2023 15:38:07 +0000 (UTC) (envelope-from rob.fx907@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20221208 header.b=HgATklFY; spf=pass (mx1.freebsd.org: domain of rob.fx907@gmail.com designates 2a00:1450:4864:20::534 as permitted sender) smtp.mailfrom=rob.fx907@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-504d149839bso826512a12.1; Tue, 02 May 2023 08:38:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683041886; x=1685633886; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=errR5P0dAWMC6MBSES4ce2BPg3tEKzLkevUy/ewpve8=; b=HgATklFY731IyqEuM6nnqsL7XrIQec9by8fB6fMto4i8CZp6B8Vh7lW3EYXu8HqkAA roc04CL0pl6KdryWIsH5gDnOGwrcFt4pApYKEGmsKOGYyEXUFYLwY0upgyCzLa8ke6+/ vbf0tZ+H41aV1shzQ5E42ltVQZspHK5izp3eRnZ9eTPHToutqSNYR2jsAcJmW6WeK9um HMemv51B6VDC5lBdJjooONx46y2wzmSB2vmwlSh+y32Tbm3M3CIccAvXMuUlf+3oG2fY 8HKbcgbDG+3Wx6PlLJXhnkFkHnGeSoq6670sXvw4NZJ2BgzjPODbCnDwxonztQJTPOHh L4Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683041886; x=1685633886; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=errR5P0dAWMC6MBSES4ce2BPg3tEKzLkevUy/ewpve8=; b=Lra+FUjfruB19cQNp7etQoWmvpAP1BWBk636ge0UqKiXE6e9sAMfdqAIKrIDdd1+q3 RpnPbfrx1zqkPGEKvjxr3/7cpb7nHnFQX5dRfoe9JBJaXc7F+H/+rFvb6IFbXWJy0hIp qCQ5y/ha6AIOPW3kLT4YLk+ZGEIS5Xobj1b1c31D2d3E+yEJutRcYD1dwhVwTcYrvgdi ELpNP5X5qb1hJ5qhOmMonU8IAgoMfrksSRhiugjIHf2lvLpmwNusrdv1cPOSAMJQ86hB z5ZLVSKJINje7Z3IYZByry8LRUShu+kKyy60WYTDXu/zZENkrnhjOUJaeaXHojUefht/ TY6Q== X-Gm-Message-State: AC+VfDwC6NjqVyHFQeg2P5iRLnhxkTXHhtZLiWPTWudLkM6MH566kkIV fF9scA/uq/onXo98464qtRDYemjnKlQkenyJr4gQOgDNgyc= X-Google-Smtp-Source: ACHHUZ7vLi5nj6s+ZRe+hwO2SBVskbyMbKh/VNjgmUpyBWYkyWpFXx21oJg896p71yaIrj+ZptldzoiTGE1VtDcWW2w= X-Received: by 2002:a17:906:7a49:b0:95f:db5f:73b7 with SMTP id i9-20020a1709067a4900b0095fdb5f73b7mr2775421ejo.0.1683041886032; Tue, 02 May 2023 08:38:06 -0700 (PDT) List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org MIME-Version: 1.0 References: <89c84bd7-a925-02f4-acbe-12c3000e7007@shrew.net> <3ab4e6d94fb0153fb6ff4a53ac6f53b2eaae0cf7.camel@FreeBSD.org> In-Reply-To: From: Rob Wing Date: Tue, 2 May 2023 07:38:15 -0800 Message-ID: Subject: Re: BHYVE_SNAPSHOT To: Vitaliy Gusev Cc: =?UTF-8?Q?Corvin_K=C3=B6hne?= , Matthew Grooms , freebsd-hackers@freebsd.org, freebsd-virtualization@freebsd.org, Elena Mihailescu , Mihai Carabas Content-Type: multipart/alternative; boundary="000000000000c258dc05fab7b9bf" X-Spamd-Result: default: False [0.12 / 15.00]; SUSPICIOUS_RECIPS(1.50)[]; SUBJ_ALL_CAPS(1.05)[14]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_SPAM_SHORT(0.57)[0.568]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20221208]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TAGGED_RCPT(0.00)[]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org,freebsd-virtualization@freebsd.org]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::534:from]; ARC_NA(0.00)[]; TAGGED_FROM(0.00)[]; FREEMAIL_CC(0.00)[freebsd.org,shrew.net,gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_SEVEN(0.00)[7]; MID_RHS_MATCH_FROMTLD(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TO_DN_SOME(0.00)[] X-Rspamd-Queue-Id: 4Q9kk73lkfz4HFB X-Spamd-Bar: / X-ThisMailContainsUnwantedMimeParts: N --000000000000c258dc05fab7b9bf Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, May 2, 2023 at 3:00=E2=80=AFAM Vitaliy Gusev wrote: > Just add some plans for me: > > 1. Describe snapshot file format: One file for snapshot. > > 2. Implement snapshot/resume via nvlist. > > *nvlist* implementation brings: > > > - Versioning > - Easy debugging, getting saved values, etc. > - Validate restored variables: types, sized, etc. > - Add optional variables without breaking backward compatibility > (resume can be performed with old snapshots) > - Remove variables without breaking backward compatibility > - Use one file for snapshot > - Improve restore command line: "bhyve -r $snapshot=E2=80=9D, i.e. w/= o > additional arguments > > Do you plan on saving the guest memory into the nvlist? If I have VM with 8 gigs of memory, will the nvlist implementation allocate 8 gigs of memory for the nvlist then write it out to disk? Or..? All the bullet points look good to me. -Rob --000000000000c258dc05fab7b9bf Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, May 2, 2023 at 3:00=E2=80=AFA= M Vitaliy Gusev <gusev.vitali= y@gmail.com> wrote:
Just add some plans for me:

=C2=A01. Des= cribe snapshot file format: One file for snapshot.

=C2=A02. Implement snapshot/resume via nvlist.

= =C2=A0 =C2=A0nvlist implementation brings:

=
  • Versioning
  • Easy debugging, getting saved values, etc.
  • <= li>Validate restored variables: types, sized, etc.
  • Add optional var= iables without breaking backward compatibility (resume can be performed wit= h old snapshots)
  • Remove variables without breaking backward compati= bility
  • Use one file for snapshot
  • Improve restore command li= ne: =C2=A0"bhyve -r $snapshot=E2=80=9D, i.e. w/o additional arguments<= /li>

Do you plan on saving= the guest memory into the nvlist? If I have VM with 8 gigs of memory, will= the nvlist implementation allocate 8 gigs of memory for the nvlist then wr= ite it out to disk? Or..?

All the bullet points lo= ok good to me.

-Rob
--000000000000c258dc05fab7b9bf--