Add DevPreview logging in snapshot load/create
@@ -33,8 +33,8 @@ use crate::vmm_config::snapshot::{CreateSnapshotParams, LoadSnapshotParams, Snap
use crate::vmm_config::vsock::{VsockConfigError, VsockDeviceConfig};
use crate::vmm_config::{self, RateLimiterUpdate};
use crate::FcExitCode;
-use crate::{builder::StartMicrovmError, warn, EventManager};
-use logger::{error, info, update_metric_with_elapsed_time, METRICS};
+use crate::{builder::StartMicrovmError, EventManager};
+use logger::{error, info, update_metric_with_elapsed_time, warn, DEV_PREVIEW_LOG_PREFIX, METRICS};
use mmds::data_store::{self, Mmds};
use seccompiler::BpfThreadMap;
#[cfg(test)]
@@ -514,6 +514,11 @@ impl<'a> PrebootApiController<'a> {
// On success, this command will end the pre-boot stage and this controller
// will be replaced by a runtime controller.
fn load_snapshot(&mut self, load_params: &LoadSnapshotParams) -> ActionResult {
+ warn!(
+ "{} {}",
+ DEV_PREVIEW_LOG_PREFIX, "Restoring snapshots is currently in development preview."
+ );
+
let load_start_us = utils::time::get_time_us(utils::time::ClockType::Monotonic);
if self.boot_path {
@@ -555,7 +560,10 @@ impl<'a> PrebootApiController<'a> {
let elapsed_time_us =
update_metric_with_elapsed_time(&METRICS.latencies_us.vmm_load_snapshot, load_start_us);
- info!("'load snapshot' VMM action took {} us.", elapsed_time_us);
+ info!(
+ "{} 'load snapshot' VMM action took {} us.",
+ DEV_PREVIEW_LOG_PREFIX, elapsed_time_us
+ );
result
}
@@ -708,6 +716,11 @@ impl RuntimeApiController {
}
fn create_snapshot(&mut self, create_params: &CreateSnapshotParams) -> ActionResult {
+ warn!(
+ "{} {}",
+ DEV_PREVIEW_LOG_PREFIX, "Creating snapshots is currently in development preview."
+ );
+
if create_params.snapshot_type == SnapshotType::Diff
&& !self.vm_resources.track_dirty_pages()
{
