3.1 Imaging Devices

Preboot Services provides tools for creating and compressing images of device hard disks, as well as images of specific add-on applications or sets of files. ZENworks also provides tools for customizing such images and for making images available to auto-imaging operations.

You can take images of devices, then reimage them and other devices with those images. The available devices are Windows and Linux servers and workstations.

ZENworks imaging supports devices that physically connect to the network that meet the minimum requirements for devices.

ZENworks imaging does not support:

  • Imaging operations (creating or restoring images) using wireless connectivity.

  • Imaging operations for the encrypted LVM partitions.

  • PXE booting on Citrix XEN and SUSE Linux Enterprise Server XEN.

  • Software RAID configurations (however, hardware RAID is supported).

  • Devices running boot managers, such as System Commander.

    Boot managers create their own information in the MBR and overwrite the ZENworks boot system, which prevents the device from communicating with the Imaging Server. If you are using boot managers in your environment, you should disable or remove them before performing imaging operations.

  • Imaging operations for systems having Dynamic Disks.

Pre-requisites for taking an Image on Windows

  1. Ensure that the file system is clean by running the chkdsk /f command.

  2. Press Y when the chkdsk program asks for a file system check during the next boot.

  3. After the disk checking is complete, ensure that there are no errors in the drive and log in to Windows.

  4. Run the chkdsk command, (without the /f switch) from the command prompt and ensure that there are no errors.

  5. Proceed to take the image of the device.

The following sections provide more information about ZENworks 11SP3 Imaging procedures and features:

3.1.1 Using ZENworks Control Center for Imaging

The following imaging tasks are available in ZENworks Control Center:

Taking a Base Image of a Device

A base image is an image of partitions and data on a source device’s hard disks. Normally, such an image is prepared with the intent to completely replace the contents of a target device’s hard disks.

You can take an image of an existing device and use it to image a similar device, or use it as a backup image for reimaging the original device.

If you want to copy a Virtual machine, or during the image restoration on a new device, if you want the restored managed device to generate its own GUID and register as a new object in ZENworks Control Center, before taking the image, do the following:

  1. After installing ZENworks Adaptive Agent on the device, ensure that the device has been rebooted at least once.

  2. Run the following command on the managed device:

    zac fsg -d

    This command removes the workstation GUID in the file system in preparation for taking an image. For more information about the zac command, see zac for Windows(1) or zac for Linux(1) in the ZENworks 11 SP3 Command Line Utilities Reference.

    NOTE:

    • You must not run the zac fsg -d command if you want to take an image as a backup image of the managed device.

  3. Run the zac cc command to clear the ZENworks cache data

  4. (Conditional) If you want to take an image of a Windows operating system, run SysPrep on the device.

  5. (Conditional) If you want to take an image of a Linux device, manually delete the DeviceGuid.sav and DeviceData.sav files, which are located in the /etc/opt/novell/zenworks/ directory, from the device.

  6. Reboot the system and proceed to the Imaging distro to take the image of the system.

To take an image of a device:

  1. In ZENworks Control Center, click Devices in the left pane to display the Devices panel in the Managed tab.

  2. Click Servers or Workstations, then select the check box next to a device.

    This selects the device for taking the image.

  3. Click Action > Take image.

    You can also select the check box next to Servers or Workstations to start this wizard, then click Action > Take image. If you do so, you are asked to select a device from the group. Then the File Information page is displayed.

  4. Click Next to display the File Information page:

  5. Fill in the fields:

    Image Format: Select the format of the image to be taken for the device.

    Server and File Path: Click the Browse icon icon to display the Server and Path Information dialog box. Configure the following options.

    • Server Object, IP, or DNS: Click the Browse icon icon to browse for and select the object of the Primary Server or the device that is promoted to the Imaging Server role. You can also specify the IP address or the DNS name of the Primary Server or of the device that is promoted to the Imaging Server role.

      Ensure that the DNS server is up and running, and the DNS name is successfully resolved before configuring this option.

    • Directory Path on Server: Click the Browse icon icon to browse for and select the \content-repo\images directory.

      All ZENworks images must be stored in %ZENWORKS_HOME%\work\content-repo\images on the Windows Primary Server and in /var/opt/novell/zenworks/content-repo/images on the Linux Primary Server. If you are unable to browse to this directory, then you must manually specify the complete path of the directory. For example, C:\Program Files\Novell\ZENworks\work\ content-repo\images on Windows and /var/opt/novell/zenworks/content-repo/images on Linux.

      NOTE:You cannot browse to the specified file system if multiple DNS search domains with DHCP are configured for Linux and if the server is on Windows.

    • File Name: Specify a filename with the.zmg filename extension for the image. The .zmg extension indicates that the file is a valid ZENworks image file.

    Shared Network Path for Image File: Specify the shared-network path where you want to save the .wim or .gho files. This option is displayed only for the Windows Imaging Format (.wim) and Ghost imaging format (.gho). The directory must be a Windows share or a Linux CIFS or SMB share, and you must have the Write permission to it.

    If the Novell File Upload extension is not installed on the device, you must install it before you can browse to and upload the file.

    Image Filename: Specify the filename to save the .wim or the .gho file. This option is displayed only for the Windows Imaging Format (.wim) and Ghost Imaging Format (.gho).

    Network Credential: Click Browse Icon to browse for and select the network credentials to be used for accessing the device that has .wim or .gho files. This option is displayed only for the Windows Imaging Format (.wim) and Ghost imaging format (.gho).

    Use Compression: Compression is required. Choose one of the following:

    • Balanced: Automatically balances compression between an average of the reimaging speed and the available disk space for the image file. This option is displayed only for the ZENworks Image format.

    • None: This option is displayed only for the Windows Imaging format and Ghost imaging format (.gho).

    • Optimize for Speed: Optimizes the compression to allow for the fastest reimaging time. Use this option if CPU speed is an issue.

    • Optimize for Space: Optimizes the compression to minimize the image file’s size to conserve disk space. This can cause restoring an image to take longer.

    Balanced is the default option for the ZENworks Image format and Optimize for Speed is the default option for the Windows Imaging format and Ghost imaging format (.gho).

    Create an Image Bundle: If you select this option, another wizard page is displayed (see Step 6) where you can configure the new bundle. Otherwise, the Summary is your next wizard page (skip to Step 10).

  6. If you selected to create an image bundle, the New Image Bundle page is displayed.

  7. Fill in the fields:

    Bundle Name: Specify a unique name for the bundle, because many other bundle names might be listed in the same folder.

    For more information, see Naming Objects in ZENworks Control Center in the ZENworks 11 SP3 ZENworks Control Center Reference.

    Folder: Specify a folder where you want to list the new bundle. This is a location in ZENworks Control Center, not a file location on a device.

    Description: Enter information to help you later recognize the purpose and scope of this image bundle. For example, “Image taken after the OS was installed, but before GroupWise was installed.”

  8. Click Next to display the Summary page.

  9. Do the following:

    • If you want to perform other configuration tasks after the bundle has been created, select the Define Additional Properties check box.

      For example, you can make assignments to the bundle in the Relationships tab, add actions in the Actions tab, and so on.

    • If you want to deploy the bundle as a sandbox version, select the Create As Sandbox check box. A Sandbox version of a bundle enables you to test it on your device before actually deploying it.

  10. Review the configuration, then click one of the following:

    Back: Allows you to make changes after reviewing the summary.

    Finish: Click to take the image. If you completed Step 7, the image is assigned to the bundle when it is created.

