wiki:UserGuide/Omf/SaveImage

Saving Disk Images

OMF Save

Once you have the image prepared the way you want it. On the node run:

console:~$ ssh root@sdr2-lg1.sb1.cosmos-lab.org
root@sdr-console: ./prepare.sh

This will remove udev rules (to prevent renaming of interfaces) and dump log files to lower the size of the image. It also shutdown the node.

Once the node has been shutdown, to save the existing disk image running on the node, use the omf save command on the console:

console:~$ omf save -n sdr2-lg1.sb1.cosmos-lab.org

The output of this image saving process will look like the following:

INFO NodeHandler: OMF Experiment Controller 5.4 (git c005675)
INFO NodeHandler: Slice ID: pxe_slice 
INFO NodeHandler: Experiment ID: pxe_slice-2013-02-06t14.14.46-05.00
INFO NodeHandler: Message authentication is disabled
INFO Experiment: load system:exp:stdlib
INFO property.resetDelay: resetDelay = 230 (Fixnum)
INFO property.resetTries: resetTries = 1 (Fixnum)
INFO Experiment: load system:exp:eventlib
INFO Experiment: load system:exp:saveNode
INFO property.node: node = "node1-1.sb1.orbit-lab.org" (String)
INFO property.pxe: pxe = "1.1.6" (String)
INFO property.domain: domain = "grid.orbit-lab.org" (String)
INFO property.started: started = "false" (String)
INFO property.image: image = nil (NilClass)
INFO property.resize: resize = nil (NilClass)
WARN exp: Saving only works for ext2/ext3 partitions and MBR (msdos) partition tables. Saving any other filesystem or partition table type will produce a 0 byte image.
INFO Topology: Loading topology 'node1-1.sb1.orbit-lab.org'.
INFO Experiment: Resetting resources
INFO stdlib: Waiting for nodes (Up/Down/Total): 0/1/1 - (still down: node1-1.sb1.orbit-lab.org) [0 sec.]
.
.
.
INFO stdlib: Waiting for nodes (Up/Down/Total): 0/1/1 - (still down: node1-1.sb1.orbit-lab.org) [80 sec.]
INFO ALL_UP: Event triggered. Starting the associated tasks.
INFO node1-1.sb1.orbit-lab.org:  
INFO node1-1.sb1.orbit-lab.org: - Saving image of '/dev/sda' on node 'node1-1.sb1.orbit-lab.org'
INFO node1-1.sb1.orbit-lab.org:   to the file 'bob-node-node1-1.sb1.orbit-lab.org-2013-02-06-14-16-23.ndz' on host '10.10.0.42'
INFO node1-1.sb1.orbit-lab.org:  
INFO property.started: started = "true" (String)
INFO exp:  
INFO exp: - Saving process started at: Wed Feb 06 14:16:27 -0500 2013
INFO exp:   (this may take a while depending on the size of your image)
INFO Experiment: DONE!
INFO ExecApp: Application 'commServer' finished
INFO run: Experiment sb1_2008_07_20_23_38_04 finished after 9:19
done.

Please make sure that the process ends without errors.

If there are no errors, at the end of the saving process, you will have disk image file with the name:

bob-node-sdr2-lg1.sb1.cosmos-lab.org-2013-02-06-14-16-23.ndz

in the directory

/export/omf/omf-images

This directory is available on each console, as well as the machine with the host name "frisbee". This information is printed in the output shown above.

You can then reload this disk image on a node (or nodes) using the omf load command.

Working with the saved image

Images are treated as standard linux files. That means that you can:

  • check that they have a nonzero size ls -al imagename
  • Rename them mv imagename imagenewname
  • Delete them rm imagename
  • set permissions chmod 600 filename
  • set user and group chown username:groupname filename

When you use OMF load, the -i flag refers to a file name in this directory. It obeys linux file permissions, so if you want to keep other people from loading your image, ensure that it doesn't allow group or everyone read permissions.

Last modified 5 years ago Last modified on May 20, 2020, 12:36:10 AM
Note: See TracWiki for help on using the wiki.