History log of /freebsd/usr.sbin/bhyve/snapshot.c (Results 26 – 45 of 45)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# ed721684 23-Oct-2022 Mark Johnston <markj@FreeBSD.org>

bhyve: Address some signed/unsigned comparison warnings

MFC after: 1 week


# c9faf698 22-Oct-2022 Mark Johnston <markj@FreeBSD.org>

bhyve: Fix some warnings in the snapshot code

- Qualify unexported symbols with "static".
- Drop some unnecessary and incorrect casts.
- Avoid arithmetic on void pointers.
- Avoid signed/unsigned co

bhyve: Fix some warnings in the snapshot code

- Qualify unexported symbols with "static".
- Drop some unnecessary and incorrect casts.
- Avoid arithmetic on void pointers.
- Avoid signed/unsigned comparisons in loops which use nitems() as a
bound.

No functional change intended.

MFC after: 1 week

show more ...


# 63898728 22-Oct-2022 Mark Johnston <markj@FreeBSD.org>

bhyve: Avoid arithmetic on void pointers

No functional change intended.

MFC after: 1 week


# 98d920d9 08-Oct-2022 Mark Johnston <markj@FreeBSD.org>

bhyve: Annotate unused function parameters

MFC after: 1 week


Revision tags: release/13.1.0
# 690b7ea0 28-Apr-2022 Robert Wing <rew@FreeBSD.org>

bhyve/snapshot: ..back to SOCK_STREAM

Now that nvlist_send()/nvlist_recv() are being used, ditch the datagram
socket.

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D34863


# c79331a4 10-Apr-2022 Robert Wing <rew@FreeBSD.org>

bhyve: use linker set for ipc commands

Reviewed by: markj, jhb
Differential Revision: https://reviews.freebsd.org/D34760


# 3ebe1109 18-Mar-2022 Robert Wing <rew@FreeBSD.org>

bhyve: sweep MAX_VMNAME

MAX_VMNAME is no longer used.

Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D34292


# 961e6a12 18-Mar-2022 Robert Wing <rew@FreeBSD.org>

bhyve/snapshot: limit snapshot filename to NAME_MAX

NAME_MAX is a better fit since strcat_extension() constructs the
filename of the snapshot file.

Reviewed by: markj
Differential Revision: https:/

bhyve/snapshot: limit snapshot filename to NAME_MAX

NAME_MAX is a better fit since strcat_extension() constructs the
filename of the snapshot file.

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D34291

show more ...


# 3efc45f3 18-Mar-2022 Robert Wing <rew@FreeBSD.org>

libvmm: constify vm_get_name()

Allows callers of vm_get_name() to retrieve the vm name without having
to allocate a buffer.

While in the vicinity, do minor cleanup in vm_snapshot_basic_metadata().

libvmm: constify vm_get_name()

Allows callers of vm_get_name() to retrieve the vm name without having
to allocate a buffer.

While in the vicinity, do minor cleanup in vm_snapshot_basic_metadata().

Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D34290

show more ...


# 4379c1da 15-Feb-2022 Robert Wing <rew@FreeBSD.org>

bhyve/snapshot: use a string for cmd element in the nvlist

The nvlist for a checkpoint request will now look like:

{ cmd="checkpoint", suspend="true/false", filename="afilename" }

Reviewed by:

bhyve/snapshot: use a string for cmd element in the nvlist

The nvlist for a checkpoint request will now look like:

{ cmd="checkpoint", suspend="true/false", filename="afilename" }

Reviewed by: jhb
Suggested by: jhb
Differential Revision: https://reviews.freebsd.org/D34237

show more ...


# edfb339d 09-Feb-2022 Robert Wing <rew@FreeBSD.org>

bhyve/snapshot: switch to nvlist for snapshot requests

Switch to using an nvlist with nvlist_send()/nvlist_recv() to
communicate from bhyvectl(8) to bhyve(8).

The idea is that a bhyve process recei

bhyve/snapshot: switch to nvlist for snapshot requests

Switch to using an nvlist with nvlist_send()/nvlist_recv() to
communicate from bhyvectl(8) to bhyve(8).

The idea is that a bhyve process receives a command with with a set of
arguments. The nvlist here is structured to reflect that premise.

For example, to snapshot the vm, the expected nvlist looks like:

{ cmd=START_CHECKPOINT, filename="filename" }

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D33977

show more ...


# 51fbd894 19-Jan-2022 Robert Wing <rew@FreeBSD.org>

bhyve/snapshot: fix pthread_create() error check

pthread_create() returns 0 on success or an error number on failure.

Reviewed by: khng, markj
Differential Revision: https://reviews.freebsd.org/D33

bhyve/snapshot: fix pthread_create() error check

pthread_create() returns 0 on success or an error number on failure.

