How to save a disk image from a resource¶
1. Prerequisites¶
- Make sure that you understand how OMF works from a user's point of view.
- Make sure that you have an access to an OMF testbed and you have reserved resources on it (if required)
- have a look at the "Hello World" tutorial for additional information
- This tutorial assumes that you are using either a NICTA testbed or a WINLAB testbed
2. Saving an image¶
- OMF allows you to save a full disk image from the hard-drive of a given resources
- The disk image to save can then be loaded onto other resources using the OMF disk image loading capability
- Here we assume that you have reserved the resources
omf.nicta.node8on the main NICTA testbed, that you have made some changes on its disk, and that you want to save its full disk image. To do that you should use the command:
omf-5.3 save -n omf.nicta.node8
- You should then see an output from the OMF Experiment Controller (EC) similar to this:
1 INFO NodeHandler: OMF Experiment Controller 5.3.642
2 INFO NodeHandler: Slice ID: pxe_slice
3 INFO NodeHandler: Experiment ID: pxe_slice-2010-09-22t13.32.36+10.00
4 INFO NodeHandler: Message authentication is disabled
5 INFO NodeHandler: Web interface available at: http://10.0.0.200:4000
6 INFO Experiment: load system:exp:stdlib
7 INFO property.resetDelay: value = 210 (Fixnum)
8 INFO property.resetTries: value = 1 (Fixnum)
9 INFO Experiment: load system:exp:eventlib
10 INFO Experiment: load system:exp:saveNode
11 INFO property.node: value = "omf.nicta.node8" (String)
12 INFO property.pxe: value = "1.1.6" (String)
13 INFO property.domain: value = "" (String)
14 INFO property.started: value = "false" (String)
15 INFO Topology: Loading topology 'omf.nicta.node8'.
16 INFO Reset flag is set - Resetting the resources:
17 INFO stdlib: Waiting for nodes (Up/Down/Total): 0/1/1 - (still down: omf.nicta.node8)
18 INFO stdlib: Waiting for nodes (Up/Down/Total): 0/1/1 - (still down: omf.nicta.node8)
19 INFO stdlib: Waiting for nodes (Up/Down/Total): 0/1/1 - (still down: omf.nicta.node8)
20 INFO ALL_UP: Event triggered. Starting the associated tasks.
21 INFO omf.nicta.node8:
22 INFO omf.nicta.node8: - Saving image of '/dev/sda' on node 'omf.nicta.node8'
23 INFO omf.nicta.node8: to the file 'thierry-node-omf.nicta.node8-2010-09-22-13-37-23.ndz' on host '10.0.0.200'
24 INFO omf.nicta.node8:
25 INFO property.started: value = "true" (String)
26 INFO exp:
27 INFO exp: - Saving process started at: Wed Sep 22 13:37:31 +1000 2010
28 INFO exp: (this may take a while depending on the size of your image)
29 INFO exp: - Saving disk image of 'omf.nicta.node8' finished with success.
30 INFO exp: - Saving process completed at: Wed Sep 22 13:40:11 +1000 2010
31 INFO exp:
32 INFO EXPERIMENT_DONE: Event triggered. Starting the associated tasks.
33 INFO NodeHandler:
34 INFO NodeHandler: Shutting down experiment, please wait...
35 INFO NodeHandler:
36 INFO NodeHandler: Shutdown flag is set - Turning Off the resources
37 INFO run: Experiment pxe_slice-2010-09-22t13.32.36+10.00 finished after 7:45
- Most part of such EC output has been described in the basic "Hello World" tutorial
- Line 17-19: the EC informs us that it is waiting for the resource
omf.nicta.node8to check-in with it- the output
(Up/Down/Total): 0/1/1tells us that there is 1 resources in total, and 1 of them have not checked-in yet (= down) - the EC will wait for all resources to check-in for a default duration of 210 sec.
- this default duration is set in the
resetDelayproperty has displayed on line 7 - when this delay expires the EC will reset (= reboot) the unresponsive resource and try again 1 time to wait for it to check-in
- this default retry of 1 is set in the
resetTriesproperty has displayed on line 8
- the output
- Line 21-31: the resource has checked-in:
- the image on its disk
/dev/sdais now being saved (line 22) - the image will have the name
yourname-node-omf.nicta.node8-2010-09-22-13-37-23.ndz(line 23)
- the image on its disk
- Note:
- disk images are saved into a directory of the server machine running the OMF Aggregate Manager SaveImage service
- the OMF disk image loading function will automatically look for previously saved image in that same directory on that same server
- For OMF 5.3. this image directory is
/var/lib/omf-images-5.3. This information is given in the Installation Guide of a particular OMF version
3. Man page of the save command:¶
$ omf-5.3 help save
Save a disk image from a given node into an archive file
Usage:
omf-5.3 save -n NODE [-h] [-c AGGREGATE]
With:
-h, --help print this help message
-n, --node NODE a valid description of a single node
(no default here, you have to enter a node!)
Some Examples:
omf-5.3 save -n omf.nicta.node1
omf-5.3 save -n omf.nicta.node3 -c grid
4. What is Next?¶
Now that you know how to save a disk image, you may want to read the following basic OMF tutorials. Each one of them is introducing an OMF feature, using the simple "Hello World" experiment as a base. You do not need to follow them in the order suggested below.
And finally, a "Conference Room" scenario which combines all of the above features: