Capturing, Importing, and Moving Images#

You can modify the files on a booted compute node and use the cw-modimg --capture command to capture those changes into the node image. You can capture the node into an existing image or into a new image. See Supported Distributions and Features for a list of distributions that can be used as images.

  1. Confirm that the node being captured is idle to reduce the chance of capturing an image in some intermediate state.

  2. Capture the compute node image:

    cw-modimg --capture <node> --set-name <image name>
    

    Where <node> is the name of a node and <image name> is the name of either an existing image or a name for a new image. For example, to capture node n0, run the following command:

    cw-modimg --capture n0 --set-name NewImage
    

    This process may take several minutes. During that time, the cw-pack-node tool is executed on the compute node via the cw-nodectl exec mechanism. The result is streamed back to the cw-modimg command that then uploads it to the head node, potentially replacing an existing image's contents. The cw-pack-node tool captures all files on the node's / mount, but does not walk other mounted file systems to ensure that any shared storage is not accidentally captured.

  3. Create a boot config for the captured image:

    cw-add-boot-config --image <image name> --boot-config <boot config name>
    

    Where <image name> is the name of the image either created or updated during the capture and <boot config name> is the name of the new boot configuration.

Note

Manual work is likely required to generalize the captured image as the process may capture details specific to the compute node. Due to this hazard, future ICE ClusterWare ™ releases may expand what files are excluded during image capture.

Images and related boot configurations can be moved from one system to another using the cw-bootctl export action. Moving an image and related boot configuration is useful when archiving or when you have created and tested an image on a pre-production system and want to move it to your production cluster. The cw-bootctl export action creates a .export file that contains the boot configuration, image, binary files, and so on.

  1. Export the boot configuration and related image:

    cw-bootctl -i <boot config> export
    

    Where <boot config> is the name of the boot configuration you want to export.

    A file named <boot config>.export is created.

  2. On the system where you want to import the boot configuration and related image, run:

    cw-bootctl import <boot config>.export
    

Note

In rare cases, you may want to export and import the image only and not the related boot configuration. You can do this with the cw-imgctl export and cw-imgctl import actions.