bhyve implements suspend using the "bhyvectl --suspend" command and resuming using the "-r" flag for "bhyve". Even though this feature was there for quite a while, it is still not compiled in by default. Thus, it is important to check this capability.
Only check the "bhyvectl" part as it's safe to assume that the bhyve part check result will be the same. Signed-off-by: Roman Bogorodskiy <[email protected]> --- src/bhyve/bhyve_capabilities.c | 3 +++ src/bhyve/bhyve_capabilities.h | 1 + 2 files changed, 4 insertions(+) diff --git a/src/bhyve/bhyve_capabilities.c b/src/bhyve/bhyve_capabilities.c index 42da2a7c47..70c1c31260 100644 --- a/src/bhyve/bhyve_capabilities.c +++ b/src/bhyve/bhyve_capabilities.c @@ -425,6 +425,9 @@ bhyveProbeCapsBhyvectl(virBitmap *caps) if (strstr(help, "--get-vm-pid") != NULL) virBhyveCapsSet(caps, BHYVE_CAP_GET_VMPID); + if (strstr(help, "--suspend=") != NULL) + virBhyveCapsSet(caps, BHYVE_CAP_SUSPEND_RESUME); + return 0; } diff --git a/src/bhyve/bhyve_capabilities.h b/src/bhyve/bhyve_capabilities.h index 90e604c41b..25700c2e7c 100644 --- a/src/bhyve/bhyve_capabilities.h +++ b/src/bhyve/bhyve_capabilities.h @@ -62,6 +62,7 @@ typedef enum { BHYVE_CAP_MONITOR, BHYVE_CAP_GET_VMPID, BHYVE_CAP_LPC_TPM, + BHYVE_CAP_SUSPEND_RESUME, BHYVE_CAP_LAST, } virBhyveCapsFlags; -- 2.56.0