The images are stored in %ZENWORKS_HOME%\work\content-repo\images on the Windows Primary Server and in /var/opt/novell/zenworks/content-repo/images on the Linux Primary Server, or on the device that is promoted to the Imaging Server role. However, the ZENworks images are not replicated from the Primary Server to other Primary Servers or Satellites.

If the images are taken in the Ghost format, ZENworks 11 SP3 additionally creates an XML file with the filename as image_name-ghost.xml in the same location as the image file. You must not edit the xml file.

If you are taking an image of a device that has multiple disks, an image file is created for each disk and only one XML file is created per image.

If you want to move a Ghost image to a different location, you must move all the image files and the XML file specific to the image.

This base image can be used in Step 8 under Configuring the ZENworks Image Bundle for Automatic Imaging.

To create an add-on image of files selected from a file system for use in Step 8, see Creating an Add-On Image from Files in a File System.

NOTE:If there are OEM partitions on a GPT disk:

  • For ZENworks Imaging: From the ZENworks 11 SP3 FRU1 release onwards, OEM partitions with a unique GUID are ignored if the ZENworks Imaging distro is booted in the UEFI mode. If the distro is booted in the legacy BIOS mode, these partitions are included in the partition list. Hence, if an MBR base image is restored to the device, the OEM GPT partitions with unknown GUIDs will get deleted.

    In ZENworks 11 SP3, these partitions are ignored during the Take Image and Restore Image operations.

  • For Third-Party Imaging: OEM partitions are not supported. Before taking the image, it is recommended that you either uncheck these partitions, or you delete these partitions from the disk using Diskpart. If the OEM partition is of the standard GUID type, such as MBD, WRE, MRP, or ESP, you have to manually remove the partition before performing the Take Image operation. The OEM partitions are deleted during image restoration.

Creating an Add-On Image for an Existing Bundle

For the current bundle, you can create the installed version as a ZENworks add-on image. This is not supported for Third-Party Image bundle formats.

Add-on images of bundles are useful for incorporating predelivery of bundles when you are imaging new devices, or when you are reimaging existing devices.

A newer version of the add-on image is automatically created when the bundle’s version number is incremented.

The filename for the add-on bundle is automatically created and uses the following format:

bundle_name-bundle_UID-counter.zmg

where bundle_name is the name of the current bundle for which the add-on image is being created, bundle_UID is a UID number generated for the image, and counter is a four-digit counter (beginning with 0000) that is incremented each time the image is updated (that is, when the bundle’s version number is changed). All ZENworks image files end in .zmg.

To create an add-on image:

  1. In ZENworks Control Center, click Bundles in the left pane to display the Bundles panel.

  2. In the Name column, click a Windows bundle to display its Summary tab.

  3. In the General panel, click the Create option next to the Add-on Image File field.

    This opens the Bundle Add-on Image Wizard.

  4. In the Image Servers panel, click Add.

  5. In the dialog box, browse for and select the Primary or Imaging Satellite Servers where the add-on image file needs to be created, then click OK.

  6. Click Finish to create an add-on image of the installed bundle.

    You can remove an add-on image by selecting its check box and clicking Remove.

You do not have control over where add-on images are stored:

  • For Windows servers, the path to the add-on image files is:

    %ZENWORKS_HOME%\work\content-repo\images\addon-image
    

    The remainder of the path is fixed.

  • For Linux servers, the path to the add-on image files is:

    /var/opt/novell/zenworks/content-repo/images/addon-image
    

The addon-image directory might not exist until the first add-on image has been created on the server. This directory is automatically created the first time you create an add-on image for a bundle, or you can manually create the directory for storing add-on image files that you create outside of ZENworks Control Center.

NOTE:You need to have an agent installed on your system for restoring add-on images that are created using bundles.

Configuring the ZENworks Image Bundle for Automatic Imaging

You can use ZENworks to install software bundles. Software included in a bundle that is assigned directly is considered mandatory (the bundle is directly assigned to the devices, their groups, or their folders).

To configure a ZENworks Image bundle and assign devices to the bundle:

  1. In ZENworks Control Center, click Bundles in the left pane to display the Bundles panel.

  2. Click New > Bundle to start the Create New Bundle Wizard.

  3. In the Create New Bundle Wizard, select Preboot Bundle, then click Next.

  4. On the Select Bundle Category page, select ZENworks Image.

  5. Click Next to display the Define Details page.

  6. Fill in the fields:

    Bundle Name: Although bundles can be identified in ZENworks Control Center by their type of icon, as well as the folder where they are listed, you should develop a naming scheme that differentiates the ZENworks Image bundles that are listed together in a folder.

    For more information, see Naming Objects in ZENworks Control Center in the ZENworks 11 SP3 ZENworks Control Center Reference.

    Folder: Browse for the location where you want the ZENworks Image bundle to be displayed in ZENworks Control Center. The folder must exist. You cannot specify a non-existent folder, because ZENworks does not create them from this wizard.

    Icon: Browse for and select an icon if you plan to use one on your desktop for this bundle.

    Description: Provide a description to help you later recognize the exact purpose of this ZENworks Image bundle.

  7. Click Next to display the Select ZENworks Image File page:

  8. Fill in the fields:

    ZENworks Image File: This is an image file existing on an Imaging Server. You must provide the full path and filename here. The image filename must end in .zmg (case-sensitive). For information on creating a base image, see Taking a Base Image of a Device.

    If the directory contains add-on images that are created by using the Image Explorer utility or created through ZENworks Control Center, do not select an application add-on image because the application add-on image can be used only with linked application bundles. For information on creating an add-on image of files selected from a file system, see Creating an Add-On Image from Files in a File System.

    Click the browse button to access the Server and Path Information dialog box:

    • Server Object, IP, or DNS: Click the Browse Icon icon to browse for and select the object of the Primary Server or the device that is promoted to the Imaging Server role. You can also specify the IP address or the DNS name of the Primary Server or of the device that is promoted to the Imaging Server role.

      Ensure that the DNS server is up and running, and the DNS name is successfully resolved before configuring this option.

    • File Path on Server: The full path to the base image file.

      NOTE:You cannot browse to the specified file system if multiple DNS search domains with DHCP are configured for Linux and if the server is on Windows.

    File Set: Using Image Explorer, you can create file sets for selection when creating the Preboot bundle. For more information, see Section A.0, File Sets and Image Numbers.

    Image Explorer is executed by running:

    • Windows: %ZENWORKS_HOME%\bin\preboot\zmgexp.bat

    • Linux: /opt/novell/zenworks/preboot/bin/zmgexp

  9. Click Next to display the Summary page.

  10. Do the following:

    • If you want to perform other configuration tasks after the bundle has been created, select the Define Additional Properties check box.

      For example, you can make assignments to the bundle in the Relationships tab, add actions in the Actions tab, and so on.

    • If you want to deploy the bundle as a sandbox version, select the Create As Sandbox check box. A sandbox version of a bundle enables you to test it on your device before actually deploying it.

  11. Review the configuration, then click one of the following:

    Back: Allows you to make changes after reviewing the summary.

    Finish: Creates the Preboot bundle as configured according to the settings listed on this Summary page.

This bundle is not assigned to any device or group after it is created until you make that assignment on a Relationships tab.

IMPORTANT:If this Preboot bundle has been created on a management device inside the firewall and you are assigning it to a device outside the firewall, port 8089 must be open both ways (PUBLIC -> PRIVATE, and PUBLIC <- PRIVATE).

If PXE is enabled on the device, the bundle’s work is performed on the device before its operating system starts when a device assigned to the ZENworks Image bundle boots.

Creating and Configuring the Third-Party Image Bundle for Automatic Imaging

You can use ZENworks to specify the third-party images that must be restored on a device. The image that is taken with a third-party Imaging tool and restored by using a third-party Preboot bundle will not have any partition information. Consequently, it creates only one single partition on the destination hard disk. To prevent this issue, you must take an image by using ZENworks Control Center or the Novell ZENworks Third Party Imaging utility in the maintenance mode.

To configure the Third-Party Imaging settings:

  1. In ZENworks Control Center, click Bundles in the left pane to display the Bundles panel.

  2. Click New > Bundle to start the Create New Bundle Wizard.

  3. In the Create New Bundle Wizard, select Preboot Bundle, then click Next.

  4. On the Select Bundle Category page, select Third-Party Image.

  5. Click Next to display the Define Details page.

  6. Fill in the fields:

    Bundle Name: Although bundles can be identified in ZENworks Control Center by their type of icon, as well as the folder where they are listed, you should develop a naming scheme that differentiates the ZENworks Image bundles that are listed together in a folder.

    For more information, see Naming Objects in ZENworks Control Center in the ZENworks 11 SP3 ZENworks Control Center Reference.

    Folder: Browse for the location where you want the ZENworks Image bundle to be displayed in ZENworks Control Center. The folder must exist. You cannot specify a non-existent folder, because ZENworks does not create them from this wizard.

    Icon: Browse for and select an icon if you plan to use one on your desktop for this bundle.

    Description: Provide a description to help you later recognize the exact purpose of this ZENworks Image bundle.

  7. Click Next to display the Select a Third-Party Image File page.

  8. Fill in the fields:

    Image File: Select the type of the image to be used in the bundle. For information on creating a base image, see Taking a Base Image of a Device.

    Shared Network Path for Image File: Specify the shared-network directory containing the .wim or .ghofiles. The directory must be a Windows share or a Linux CIFS or SMB share, and you must have the Write permission to it. If the Novell File Upload extension is not installed on the device, you must install it before you can browse to and upload the file.

    Network Credential: Click Browse Icon to browse for and select the network credentials to be used for accessing the device that has .wim or .gho files.

    Restore WIM as Add-On: Select this option if you want to use the WIM bundle as an add-on image and configure the following options:

    • Image Number (WIM Only): Select the index number of the image to be restored

    • Path to Restore the Add-on Image: Specify the location on the device where you want to restore the add-on image.

  9. Click Next to display the Summary page.

  10. Do the following:

    • If you want to perform other configuration tasks after the bundle has been created, select the Define Additional Properties check box.

      For example, you can make assignments to the bundle in the Relationships tab, add actions in the Actions tab, and so on.

    • If you want to deploy the bundle as a sandbox version, select the Create As Sandbox check box. A sandbox version of a bundle enables you to test it on your device before actually deploying it.

  11. Review the configuration, then click one of the following:

    Back: Allows you to make changes after reviewing the summary.

    Finish: Creates the Preboot bundle as configured according to the settings listed on this Summary page.