Reviewed by: khng, markj
Differential Revision: https://reviews.freebsd.org/D33930

show more ...


Revision tags: release/12.3.0
# fdbc86cf 15-May-2021 Robert Wing <rew@FreeBSD.org>

bhyve/snapshot: split up mutex/cond initialization from socket creation

Move initialization of the mutex/condition variables required by the
save/restore feature to their own function.

The unix dom

bhyve/snapshot: split up mutex/cond initialization from socket creation

Move initialization of the mutex/condition variables required by the
save/restore feature to their own function.

The unix domain socket that facilitates communication between bhyvectl
and bhyve doesn't rely on these variables in order to be functional.

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D30281

show more ...


Revision tags: release/13.0.0
# d4870e3a 03-Mar-2021 Robert Wing <rew@FreeBSD.org>

bhyve/snapshot: provide a way to send other messages/data to bhyve

This is a step towards sending messages (other than suspend/checkpoint)
from bhyvectl to bhyve.

Introduce a new struct, ipc_messag

bhyve/snapshot: provide a way to send other messages/data to bhyve

This is a step towards sending messages (other than suspend/checkpoint)
from bhyvectl to bhyve.

Introduce a new struct, ipc_message - this struct stores the type of
message and a union containing message specific structures for the type
of message being sent.

Reviewed by: grehan
Differential Revision: https://reviews.freebsd.org/D30221

show more ...


# 38dfb062 08-Mar-2021 Robert Wing <rew@FreeBSD.org>

bhyve/snapshot: use SOCK_DGRAM instead of SOCK_STREAM

The save/restore feature uses a unix domain socket to send messages
from bhyvectl(8) to a bhyve(8) process. A datagram socket will suffice
for t

bhyve/snapshot: use SOCK_DGRAM instead of SOCK_STREAM

The save/restore feature uses a unix domain socket to send messages
from bhyvectl(8) to a bhyve(8) process. A datagram socket will suffice
for this.

An added benefit of using a datagram socket is simplified code. For
bhyve, the listen/accept calls are dropped; and for bhyvectl, the
connect() call is dropped.

EPRINTLN handles raw mode for bhyve(8), use it to print error messages.

Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D28983

show more ...


# 5ce2d4a1 19-Feb-2021 Robert Wing <rew@FreeBSD.org>

bhyve/snapshot: drop mkdir when creating the unix domain socket

Add /var/run/bhyve/ to BSD.var.dist so we don't have to call mkdir when
creating the unix domain socket for a given bhyve vm.

The pat

bhyve/snapshot: drop mkdir when creating the unix domain socket

Add /var/run/bhyve/ to BSD.var.dist so we don't have to call mkdir when
creating the unix domain socket for a given bhyve vm.

The path to the unix domain socket for a bhyve vm will now be
/var/run/bhyve/vmname instead of /var/run/bhyve/checkpoint/vmname

Move BHYVE_RUN_DIR from snapshot.c to snapshot.h so it can be shared
to bhyvectl(8).

Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D28783

show more ...


# c4df8cbf 24-Dec-2020 Robert Wing <rew@FreeBSD.org>

Remove bvmconsole and bvmdebug.

Now that bhyve(8) supports UART, bvmconsole and bvmdebug are no longer needed.

This also removes the '-b' and '-g' flag from bhyve(8). These two flags were
marked de

Remove bvmconsole and bvmdebug.

Now that bhyve(8) supports UART, bvmconsole and bvmdebug are no longer needed.

This also removes the '-b' and '-g' flag from bhyve(8). These two flags were
marked deprecated in r368519.

Reviewed by: grehan, kevans
Approved by: kevans (mentor)
Differential Revision: https://reviews.freebsd.org/D27490

show more ...


# 1b9c7861 28-Nov-2020 John Baldwin <jhb@FreeBSD.org>

Suspend I/O on ahci-cd devices during a snapshot.

Submitted by: Vitaliy Gusev <gusev.vitaliy@gmail.com>


# bb481f67 28-Nov-2020 John Baldwin <jhb@FreeBSD.org>

bhyve: Add snapshot support for virtio-rnd.

This uses the same snapshot routine as other VirtIO devices.

Submitted by: Vitaliy Gusev <gusev.vitaliy@gmail.com>
Differential Revision: https://reviews

bhyve: Add snapshot support for virtio-rnd.

This uses the same snapshot routine as other VirtIO devices.

Submitted by: Vitaliy Gusev <gusev.vitaliy@gmail.com>
Differential Revision: https://reviews.freebsd.org/D26265

show more ...


Revision tags: release/12.2.0, release/11.4.0
# 483d953a 05-May-2020 John Baldwin <jhb@FreeBSD.org>

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 implement

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

show more ...


12