Download Simics User Guide for Unix
Transcript
7.1. Working with Images • If you used save-persistent-state, you can issue the load-persistent-state command just after starting the original configuration. This will add the new changes to the persistent storage media images and the machine will boot with the changes included. This is the recommended way of using a saved persistent state. For example, let us suppose that you saved some new files on the disk of the enterprise machine (started with the enterprise-common.simics script). You saved the persistent state of the machine after stopping it to the persistent state file newfiles-added. You can easily create a small script to start enterprise with the new files: # enterprise-new-files.simics run-command-file enterprise-common.simics load-persistent-state new-files-added • You can also load the original configuration and add the diff files manually to the images, using the himagei.add-diff-file command. • If you are building your own configurations (either as scripts or as checkpoints), you can add the diff files to the files attribute of the corresponding image object. This corresponds to what the himagei.add-diff-file command does. If you save several persistent states or image diff files that are dependent on each other, it may become cumbersome to take care of all these dependencies and to remember which files are important or not. You can merge the states or image diff files to create a new independent state: • If you are working with persistent states, you can use the checkpoint-merge utility to create a persistent state that is independent of all previous files, including the original images provided by Virtutech. This is the recommended way of creating a new independent image. You can load it as usual with the load-persistent-state command. • If you saved some image diff files manually, you can use the craff utility described below to merge the diff files yourself. 7.1.2 Reducing Memory Usage Due to Images Although images are divided into pages that are only loaded on request, Simics can run out of host memory if very big images are used, or if the footprint of the software running on the simulated system is bigger than the host memory. To prevent these kind of problems, Simics implements a global image memory limitation controlled by the set-memory-limit command. When the memory limit is reached, Simics will start swapping out pages to disk very much like an operating system would do. The set-memory-limit command let you specify the maximum amount of memory that can be used, and where swapping should occur. 71