8.2 Logging and Tracing 8.4 Snapshots (in-memory)
Getting Started  /  8 Tutorials  / 

8.3 Checkpoints (on-disk)

The Intel Simics simulator allows saving the simulation state to disk, thus, the state of all target machines for later use. We call a saved state a checkpoint. Other simulators may refer to a saved state as a snapshot. In Simics a snapshot is also a saved state, but this only exists in-memory during a simulator session.

In this section:

Creating a checkpoint:

  1. launch the simulator and load the qsp-x86/firststeps target:

    simics> load-target qsp-x86/firststeps
    
  2. run the simulation until Linux is booted:

    simics> run
    

  3. stop simulation:

    running> stop
    simics>
    
  4. create a checkpoint by running the write-configuration CLI command and specifying a destination where to store a checkpoint:

    simics> write-configuration target-booted.ckpt
    
  5. quit the simulator:

    simics> quit
    

The target-booted.ckpt directory created on step 5 above contains saved simulation state.

Restoring from a checkpoint:

  1. launch the simulator

  2. restore the checkpoint state with the following command:

    simics> read-configuration target-booted.ckpt
    

  3. the simulation state from the target-booted.ckpt checkpoint has now been restored. We can see a text terminal window of the target machine with Linux prompt. We can resume simulation with the run command:

    simics> run
    running>
    

Useful information about checkpoints can be found in the documentation of the write-configuration and read-configuration commands (the documentation can be obtained from the CLI by running the help command like this: help write-configuration).

8.2 Logging and Tracing 8.4 Snapshots (in-memory)