The bundle is not assigned to any device or group after it is created until you make that assignment on a Relationships tab.

IMPORTANT:If the Preboot bundle has been created on a management device inside the firewall and is assigned to a device outside the firewall, port 8089 must be open both ways (PUBLIC > PRIVATE, and PUBLIC < PRIVATE).

Using a Script to Image a Device

You can perform scripted imaging using the Imaging Script bundle. Any imaging commands can be entered for the script. This is applicable only for ZENworks Imaging.

For example, if you want to mount a DVD and restore an image from it, you could enter something similar to the following in the Script Text field in the Create New Preboot Bundle Wizard when defining an Imaging Script bundle:

echo "Please insert the DVD containing the image into the drive
and press a key."
read
mount /dev/cdrom /mnt/cdrom
img -rl /mnt/cdrom/myimagefile.zmg
umount /mnt/cdrom
eject /dev/cdrom

This example is a combination of automatic and manual tasks, where you define the bundle in ZENworks Control Center, assign it to the device, then when the device boots, it runs the bundle’s script, prompting you to insert the DVD containing an image into the device’s DVD drive. The script then runs the commands to restore the image on the device and ejects the DVD when finished.

For information on creating an Imaging Script bundle, see Section 3.4, Configuring Imaging Script Bundles for ZENworks Imaging.

3.1.2 Using the Command Line for ZENworks Imaging

The following manual imaging tasks are available for ZENworks Imaging:

These instructions assume that you have already prepared the Imaging Server (see Section 2.1, Preparing a Preboot Services Imaging Server), prepared devices for imaging (see Section 2.8, Setting Up Devices for ZENworks Imaging), and set up imaging defaults (Section 2.5, Configuring Preboot Services Defaults for ZENworks Imaging).

ZENworks imaging supports devices that physically connect to the network and that meet the minimum requirements for devices. ZENworks imaging does not support imaging operations (creating or restoring images) through wireless connectivity.

Manually Taking an Image of a Device

This section explains how to take an image of a device by booting from an imaging method and entering a particular imaging command. The image is stored on your Imaging Server.

If you want to store an image locally rather than on an Imaging Server, see Using a CD or DVD for Disconnected Imaging Operations and Using a Hard Disk for Disconnected Imaging Operations.

Ensure that your Imaging Server has enough disk space for the image. Otherwise, you encounter a “Failed to write to proxy” error.

The following sections contain additional information:

IMPORTANT:When you take an image locally, using the Tuxera driver, use the following command to mount the partition on which the image is stored if the partition is NTFS:

# mount -t tntfs /dev/sdXn mount_dir

In this command, sdX is the device node and n stands for the partition number in the device.

Using the Imaging Maintenance Mode to Manually Take an Image of a Device
  1. Boot the device using one of the following methods:

  2. Depending on how you boot, do one of the following:

    CD: Select Manual Mode from Novell Preboot Services menu.

    PXE: Select Start ZENworks imaging maintenance from the Novell Preboot Services Menu.

    ZENworks Partition: Select Enable ZENworks Partition from the Novell Preboot Services Menu.

  3. (Optional) At the prompt, type img ‑dump, then press Enter.

    This displays a list of the partition slots on the device. For your reference, note the number and type of partitions and which one is active.

  4. Enter a command at the prompt, using one of the following formats:

    • To create an image and store it on the Imaging Server, enter:

      img -makep added_path/newimg.zmg [-comp=comp_level]
      

      The makep mode command stands for “make on proxy,” which creates an image and stores it on the imaging (proxy) server.

      The IP address or DNS name of your Imaging Server is not necessary because the Imaging software automatically points to the images directory on the Imaging Server. However, you can add structure under the images directory. If you do, that directory structure should be included where added_path exists in the command syntax above, immediately followed by / and the image filename (newimg). Also, the subdirectories in the path must exist.

      The .zmg filename extension is required and is case-sensitive.

      You can use the following characters in the path and filename:

      • Letters: a through z (uppercase and lowercase)

      • Numbers

      • Special characters: $ % - _ @ { } ~ #

      In the above syntax, comp level is the amount of compression used when creating the image. Specify any number from 0-9. 0 means no compression. 1 is the same as Optimize for speed and is used by default if you do not specify this parameter. 6 is the same as Balanced. 9 is the same as Optimize for space. (Optimize for speed takes the least amount of time but creates the largest image file. Optimize for space creates the smallest image file but might take a significant amount of time. Balanced is a compromise between compression time and image file size.)

      For example:

      img ‑makep subdir1/cpqnt.zmg ‑comp=6
      
    • To create an image and store it locally, enter:

      img ‑makel filepath [‑comp=comp_level]
      

      The makel mode command stands for “make locally,” which creates an image and stores it on a local hard disk.

      NOTE:Unless you mount a drive before using makel, the image is created in RAM and is lost during a reboot of the device.

      In the above syntax, filepath is the image filename, including the .zmg extension (case-sensitive) and the complete path from the root of the partition where you want it locally stored.

      The directories in the path must exist.

      You can use the following characters in the path and filename:

      • Letters: a through z (uppercase and lowercase)

      • Numbers

      • Special characters: $ % - _ @ { } ~ #

      In the above syntax, comp level is the amount of compression used when creating the image. Specify any number from 0-9. 0 means no compression. 1 is the same as Optimize for speed and is used by default if you do not specify this parameter. 6 is the same as Balanced. 9 is the same as Optimize for space. (Optimize for speed takes the least amount of time but creates the largest image file. Optimize for space creates the smallest image file but might take a significant amount of time. Balanced is a compromise between compression time and image file size.)

      For example:

      img ‑makel myimages/myimage.zmg ‑comp=6
      

    IMPORTANT:Make sure to use forward slashes in the UNC path as shown above. If you want to use backslashes, enclose the entire UNC path in quotes. The path you specify must exist on your Imaging Server.

    For more information on the mode commands and parameters you can use and usage examples, see Section E.3, Make Mode.

    Depending on the amount of data on the hard disk, the image might take several minutes to create. If the screen goes blank, just press any key. (Linux enters a screen-saving mode after a few minutes.)

  5. After the image is created and the imaging maintenance mode prompt is displayed, remove any CD or DVD from the drive and reboot the device.

  6. (Optional) Verify that the image file was created on your Imaging Server. You might also want to check its size.

