pub fn restore_from_snapshot(
    instance_info: &InstanceInfo,
    event_manager: &mut EventManager,
    seccomp_filters: &BpfThreadMap,
    params: &LoadSnapshotParams,
    version_map: VersionMap,
) -> std::result::Result<Arc<Mutex<Vmm>>, LoadSnapshotError> {
    use self::LoadSnapshotError::*;
    let track_dirty_pages = params.enable_diff_snapshots;
    let microvm_state = snapshot_state_from_file(&params.snapshot_path, version_map)?;

    // Some sanity checks before building the microvm.
    snapshot_state_sanity_check(&microvm_state)?;

    let guest_memory = guest_memory_from_file(
        &params.mem_file_path,
        &microvm_state.memory_state,
        track_dirty_pages,
    )?;
    builder::build_microvm_from_snapshot(
        instance_info,
        event_manager,
        microvm_state,
        guest_memory,
        track_dirty_pages,
        seccomp_filters,
    )
    .map_err(BuildMicroVm)
}
/// Loads a Microvm snapshot producing a 'paused' Microvm.
Loads a Microvm snapshot producing a 'paused' Microvm.
Loads a Microvm snapshot producing a ' paused ' Microvm .
pub fn restore_from_snapshot(
    instance_info: &InstanceInfo,
    event_manager: &mut EventManager,
    seccomp_filters: &BpfThreadMap,
    params: &LoadSnapshotParams,
    version_map: VersionMap,
) -> std::result::Result<Arc<Mutex<Vmm>>, LoadSnapshotError> {
    use self::LoadSnapshotError::*;
    let track_dirty_pages = params.enable_diff_snapshots;
    let microvm_state = snapshot_state_from_file(&params.snapshot_path, version_map)?;
    // Some sanity checks before building the microvm.
    snapshot_state_sanity_check(&microvm_state)?;
    let guest_memory = guest_memory_from_file(
        &params.mem_file_path,
        &microvm_state.memory_state,
        track_dirty_pages,
    )?;
    builder::build_microvm_from_snapshot(
        instance_info,
        event_manager,
        microvm_state,
        guest_memory,
        track_dirty_pages,
        seccomp_filters,
    )
    .map_err(BuildMicroVm)
}
pub fn restore_from_snapshot ( instance_info : & InstanceInfo , event_manager : & mut EventManager , seccomp_filters : & BpfThreadMap , params : & LoadSnapshotParams , version_map : VersionMap , ) -> std :: result :: Result < Arc < Mutex < Vmm > > , LoadSnapshotError > { use self :: LoadSnapshotError :: * ; let track_dirty_pages = params . enable_diff_snapshots ; let microvm_state = snapshot_state_from_file ( & params . snapshot_path , version_map ) ? ; // Some sanity checks before building the microvm. snapshot_state_sanity_check ( & microvm_state ) ? ; let guest_memory = guest_memory_from_file ( & params . mem_file_path , & microvm_state . memory_state , track_dirty_pages , ) ? ; builder :: build_microvm_from_snapshot ( instance_info , event_manager , microvm_state , guest_memory , track_dirty_pages , seccomp_filters , ) . map_err ( BuildMicroVm ) }
Loads a Microvm snapshot producing a 'paused' Microvm.
Loads a Microvm snapshot producing a ' paused ' Microvm .
instance_info
&InstanceInfo
event_manager
&mut EventManager
seccomp_filters
&BpfThreadMap
params
&LoadSnapshotParams
version_map
VersionMap
instance_info
&InstanceInfo
event_manager
&mut EventManager
seccomp_filters
&BpfThreadMap
params
&LoadSnapshotParams
version_map
VersionMap