Using the ZENworks Imaging Engine Menu to Manually Take an Image of a Device
  1. Boot the device using one of the following methods:

  2. Depending on how you boot, do one of the following:

    CD: Select Manual Mode from Novell Preboot Services menu..

    PXE: Select Start ZENworks imaging maintenance from the Novell Preboot Services Menu.

    ZENworks Partition: Select Enable ZENworks Partition from the Novell Preboot Services Menu.

  3. Enter img to display the ZENworks Imaging Engine menu.

  4. (Optional) Click System information > Drive information to display a list of the partition slots on the device.

    For your reference, note the number and type of partitions and which one is active.

  5. Click Imaging > Make image.

  6. In the Make Image Wizard window, specify the destination where the image is stored (Local or Server), then click Next.

  7. Browse to and specify the path to the image archive.

    The directories in the path must exist. You can use the following characters in the path and filename:

    • Letters: a through z (uppercase and lowercase)

    • Numbers

    • Special characters: $ % - _ @ { } ~ #

  8. Select the partitions that you want to include in the image.

  9. Select a compression option:

    None: No compression is used.

    Speed: Takes the least amount of time to compress but creates the largest compressed image file. This option is used by default when an image is created.

    Balanced: Represents a compromise between compression time and image file size.

    Size: Creates the smallest image file but takes longer to compress.

  10. Click Next.

  11. (Optional) Fill in the fields:

    Author: The name of the person creating this image.

    Computer: The name of the computer being imaged.

    Image Description: A description of the image.

    Comments: Any additional comments about the image.

  12. Click Next.

    Depending on the amount of data on the hard disk, the image might take several minutes to create. If the screen goes blank, just press any key. (Linux enters a screen-saving mode after a few minutes.)

  13. After the image is created, exit from the ZENworks Imaging Engine menu, remove any CD or DVD from the drive, then reboot the device.

  14. (Optional) Verify that the image file was created on your Imaging Server. You might also want to check its size.

Creating an Add-On Image from Files in a File System

An add-on image is an archived collection of files to be applied to an existing installation on a target device. The existing partitions and files on the target device are left intact, except for any files that the add-on image might update.

An add-on image typically corresponds to an application or utility, or simply to a set of data files or configuration settings.

To create an add-on image:

  1. Run the Image Explorer utility, which is located on the Imaging Server at:

    Windows: %ZENWORKS_HOME%\bin\preboot\zmgexp.bat

    Linux: /opt/novell/zenworks/preboot/bin/zmgexp

  2. Drag files and folders from an existing device into a new image archive.

    For more information, see Section D.1, Image Explorer (zmgexp).

  3. Save this image with the .zmg extension (case-sensitive) in the same directory on the Imaging Server where you store base images.

    Generally, an add-on image created in this manner doesn’t require any post-processing on the target device. It is simply a set of files that are copied to the appropriate locations on the hard disk, much like what happens when you unzip an archive. For more information, see Using Image Explorer to Customize an Image.

This add-on image can be used in Step 8 under Configuring the ZENworks Image Bundle for Automatic Imaging.

Using Image Explorer to Customize an Image

After you have created a base or add-on image as explained in the previous sections, you can customize it with the Image Explorer utility. Specifically, you can:

  • Compress the Image: You can compress an image (including images created by previous versions of ZENworks) to 40-60% of the original file size, if you have not done so already during the imaging process. There are three compression options. Optimize for speed takes the least amount of time but creates the largest compressed image file. Optimize for space creates the smallest image file but might take a significant amount of time. Balanced is a compromise between compression time and image file size. This option is used by default when an image is created.

    The following compression methods are provided:

    • Compress: Use this option to compress an image file that you currently have open in Image Explorer. For more information, see Compressing an Opened Image File.

    • QuickCompress: Use this option to compress an image file without waiting for the file to fully load into Image Explorer. For more information, see Compressing an Unopened Image File.

  • Split the Image: You can specify a device image file that you want to split into separate files so that the entire image can be spanned across several CDs or DVDs. Splitting a device image is helpful for applying or restoring images in a disconnected environment. For more information, see Splitting an Image.

  • Resize a Partition in an Image: For base images, you can edit the value in the Original size text box to allow you to change how big the ZENworks Imaging Engine makes the partition when the image is restored. For more information, see Changing a Partition’s Size.

  • Purge Deleted Files: You can completely remove excluded or hidden files and folders from an open image. This saves space in the image if you no longer want to include the files. For more information, see Removing Hidden Directories and Files from the Image File.

  • Exclude Individual Files and Folders from the Image: In doing this, you create subsets of the image by specifying which of ten possible file sets to exclude a given file or folder from. This exists merely as internal attributes of the same image archive. For more information, see Unhiding Directories or Files in the Image.

    IMPORTANT:Do not exclude BIOS Parameter Block (BPB) files from a base image or the device won’t be able to boot the new operating system after receiving the image.

  • Add Files and Folders to the Image: By default, any file or folder you add is included in all file sets. To change this, you must explicitly exclude the file or folder from one or more file sets. For more information, see Adding Directories and Files.

For information on starting Image Explorer, see Section D.1, Image Explorer (zmgexp).

Manually Restoring an Image on a Device

The section explains how to restore an image to the device by booting from an imaging method and entering a particular imaging command. The image is retrieved from your Imaging Server.

Ensure that the device receiving a new image has enough disk space for the image. Otherwise, you receive a “Failed to write to proxy” error.

IMPORTANT:When you restore an image locally, using the Tuxera driver, use the following command to mount the partition on which the image is stored if the partition is NTFS:

# mount -t tntfs /dev/sdXn mount_dir

In this command, sdX is the device node and n is the partition number in the device.

The following sections contain additional information:

Using the Imaging Maintenance Mode Prompt to Manually Restore an Image to a Device
  1. If you haven’t already done so, create the image to restore on the device, as instructed in Manually Taking an Image of a Device.

    Make sure that the image is of the same type of device (same hardware configuration) and is stored on your Imaging Server. You can use a previous image of the same device.

    IMPORTANT:If you are restoring an image on a device without a ZENworks partition, make sure the image was made on a device without a ZENworks partition. Otherwise, the wrong MBR (Master Boot Record) is restored, and the device fails to boot.

  2. (Optional) Boot the device from a Windows startup disk and run fdisk to remove all partitions from the hard disk.

    Running fdisk is not required, but it is recommended for purposes of comparing workstation or server partitions before and after the imaging operation.

  3. Boot the device using one of the following methods:

  4. Enter manual at the imaging maintenance mode (bash) prompt.

  5. (Optional) At the imaging maintenance mode prompt, type img ‑dump, then press Enter to display a list of the partition slots on the device.

    For your reference, note the number and type of partitions and which one is active. If you removed all partitions using fdisk, each slot should be empty and none should be active.

  6. Enter a command at the prompt, using one of the following formats:

    • To restore an image from the Imaging Server and place it on a device, enter:

      img ‑restorep added_path/newimg.zmg
      

      The ‑restorep command stands for “restore from proxy.” It retrieves an image from the imaging (proxy) server and restores it on the device. The IP address or DNS name should be that of your Imaging Server, and the UNC path specifies the location and filename where the image is to be retrieved from.

      For example:

      img ‑restorep subdir1/cpqnt.zmg
      
    • To retrieve an image from a local device and place it on a device:

      img ‑restorep filepath
      

      The ‑restorep command stands for “restore from local.” It retrieves an image from a local device and restores it on the device. Filepath represents the filename of the image to retrieve, including the .zmg extension (case-sensitive) and the complete path from the root of the partition.

    IMPORTANT:Make sure to use forward slashes in the UNC path as shown above. Backslashes aren’t recognized by Linux. However, you can use backslashes and enclose an entire UNC path in quotes. The path you specify must exist.

    If you want to manually restore an image from a folder that uses extended or double-byte characters in its name, you should perform an automatic image restoration. For more information, see Section 1.6.2, Creating, Installing, and Restoring Standard Images or Section 1.6.4, Restoring Lab Devices to a Clean State.

    For more information on the mode commands and parameters you can use and usage examples, see Section E.4, Restore Mode.

    Depending on the size of the image, it might take several minutes to restore the image. Images usually take slightly longer to apply than they do to take.

  7. (Optional) After the image is applied and the prompt is displayed, type img ‑dump, then press Enter.

    As before, this displays a list of the partition slots on the device. You should now see information about the new partitions that are created and activated by the image that you just applied.

  8. Remove any CD or DVD from the drive and reboot the device.

  9. Verify that the device boots to the operating system that was installed by the new image.

Using the ZENworks Imaging Engine Menu to Manually Restore an Image to a Device
  1. If you haven’t already done so, create the image to restore on the device, as instructed in Manually Taking an Image of a Device.

    Make sure that the image is of the same type of device (same hardware configuration) and is stored on your Imaging Server. You can use a previous image of the same device.

    IMPORTANT:If you are restoring an image on a device without a ZENworks partition, make sure the image was made on a device without a ZENworks partition. Otherwise, the wrong MBR (Master Boot Record) is restored, and the device fails to boot.

  2. (Optional) Boot the device from a Windows startup disk and run fdisk to remove all partitions from the hard disk.

    Running fdisk is not required, but it is recommended for purposes of comparing the workstation or server partitions before and after the imaging operation.

  3. Boot the device using one of the following methods:

  4. Depending on how you boot, do one of the following:

    CD: Select Manual Mode from Novell Preboot Services menu.

    PXE: Select Start ZENworks imaging maintenance from the Novell Preboot Services Menu.

    ZENworks Partition: Select Enable ZENworks Partition from the Novell Preboot Services Menu.

  5. Enter img to display the ZENworks Imaging Engine menu.

  6. (Optional) Click System information > Drive information to display a list of the partition slots on the device.

    For your reference, note the number and type of partitions and which one is active. If you removed all partitions using fdisk, each slot should be empty and none should be active.

  7. Click Imaging > Restore image.

  8. In the Restore Image Wizard window, specify the source location of the image (Local or Server), then click Next.

  9. Browse to and specify the path to the image archive.

  10. (Optional) Specify a file set.

    Using Image Explorer, you can create file sets for selection when creating the Preboot bundle. For more information, see Section A.0, File Sets and Image Numbers.

  11. (Optional) Specify any advanced options, such as sfileset or apartition:ppartition.

    For details on this and other related img commands, see Section E.0, ZENworks Imaging Engine Commands.

  12. Click Next.

    Depending on the size of the image, it might take several minutes to restore the image. Images usually take slightly longer to apply than they do to take.

  13. (Optional) Click System information > Drive information to display a list of the partition slots on the device.

    As before, this displays a list of the partition slots on the device. You should now see information about the new partitions that are created and activated by the image that you just applied.

  14. Exit the ZENworks Imaging Engine menu.

  15. Remove any CD or DVD from the drive and reboot the device.

  16. Verify that the device boots to the operating system that was installed by the new image.

Making an Image Available for Automatic Imaging

When you boot a device from an imaging method and allow the boot process to proceed in auto-imaging mode, the imaging operation that is performed on the device is determined by default Preboot Services settings that you define in ZENworks Control Center.

Creating a Preboot bundle also allows you to combine a base image and one or more add-on images into a single entity that can be applied on target devices. You can specify a standard image file to apply, or you can create a script to further customize your imaging operation. You can also specify that a particular file set of an image be used.

The sections that follow give instructions for performing these tasks:

Creating a Base Image
  1. Create the base image using one of the following methods:

  2. After the base image is created, perform one of the following procedures in ZENworks Control Center:

    • If you created the image using a Preboot bundle, assign the bundle to the devices to be imaged:

      1. In ZENworks Control Center, click Bundles in the left pane to display the Bundles panel, then in the Name column, click the bundle containing the base image that you want to assign to a device to display its Summary page.

      2. Click the Relationships tab, then in the Device Assignments panel, click Add to open the Select Objects dialog box.

      3. Select the devices or groups containing devices, then click OK to display the Assign Bundle Wizard page.

      4. Click Next to display the Summary page, then click Finish to assign the devices to the bundle and exit the wizard.

    • If you created the image manually, assign the image to a Preboot Image bundle, then assign that bundle to the devices to be imaged:

      1. Follow the instructions in Configuring the ZENworks Image Bundle for Automatic Imaging.

      2. In Step 11, click Next to assign the bundle to the devices.

    The next time these devices boot, they are imaged from this Preboot bundle.

Associating an Add-On Image with a Preboot Bundle
  1. Create the add-on image to associate with the preboot bundle. For more information, see Creating an Add-On Image from Files in a File System.

  2. Copy the add-on image file to a Configuration Management Imaging Server that is accessible in your Management Zone.

    You might want to copy your add-on images to the same location as the base image.

  3. In ZENworks Control Center, click Bundles in the left pane to display the Bundles panel, then in the Name column click a Preboot bundle containing a base image that you want to associate the add-on images with. Its Summary page displays.

  4. Click the Actions tab, then click Add > ZENworks Image.

  5. In the Add Action - ZENworks Image dialog box, browse for and select an add-on image.

    You can associate more than one add-on image with the bundle. Repeat this step for each add-on image.

  6. (Optional) In the Action Name field, change the default name to a useful name.

    This name is displayed in the Name column on the Actions tab.

  7. (Optional) In the File Set field, select a file set number.

    For information on file sets, see Section A.0, File Sets and Image Numbers.

  8. Click OK to exit the dialog box.

  9. To arrange the order in which the images are applied, select a check box and click either Move Up or Move Down.

  10. Click Apply to save the changes.

    When a device boots that is assigned to this bundle, the add-on images are applied in the order listed on this page.

Using a File Set of an Image

As explained in Using Image Explorer to Customize an Image, you can exclude individual files and folders from any of 10 possible file sets of an image.

Using Image Explorer, you can create file sets for selection when creating the Preboot bundle. For more information, see Section A.0, File Sets and Image Numbers.

Table 3-1 Image File Set Usages

Type of imaging operation

How to specify the file set to use

Automatic (Preboot Services based on default settings)

In the ZENworks Image Wizard in ZENworks Control Center, specify the number of the file set in the File Set field. You must create the file set using the Image Explorer utility. For more information, see Section D.1, Image Explorer (zmgexp).

You can create multiple Preboot bundles that point to the same base image, but to different file sets of that image.

Manual (command line or menu)

Use the ‑s parameter on the ‑restore mode command. For example, to specify file set number 3:

img ‑restorel myimage.zmg ‑s=3

or

You can enter img at the imaging maintenance mode prompt to display a menu, select Restore an Image, then select Local Image. Specify File Set (for example, 3) in the Advanced Parameters field.

For details, see Section E.0, ZENworks Imaging Engine Commands.

3.1.3 Setting Up Disconnected Imaging Operations

Disconnected imaging operations are inherently manual. To perform a disconnected imaging operation on a device, you must have a storage device to hold the image to be created or restored, and that storage device must be locally accessible to the ZENworks Imaging Engine (in Linux) when you boot the device from the imaging boot media. This is applicable only for ZENworks Imaging.

The following sections explain how to set up and perform disconnected operations:

Using a CD or DVD for Disconnected Imaging Operations

You can use CDs and DVDs only as the storage medium for an image to applied, not for an image to be created.

You can apply an image from a bootable or non-bootable imaging CD or DVD using either the imaging maintenance mode prompt or using the ZENworks Imaging Engine menu.

The following sections contain additional information:

Using the Imaging Maintenance Mode Prompt to Apply an Image
  1. Use your CD- or DVD-burning software to burn the source image onto a CD or DVD.

  2. Boot the device by using one of the following methods:

  3. Select Manual Mode from Novell Preboot Services menu.

  4. Insert the CD or DVD that contains the source image.

  5. At the prompt, enter cdrom.s to mount the CD or DVD.

    This mounts the CD or DVD to /mnt/cdrom.

  6. Enter a command by using the following format:

    img ‑restorel /mnt/cdrom/path/image_name.zmg
    

    where path and image_name are the path and filename of the image relative to the root of the CD or DVD.

  7. When the imaging is done, remove the imaging boot media (if applicable) and reboot the device with the new image.

Using the ZENworks Imaging Engine Menu to Apply an Image
  1. Use your CD- or DVD-burning software to burn the source image onto a CD or DVD.

  2. Boot the device by using one of the following methods:

  3. Select Manual Mode from Novell Preboot Services menu.

  4. Insert the CD or DVD that contains the source image.

  5. At the prompt, enter cdrom.s to mount the CD or DVD.

    This mounts the CD or DVD to /mnt/cdrom.

  6. Enter img to display the ZENworks Imaging Engine menu.

  7. Click Imaging, then click Restore image.

  8. Click Local, then click Next.

  9. Browse to and specify the path to the image archive.

  10. (Optional) Specify a file set.

    Using Image Explorer, you can create file sets for selection when creating the Preboot bundle. For more information, see Section A.0, File Sets and Image Numbers.

  11. (Optional) Specify any advanced options, such as sfileset or apartition:ppartition.

    For details on this and other related img commands and parameters, see Section E.0, ZENworks Imaging Engine Commands.

  12. Click Next.

    Depending on the size of the image, it might take several minutes to restore the image. Images usually take slightly longer to apply than they do to take.

  13. When the imaging is done, remove the imaging boot media (if applicable) and reboot the device with the new image.

Using a Hard Disk for Disconnected Imaging Operations

When you boot a device from a ZENworks imaging boot media, you can place an image on, or take an image from, any primary partition on an IDE or SCSI hard drive. You can also use the local ZENworks partition if one is installed. Any target partition must have sufficient space.

When you create an image, the partition where you store the image is itself excluded from the image. When you apply an image, the source partition is not altered.

You can create or apply an image on a hard disk by using either the imaging maintenance mode prompt or by using the ZENworks Imaging Engine menu.

The following sections contain the instructions:

Using the Imaging Maintenance Mode Prompt to Create an Image
  1. Boot the device by using one of the following methods:

  2. Select Manual Mode from Novell Preboot Services menu.

  3. At the prompt, enter img ‑dump to view the available partitions.

    Note the number of the partition where you will store the new image.

  4. Enter a command by using the following format:

    img ‑makel [-part=pNumber] /added_path/image.zmg [‑comp=comp_level]
    

    where pNumber is the number of the partition to store the image in, and comp_level is the amount of compression used when creating the image. Specify any number from 0-9. 0 means no compression. 1 is the same as Optimize for speed. 6 is the same as Balanced and is used by default if you do not specify this parameter. 9 is the same as Optimize for space. (Optimize for speed takes the least amount of time but creates the largest image file. Optimize for space creates the smallest image file but might take a significant amount of time. Balanced is a compromise between compression time and image file size.) Path and image are the path and filename of the new image relative to the partition root. If you omit the partition number, the local ZENworks partition is used.

    For details on other related img commands and parameters, see Section E.0, ZENworks Imaging Engine Commands.

Using the ZENworks Imaging Engine Menu to Create an Image
  1. Boot the device by using one of the following methods:

  2. Select Manual Mode from Novell Preboot Services menu..

  3. Enter img to display the ZENworks Imaging Engine menu.

  4. (Optional) Click System information > Drive information to display a list of the partition slots on the device.

    For your information, note the number of the partition where you will store the new image.

  5. Click Imaging > Make image.

  6. In the Make Image Wizard window, click Local > Next.

  7. Browse to and specify the path to the image archive.

  8. Select the partitions that you want to include in the image.

  9. Select a compression option:

    None: No compression is used.

    Speed: Takes the least amount of time to compress but creates the largest compressed image file. This option is used by default when an image is created.

    Balanced: Represents a compromise between compression time and image file size.

    Size: Creates the smallest image file but takes longer to compress.

  10. Click Next.

  11. (Optional) Fill in the fields:

    Author: The name of the person creating this image.

    Computer: The name of the computer being imaged.

    Image Description: A description of the image.

    Comments: Any additional comments about the image.

  12. Click Next.

    Depending on the amount of data on the hard disk, the image might take several minutes to create.

  13. After the image is created, exit from the ZENworks Imaging Engine menu, remove any CD or DVD from the drive, then reboot the device.

  14. (Optional) Verify that the image file was created. You might also want to check its size.

Using the Imaging Maintenance Mode Prompt to Apply an Image
  1. Boot the device by using one of the following methods:

  2. Select Manual Mode from Novell Preboot Services menu.

  3. (Optional) At the prompt, enter img ‑dump to view the available partitions.

    For your information, note the number of the partition where the source image is stored.

  4. Enter a command by using the following format:

    img ‑restorel [-part=pNumber] added_path/image.zmg
    

    where pNumber is the number of the partition where the source image is stored, and path and image are the image path and filename relative to the partition root. If you omit the partition number, the local ZENworks partition is used.

    For details on other related img commands and parameters, see Section E.0, ZENworks Imaging Engine Commands.

  5. When the imaging is done, remove the imaging boot media (if applicable) and reboot the device with the new image.

Using the ZENworks Imaging Engine Menu to Apply an Image
  1. Boot the device by using one of the following methods:

  2. Select Manual Mode from Novell Preboot Services menu.

  3. Enter img to display the ZENworks Imaging Engine menu.

  4. (Optional) Click System information > Drive information to display a list of the partition slots on the device.

    For your reference, note the number of the partition where the source image is stored.

  5. Click Imaging > Restore image.

  6. Click Local > Next.

  7. Browse to and specify the path to the image archive.

  8. (Optional) Specify a file set.

    Using Image Explorer, you can create file sets for selection when creating the Preboot bundle. For more information, see Section A.0, File Sets and Image Numbers.

  9. (Optional) Remove the word sfileset from the sentence.

    For details on this and other related img commands and parameters, see Section E.0, ZENworks Imaging Engine Commands.

  10. Click Next.

    Depending on the size of the image, it might take several minutes to restore the image. Images usually take slightly longer to apply than they do to take. If the screen goes blank, just press any key. (Linux enters a screen-saving mode after a few minutes.)

  11. When the imaging is done, remove the imaging boot media (if applicable) and reboot the device with the new image.