Chapter 22 Imaging a Workstation

One significant feature of ZENworks Desktop Management is the capability to create and deploy images of workstations throughout the network. With this capability you can provide an additional level of support and service to workstation users by being able to take an image of a golden workstation for your organization and then apply that image to any workstation in the network. This can be used to initially set up workstations in your organization and to restore a workstation to properly functioning status should problems occur that are best repaired by getting the workstation to a known, beginning state.

Workstation Imaging System

The ZENworks Desktop Management system for imaging workstations is made up of the following components: Linux operating system, Linux imaging software, imaging server agents, and Windows workstation image-safe data agent. In addition to these components, ZENworks adds objects in eDirectory, and some administrative tools in ConsoleOne to get the job done.

There may be a Linux partition placed on a workstation (minimum of 100MB) that can hold the Linux OS and the imaging engine. This is ideal to place on workstations that you may want to image on-the-fly (from ConsoleOne) because, when requested, the workstation gets notified of this work and then performs the imaging task. If no work exists for the imaging system to perform, the partition boots into the normal operating system.

The ZENworks Desktop Management imaging system is designed to function in an automatic mode (although it does have a manual mode). The expectation is that you use the system to deploy images to your workstations in the network to set up initial systems or repair systems and get them back online as quickly as possible. Consequently, the system assumes that a workstation that is contacting the imaging server, but is not registered in the tree, is requesting an image, and that a registered workstation is contacting the imaging server to see whether any work (indicated by flags in the workstation object) is to be done.

The ZENworks Desktop Management product shipped with the ZENworks Preboot Services product. This allows you to have PXE (Pre-Execution Environment) support right out of the box! Now you don’t have to have a Linux partition on the workstation. Instead, you can boot PXE, and the PXE Server provided in ZENworks Desktop Management will download the ZENworks Imaging Environment (Linux Imaging Software), which then contacts the imaging server for work to do, either to take or receive an image.

Linux Imaging Software

Linux Imaging Software is the Linux application that actually performs actions such as the creation and installation/restoration of images. This software is automatically launched when the workstation is started, prior to booting the Operating System. This allows the software to update workstations with newer images prior to users accessing the system.

This software is not writing bits and bytes on the sectors, but it uses the various supported file system types to read and write files. The supported file system types are FAT16, FAT32, NTFS 4 (Windows NT), and NTFS 5 (Windows 2000/XP/2003).

NOTE

If you take the manual approach to restoring the image and the partition is not empty, the currently existing files will be mixed with the files from the restore—which can cause unexpected behavior (OS and driver files can become intermixed, and so on).

NOTE

Images always have the suffix .ZMG and may not be compressed. You must have enough room on the destination server to store the entire image, or the image transfer will fail and the partial image will be deleted.

The imaging software can function in one of two modes: automatic and manual. In the automatic mode, the imaging software contacts the imaging server and requests any requests to take or receive an image. If an image must be taken or received, the imaging software begins the process. If no work must be done, the imaging software completes, and the workstation boots to the native operating system.

If the imaging software is in manual mode, the software does not automatically communicate with the imaging server but places a Linux prompt on the workstation screen. From the Linux prompt, you perform specific partitioning and imaging tasks including taking or receiving an image. See the “Advanced Imaging” section later in this chapter to understand the commands you can perform in the manual mode. When the imaging software is finished, the user must manually request the reboot to the native operating system.

ZENworks 7 introduces a new initial screen that allows you to specify the following options as the Imaging Software is loaded:

Image   A

Image   B

ZENworks 7 also introduces a new GUI when operating in manual mode. When executing an ‘img’ command in manual mode, the new GUI is loaded. From the new GUI you have the option of performing all advanced functions of the Imaging Software. This feature is useful because you can use function keys or the mouse to start operations without having to know command-line commands and parameters. Another useful feature of the new GUI is that it provides a better look and feel; for instance, when creating an image a status bar with the current progress, total time, and file information is displayed.

Imaging Server Agents

An imaging server agent is the agent that runs on the server that is responsible for communicating with the imaging software running on the workstation. These agents tell the workstation whether to take the image or to receive an image and are responsible for walking the eDirectory tree to find the image. This is the agent affected by the imaging server policy in the server policy package. It is responsible for receiving information from the workstation and processing the rules in the policy to find an image object that should be applied to the workstation.

After the image is determined, this agent gets the image file and transmits it to the Linux software residing on the workstation. It is also responsible for receiving any images that the workstation is sending it and storing them onto the server in the specified and approved locations.

The image server is loaded on the NetWare server as imgserv.nlm, and the NT/2000/2003 version is a service DLL with the same name. The imaging server has a status screen that tells you some information on the number of requests and images it has received and served. It, unfortunately, does not have any information on the screen on currently receiving or delivering work. You can load the service with a debug option and get it to write a log file called ZIMGLOG.XML on the server.

Windows Workstation Image-Safe Data Agent

The Windows Workstation image-safe data agent resides on the Windows workstation and is responsible for receiving image-safe data from the disk and placing it into the Windows Registry. It also makes sure that the information in the Windows Registry is synchronized on the disk.

A special sector on the disk is reserved for placing information that is preserved despite having an image applied to the workstation. This way a workstation keeps its IP address (or DHCP settings), computer name, workstation object, domain, and group names.

eDirectory Objects

Several objects are introduced to the tree to support ZENworks Desktop Management imaging. These objects are the following:

Image   Workstation imaging policy—Is in the workstation policy package and represents the policy to determine, for the associated workstations, the image to be used if a reimage is requested. See Chapter 15, “Setting Up Workstation Policies,” for more information about this policy.

Image   Imaging server policy—Is in the server policy package and represents the policy to determine for the associated imaging servers the image to be used if an image is requested for a nonregistered workstation. See Chapter 19, “Creating Server Policies,” for more information about this policy.

Image   Image object—An eDirectory object that represents an image that has been taken of a workstation and stored on the imaging server. See the following section, “Image Object,” to learn more about the image object.

Image   Workstation object: imaging configuration—Some configuration parameters that are part of the workstation object. In this page you can configure whether the workstation should take or receive an image on the next reboot.

Image Object

The image object is created in eDirectory by the administrator and is associated with an image file (.ZMG) that has been taken by the ZENworks Desktop Management imaging system. To properly configure an image object you must do the following:

1.   Take an image of a workstation and store that image on an imaging server. See the “Creating a Workstation Image” section later in this chapter.

2.   Launch ConsoleOne and browse to the container where you want the image object to reside.

3.   Create an image object by selecting the container and then choosing File→New→Object from the menu and selecting Workstation Image object from the list of objects.

4.   After the object is created, go into the properties of the object either by selecting additional properties in the create process or by right-clicking on the object and choosing Properties from the menu.

5.   Select the Image Files tab and specify whether you want to use a base file image or set up scripted imaging. If you select standard imaging, you must administer the location of the .ZMG files by clicking the Browse button on the Base Image File field. You need to browse to the imaging server and then to the file system on that server to specify the .ZMG file. If you select scripted imaging, you are provided with a text window in which you can specify an imaging command (see “Advanced Imaging” later in this chapter).

6.   Choose the file set to bring as part of the image by selecting the Set in the Use File Set parameter at the bottom left side of the screen. You can have up to 10 different file sets.

7.   If you are using standard imaging, you can also append additional images to this image by clicking the Add button and placing them in the Add on Image File field. These additional images are included with the base image and placed on the workstation when it is imaged. These additional images could be application object images (see Chapter 11, “Creating and Using Application Objects,” for more information).

8.   Click OK to save the administrative changes and exit ConsoleOne.

This completes the steps necessary to properly configure an image object.

Administrative Tools

Several tools are available to perform the imaging operation. First are the snap-ins for ConsoleOne that enable you to create image objects, launch tools to create the imaging boot disks, and view and manipulate an image file.

The Boot Disk Creator and the Image Explorer are both Windows programs launched from ConsoleOne from the Tools menu. The Boot Disk Creator creates the Linux diskettes necessary to boot the workstations to communicate with the imaging server and to create and install the images.

The Image Explorer enables you to view the contents of the image file, mark files in the image to be included in various sets of files, remove files, or add files to the image.

An additional graphical interface to the Image Explorer, discussed later in this chapter, has also been added to the ZENworks Suite to provide additional capabilities to better manage workstation images.

Setting Up Workstations for Imaging

The ZENworks Desktop Management imaging engine that performs the actual imaging of the workstation is a Linux application. Therefore, the workstation must be booted to Linux temporarily while the imaging is performed. For a workstation to use ZENworks imaging, you need to prepare a bootable device that has the following components:

Image   Linux kernel—Either a bootable device or partition with Linux installed

Image   Imaging engine—ZENworks Desktop Management imaging software

Image   Network drivers—Drivers to access the network to communicate with the ZENworks Desktop Management imaging server

You can use any of the following methods to load the imaging software on a workstation:

Image   Preboot Services (PXE)

Image   Boot diskettes

Image   Boot CD

Image   Linux partition on a workstation

Each of these methods is discussed in the following sections.

Using Preboot Services with Imaging

When a workstation with PXE support is booted, it searches the network for the server where Preboot Services are installed, as described in Chapter 2, “Installing ZENworks 7 Suite.” After it locates the server, it uses a DHCP request to query the server and determine whether there is any imaging work to do. If ZENworks determines that there is imaging work to do, it then downloads the following files to boot the workstation to Linux and performs the imaging operations: LINUX.1, LINUX.2, and LOADLIN.EXE. These files will not be downloaded if ZENworks determines that there is no work to be done.

PXE is an industry-standard protocol that allows a workstation to boot up and execute a program from the network before the workstation operating system starts. ZENworks Workstation Imaging uses Preboot Services to allow imaging operations to occur without having to boot from floppy, CD, or a Linux partition on the workstation. This is extremely useful if you want to quickly throw an image on a workstation that has a blank HD in it. For more information, see “Preboot Services” at the website www.novell.com/products/zenworks/.

Creating Boot Diskettes

Imaging starts by booting up the workstation with a bootable CD, PXE-enabled LAN card or the ZENworks Desktop Management imaging boot disk. To create this disk, do the following:

1.   Get a formatted floppy disk. The system does not work properly if you create image disks on previously used floppies without reformatting it first.

2.   Launch ConsoleOne.

3.   Launch the Boot Disk Creator program (sys:publiczenworksimagingzimgboot.exe) by going to the Tools menu and selecting the correct option (Tools→ZENworks Utilities→Imaging→Create or Modify Boot Diskette).

4.   Within the Boot Disk Creator program choose the options that you want. Figure 22.1 shows a sample of the Boot Disk Creator window.

FIGURE 22.1 ZENworks Imaging Boot Disk Creator.

image

     You can make the following choices in the program:

Image   Prompt for Configuration When Booting from Diskettes—After the boot process is finished, this prompts the screen for the configuration information included on this screen (such as Reboot Manually, Proxy Address, Use DHCP, and so on). This enables you to change these values from the specified defaults given in this screen. Press Enter when running the imaging program on the workstation because you want to keep the defaults that you specify on this screen.

Image   Reboot Manually—This requires that the user request the reboot (Ctl+Alt+Del) manually at the completion of the imaging process (either take an image or receive an image) instead of having the program automatically reboot the workstation when finished.

Image   ZENworks Partition Size—This enables you to specify how many megabytes you want any Linux partition to be on the workstation, if you decide to create the partition.

Image   Workstation IP Settings: Use DHCP—Tells the Linux system to use DHCP to get the workstation’s IP address to connect to the imaging server.

Image   Workstation IP Settings: Use the Following Static Address Information—Enables you to specify the address instead of using DHCP. This is the address used by the workstation to connect to the imaging server.

Image   Imaging Proxy Server Address: Use DNS Name—This flag enables you to select and enter the DNS name of the imaging server. Choose this option only if you have DNS enabled and have entered a record in the DNS system for this server. Be sure and put the full DNS name such as imgsrvr.novell.com.

Image   Imaging Proxy Server Address: Use IP Address—This flag identifies that the system should use the IP address to connect to the imaging server rather than DNS. The address specified should be the address of the server running the imaging service.

5.   Put the floppy disk into the disk drive and click the Create CD Boot Diskette button. This writes a compressed file with the Linux boot system and the setting.txt file to the floppy. Click Close.

This floppy can now be used to boot the workstation and begin the imaging process.

Creating a Boot CD

If you have systems capable of booting from CD-ROM, you can create a CD with the Linux boot system. With your CD writer software, you need to create a CD using the ISO file called bootcd.iso from the publiczenworksimaging directory or from the ZENworks Desktop Management Program CD. You also need the settings.txt file, which holds the configuration for the boot CD—such items as prompt, size of Linux partition, and so on. You also need this settings.txt file on the CD. If the settings.txt file is not added, you will need to copy it to a floppy as described in the previous section, and it will be asked for during the booting process when booting using the CD. Your CD writer software can either include the settings.txt file into the ISO image or needs to write a multisession CD. Obviously, your workstations need to support booting from a multisession CD.

The session.txt file is an ASCII text file that holds key/value pairs that tell the boot system the configuration settings for the imaging engine. The following is a sample of the settings.txt file:

# ZENworks Imaging settings.txt
#   denotes a comment

#PROMPT should be set to YES if you want to configure
# various parameters
#PROMPT=YES

#PARTITIONSIZE should be set to the Linux partition size
# in MB, to be created on install
PARTITIONSIZE=15

#IPADDR should be set to the desired ip address of the
# machine. To use DHCP comment out the line, or remove
# it from the file.
#IPADDR=137.65.138.128

#GATEWAY is the router address for this machine. If
# using DHCP, remove this line, or comment it out.
#GATEWAY=137.65.139.254

#NETMASK is this machine's subnet mask. If using DHCP,
# remove or comment out this line.
#NETMASK=255.255.252.0

#PROXYADDR is the address of the server running ZENworks
# Image Server nlm
PROXYADDR=137.65.203.1

#uncomment if you want to reboot manually.
#MANUALREBOOT=YES

From this sample file it is possible to see the key/value pairs for the boot system configuration settings used by the imaging engine.

Placing a Linux Partition on a Workstation

The Linux partition is the boot partition, and on boot-up of the workstation, the imaging server is contacted to see whether it has any requested work (based on administration in the workstation object). If it has work, the imaging engine either gets or puts an image. If it has no work, the imaging system continues the boot process, booting the workstation to the native operating system.

If you are placing a Linux partition on a previously functioning system, this process assumes that the workstation has already registered with the network and has an associated workstation object and that the image-safe data agent has run on the workstation. Having the workstation already registered prevents the imaging server from attempting to place a new image on the workstation. However, if you are placing the Linux partition on a new workstation, this process can place a new, standard image on the workstation, preparing it for use in your organization.

The placing of the Linux partition and the ZENworks Desktop Management boot system does not function with booting programs such as System Commander. These systems need to be disabled or marked such that the Linux partition automatically gets booted. The ZENworks Desktop Management boot system functions properly with the Windows Boot manager by configuring the boot.ini file to properly boot.

NOTE

The imaging system does some special recognition for Compaq systems and does not destroy the Compaq partition used to run machine configurations.

WARNING

Placing a Linux partition destroys the disk and all the other partitions unless you take special care in saving the partitions or using another program to create a new partition without destroying the current partitions.

To place a ZENworks Desktop Management Linux imaging partition on a workstation you need to do the following steps. Be sure to save any data on the workstation; any time you are working with partitions you must prepare your data to be able to recover should a failure occur.

One method is to make sure that an empty place exists on the disk that is sufficient to hold the Linux partition (the size was identified in the creation of the boot disks and is 100MB minimum). This could be leftover space or space created by some program such as Partition Magic, which frees up space. If sufficient free space is present on the hard drive, the Linux install process should consume that space only if the free partition is partition 0 (in other words, the first partition in the partition table) and thereby will not destroy any other partitions (although you have to be trusting, and you know how sometimes everything doesn’t go perfectly). The following steps describe how to put the Linux partition on without loss of data and without any other tools:

1.   Create your ZENworks Desktop Management boot diskettes with the proper configuration, including the setting to Reboot Manually.

2.   Boot the workstation with the ZENworks Desktop Management imaging boot diskettes or CD. Make sure that you select manual mode when the system comes up. If you select nothing at the prompt in 60 seconds, the system boots to automatic mode.

3.   If this is a previously functioning workstation, take an image of the workstation by entering the following command: img makep <address/DNS of image server> <filename for image file>. The address may be an IP address or the DNS name of the image server. The filename is the name of the image file you want to hold the image. The filename must include the following format: //servername/dir/dir/../filename.img. The servername is actually ignored because the address of the server receiving the image stores the file on its disk. (Redirection of image servers does not work in manual mode.) The new GUI will start a progress bar that allows you to monitor the status of creating the image.

4.   Enter img dump to view the list of known partitions on the disk. Remember the numbers of the partitions.

5.   Enter /bin/install.s from the Linux prompt to install the Linux partition on the disk. This destroys all data on the workstation’s hard drive. It creates a new Linux partition on the disk the specified size and place of the Linux boot system on that partition. The ZENworks boot loader is automatically installed in this process. A message comes on the screen stating that the boot process could not fully function. This is because Linux creates logical partitions for all the partitions seen at boot time. You just added a new partition, and it cannot create a logical partition for it. When it reboots, the boot manager system automatically reinstalls itself when it is assumed that all partitions are now present.

6.   Enter img dump at the Linux prompt to view the list of known partitions. There should be one less partition listed than in step 4 because the Linux partition is hidden from this listing. Also note that all the other partitions are destroyed (in other words, have no file system type associated with them).

7.   Perform a reboot of the workstation to make sure that the Linux partition is functioning properly. This can be done by typing reboot at the Linux prompt or by turning the workstation off and on. Make sure that you have removed the Linux boot media. This should boot to the Linux partition and get to the Linux prompt (because the system has been configured to not automatically reboot).

8.   If you took an image in step 3, bring down the image that was taken by typing image rp <address of image server> <image filename>. The image is brought down to the disk. The image is then reduced in size sufficiently to take the remaining space on the disk (we had to take space for the Linux partition). If the image is too big to be reduced, an error occurs. The installing of an image from ZENworks Desktop Management takes special care to not destroy or overwrite the Linux partition. When the image is successfully down, you have the same workstation data and environment with the exception of a new Linux partition.

9.   Enter img dump at the Linux prompt to view the list of partitions again. There should be the same number as in step 6 (one less than in step 4), and there should now be file system types to the partitions that you have just restored.

10.   Reinitialize the boot manager by running /bin/lilo.s. You should do this any time you bring down any image to the workstation. In automatic mode, the system performs this automatically.

11.   Perform a reboot of the workstation. This can be done by typing reboot at the Linux prompt or by turning the workstation off and on. Make sure that you have removed the Linux boot diskettes. This should boot to the Linux partition and get to the Linux prompt (because the system has been configured not to automatically reboot).

12.   The workstation should now boot to the Linux partition that goes into automatic mode communicating with the image server. It should find no work if the workstation is registered, and the image configuration flags are off. If the workstation is not registered and you did not lay down an image in step 8, the image server is contacted and goes through its rules processing (see the server policy package, imaging server policy) and determines an image that should be placed on this workstation. If one is found, that image is placed on the workstation. If you manually placed an image down on a workstation that had not been previously registered, the imaging server compares the name of that image file with the image determined by the imaging server. If they are the same, the imaging server does not attempt to lay down a new image. This should result in the workstation having no work and again booting to its native operating system. This completes the steps necessary to put the Linux partition on without any loss of data.

Creating a Workstation Image

Depending on your situation and setup, several ways exist to create a workstation image.

If the workstation is registered in the directory and has a Linux partition on it (see the section “Placing a Linux Partition on a Workstation” earlier in the chapter), you can go to the workstation object in the tree and set a workstation flag (in the ZENworks Imaging Configuration tab) to take an image on the next boot. The next time that the workstation boots, the Linux partition boots, and the imaging engine on the workstation contacts the imaging server. The server notes that the workstation object has the flag set and requests that the workstation send an image. When the image is completed, the flag is reset in the workstation object, and the workstation continues to boot into the native operating system.

Make sure that you disable or remove any boot manager systems such as System Commander. You do not want them included in the image that you take, or when they are placed onto a workstation they overwrite the ZENworks boot system, and the connectivity between the workstation and the imaging server does not occur, keeping you from having the features of automatic execution.

Creating an Image Using a Workstation Object

If the workstation is registered in the directory but does not have a Linux partition, you need to boot from the floppies, PXE, or CD we made previously. When booting from CD or floppies, choose the manual boot method. For PXE, hold down the left Ctrl+Alt keys during the process of loading PXE and then choose Maintenance mode. After the system is booted, you can let Linux proceed in automatic mode. This contacts the image server and takes the image as described in the previous paragraph.

Creating an Image Using a Linux Partition

If the workstation is not registered in the directory but has a Linux partition installed, when the workstation boots into the Linux partition, it contacts the imaging server that runs its rules—attempting to discover a matching image. If one is found, it images the workstation with the matching image. Because of this, you need to boot the workstation from the floppies to get the imaging engine into manual mode and not connect to the imaging server.

Creating an Image Using Bootable Media or PXE

If the workstation is not registered in the directory and does not have a Linux partition you must boot from floppies (or CD) and then type manual when the Linux partition is booted. Type img mp <proxy address> <full path to image>. Don’t forget that the path must use forward slashes and must include the server. The directories in the path must already exist. This takes an image of the workstation and places it on the imaging server.

NOTE

Whenever you take an image or place an image on a workstation, the ZENworks imaging engine does not take an image of the Linux partition or replace it with an image being brought down. The only way to place a Linux partition on a workstation is via the bootable floppies or another imaging program.

Because the imaging process understands FAT16, FAT32, NTFS 4, and NTFS 5, it reads the files from these systems and includes them in the image on a file-by-file basis. If the imaging system does not understand the partition type, it does a sector-by-sector copy of the partition.

Using the ZENworks Image Explorer Graphical User Interface

After an image is taken on the system and stored on the imaging server, you can examine the contents of an image by running the ZENworks Desktop Management Image Explorer (zenworksimgexp.exe). When you launch the Image Explorer, you are placed in a Windows program. From there you go to the File menu and open the .ZMG file that holds the workstation image. Figure 22.2 show a sample of an image in the Image Explorer.

FIGURE 22.2 The ZENworks Image Explorer.

image

As you can see in Figure 22.3, you can browse the image and discover the partitions and all the files in the image. You can also, using the Image Explorer, look at the information gathered from the workstation such as the hardware configuration. To look at this information, select the .ZMG file in the image editor and select File→Properties, or right-click and select Properties. When you do, the dialog box shown in Figure 22.3 is displayed.

FIGURE 22.3 Image properties from an image in the ZENworks Image Explorer.

image

As you can see, this dialog displays the description of the image and all the hardware information on the workstation where the image was captured. (You can use this information to help you construct your rules in the image server policy.) Other fields include when created, the author, and any comments. If you want to modify any of the Description, Author, or Comments fields, just move the cursor to these fields and type in the information you want.

Adding and Removing Files and Directories

From within the Image Explorer you can add files or directories of files to the image. ZENworks also allows you to create up to 10 different versions of the file set for the image. This is useful to tailor your images after they have been created or for creating an image from scratch. For example, an administrator may want to have two separate versions of the same workstation images—one for the user’s local workstation and one for his remote workstation.

Use the following steps to add files and/or directories to an image object in Image Explorer:

1.   Select the partition and, optionally, the directory in the partition where you want to add the files or directories.

2.   Choose Image→Add Files or Image→Add Directory.

3.   Navigate to the file or directory you want to add to the image and click the Add button.

The files and directories you selected are added to the image.

Use the following steps to create a new directory in an image object from within Image Explorer:

1.   Select the partition and, optionally, the directory in the partition where you want to create the directory.

2.   Choose Image→Add Directory.

3.   Specify the name of the directory, and a new directory is added to the image.

Adding Registry Settings to an Image

Image Explorer also allows you to add a Windows Registry file to an image. This is necessary to add additional Registry entries that may need to be made to keep an image updated. Use the following steps to add a Registry file to an image object from within Image Explorer:

1.   Select the partition.

2.   Choose Image→Add Registry file.

3.   Navigate to the file or directory you want to add to the image and click the Add button.

The files and directories you selected are added to the image. You can remove files from an image; you may also mark files and place them into image sets. These sets consist of a group of files that can then be referenced from the imaging server (for example, place all files in set 1 from image A onto this workstation). By default, all files in the image are included in all sets.

NOTE

When the imaging engine requests an image from the imaging server, it automatically requests all files from the image in set 1.

Excluding Files from an Image Variant File Set

When you create a workstation image object in the directory and associate it with the image file, ZENworks allows you to specify, in the object, which set of files to use. See the discussion on image objects in the section, “Image Object” earlier in the chapter.

Use the following steps to exclude files from a file set:

1.   Select the file in the view window of Image Explorer.

2.   Right-click on the file and select File Sets from the pop-up menu.

3.   Select the set from which you want to exclude the file from the pop-up menu listing sets 1 through 10. The file icon will be grayed out.

     You can also click Edit from the pop-up menu, and a dialog box similar to the one shown in Figure 22.4 is displayed. You can specify which sets you want to exclude the file from. This is much faster if you need to specify multiple file sets to exclude the file from.

FIGURE 22.4 Image Exclude From File Sets dialog in the ZENworks Image Explorer.

image

Resizing Partitions in an Image

ZENworks Image Explorer provides the capability to resize partitions inside an image. After an image is created, it may be necessary at some point to increase or decrease the size of a partition within it.

For example, you may start using workstations with larger disk drives that require larger partitions.

Use the following steps to resize a partition in an image from within ZENworks Image Explorer:

1.   Right-click a partition in the left frame; then click Properties.

2.   Increase or decrease the value in the Original Size text box.

NOTE

The Original Size cannot be decreased to a smaller value than what is in the Minimum Size text box.

Viewing Files Inside an Image

ZENworks Image Explorer also provides the capability to view files inside an image using their original applications. This can be useful if you need to determine what text is contained in configuration files because you do not need to manually extract the file from the image to a new location.

Use the following steps to view files from inside the ZENworks Image Explorer:

1.   Select the File.

2.   Click File→Extract and View.

Compressing a Workstation Image

Another great feature contained in ZENworks Image Explorer is the capability to compress the image by up to 60% of the original file size. This feature provides two benefits. The first is that the image takes up less space on disk. The second is that the image can’t be restored to a workstation faster.

Use the following steps to compress an image from inside the ZENworks Image Explorer:

1.   Click Tools→Compress Image to bring up the image QuickCompress dialog box shown in Figure 22.5.

FIGURE 22.5 The image QuickCompress dialog in the ZENworks Image Explorer.

image

2.   Browse to a folder, specify a new image filename, and then select a compression option:

Image   Optimize for Speed—Takes the least amount of time to compress but creates the largest compressed image file.

Image   Balanced (Recommended)—Represents a compromise between Compression time and image file size. This option is used by default when an image is created.

Image   Optimize for Space—Creates the smallest image file but takes longer to compress.

3.   Click Compress.

NOTE

If you have used Delete to hide files in the image, they are removed from the image during compression.

Splitting a Workstation Image

Another great feature contained in ZENworks Image Explorer is the capability to split an image into smaller split image files. This feature allows you to copy large images to CDs for distribution.

Use the following steps to split an image from inside the ZENworks Image Explorer:

1.   Click Tools→Split Image to bring up the Image Split Settings dialog box shown in Figure 22.6.

FIGURE 22.6 The Image Split Settings dialog in the ZENworks Image Explorer.

image

2.   Specify an existing base image file to split.

3.   Specify the directory in which to store the split images.

4.   Specify the maximum file size of each split image file.

5.   Click Split.

Assigning an Image to a Workstation

Three ways exist in which the workstation automatically discovers the workstation image that it should place onto its hard drive:

Image   The image may be chosen by the imaging server when an unregistered workstation boots the Linux system and contacts the imaging server. The imaging server goes through its rules to determine the image to place on the workstation.

Image   The image may be chosen by the imaging server when a registered workstation boots the Linux system and contacts the imaging server, and the workstation has an associated workstation imaging policy.

Image   If the administrator has configured the workstation object to be associated with a specific image in the directory, when the Linux system is booted and contacts the imaging server, the server looks into the workstation object to see whether it should be re-imaged. If so, it then looks to see whether a specific image file has been specified and sends that file. Otherwise, it performs as described in the preceding option.

Workstation Object

In the workstation object properties, an Image page exists. Within this Image page, you have a couple of settings that you can administer in relationship to the imaging system. The following settings can be applied on the Image page of the workstation object:

Image   Take an Image of This Workstation on the Next Boot—Enables you to specify that on the next reboot of the workstation, the Linux boot system contacts the imaging server and is told to take an image of the workstation. With this field, you also get to specify the name of the image file. The image server saves the image to the specified filename.

Image   Put an Image on This Workstation on the Next Boot—Enables you to signal that the workstation should receive an image on the next boot. When the Linux boot system contacts the imaging server, it is told that it should put down an image. In addition to this field, you can specify the image object that represents the image you want put down on the workstation. Click the Browse button to select the image object in the directory. If no image object is specified, the image server looks for any workstation image policy that may be associated with the workstation. If no workstation image policy is associated with the workstation and the administrator specifies no image, no image is applied to the workstation.

After the workstation reboots and performs the requested action (make or restore an image), these flags are reset so that on the next reboot no work will be done. If the action is not successful, these flags are not reset and continue to cause the action to be requested upon each reboot.

Applying Application Objects to an Image

One of the most significant advancements that ZENworks Desktop Management has over your standard imaging systems is the ability for you to include all the files and software associated with an application object into a workstation image. By performing this function, when the image is placed onto the workstation, all the included application object files are installed with the image. When the workstation boots into the native operating system, these application object files are treated as disconnected applications and are available from the workstation.

See Chapter 11 to understand better how the ZENworks Application Window works.

To apply the application objects to an image you need to perform the following steps. These steps assume that you already have an image object representing some base image and an application object in your tree:

1.   Launch ConsoleOne.

2.   Browse to and select Properties on an application object that you want to include in an image. This application object can be included in any number of images.

3.   Go to the Common tab→Imaging property page.

4.   On the Imaging property page, you can identify the name of the image file by browsing to an existing file (to be overwritten) or by typing in a new filename to be created. It is recommended that you type in a UNC path so that all machines can get to this image instead of having to have a mapped drive to the identified volume.

5.   Select the application object flags at the bottom of the screen that tell the ZENworks Application Window how to handle the application.

6.   Click the Create Image button to have the system create an image representation of the application into the specified image file.

7.   Close the dialog boxes to get back to the main ConsoleOne screen.

8.   Browse to and select the properties of the workstation image object that you want to include the application object.

9.   Go to the Images tab.

10.   Click the Add button on the screen and enter the server name and path to the image file you want to have added to the image.

11.   Click OK to save all the changes and exit ConsoleOne.

Now when the image is applied to a workstation either through the policy or direct association, the base image plus the added image are placed on the workstation.

NOTE

If you update an application object you have to re-create the image file again. You do not have to re-add it to the base image as long as you keep the same image file name.

Re-Imaging a Workstation

You can re-image the workstation (for example, apply a new image on top of the file system) through manual mode with the boot media or through the automatic method. Applying an image does not overwrite the Linux partition or the image-safe data on the hard drive.

You can automatically apply an image by doing the following. This assumes that the workstation is associated with a workstation object and that an image exists in the tree. The steps to accomplish this are

1.   Launch ConsoleOne.

2.   Browse and select Properties on the workstation object associated with the desktop.

3.   Select the Images tab and select Put an Image on This Workstation on the Next Boot and click the Browse button in the Image File field to select an image to apply.

4.   Click OK and exit from ConsoleOne.

5.   Request that the user reboot the workstation.

Advanced Imaging

When the workstation boots the Linux imaging software and you request to go into manual mode, several commands, described in the following sections, are available. You only need to type enough of the command to be unique. The following describes only the minimal keystrokes to get the command functional.

Remember that you are running on top of the Linux operating system and that any normal Linux command is valid on the command line. This enables you freedom to use any command to help in the setup and configuration of the workstation. For example, you can see a listing of files (ls —FC) or mount a drive (mount /dev/hdc /mnt/cdrom). Also any Linux utility that you may have can be run on the workstation.

Accessing the Imaging Engine Command Menu

You can access operations available in the imaging engine from the command menu. To access the command menu use the img command with no parameters, and a menu will be displayed for you to select the operation you want to perform.

Information Commands

The following commands are general-purpose commands that display information about the system:

Image   img help [mode]Displays a screen of help to assist in reminding you about some of the commands. It does not display an exhaustive list of available commands. The optional mode parameters are m, to display information on the Make mode, and p, to display information on the Partition mode. For example:

img help p

Image   img info [zisd]Displays the detected hardware information. This is useful to determine the values for the rules in the policies. The engine sends this information to the imaging server. The optional zisd parameter lists the data currently stored in the image-safe area on the computer and the last base image that was put down to the workstation. For example:

img info zisd

Automation Commands

The auto mode images the computer automatically based on any applicable NDS or eDirectory policies and settings. In this mode, the imaging engine queries the imaging specifies in the PROXYADDR environment variable for any work to do. The imaging server checks the relevant NDS or eDirectory policies and settings to determine which imaging tasks should be performed. The following commands cause the imaging engine to connect to the imaging server and perform any actions specified in NDS or eDirectory:

Image   img autoSends a request to the imaging server to see whether any work needs to be performed. If work must be performed, the imaging server immediately performs the work. The following codes are returned to the Linux shell on completion: 0—no work to perform; 0—successful imaging task completed, no change to the hard drive; 1—successfully received one or more images, the hard drive has been altered; n—other error codes. For example:

img auto

Partition Commands

The following commands deal with manipulation of the partitions on the workstation:

Image   img dumpDisplays the partition information of the hard disk. This command is important because the partition numbers displayed from this command are the partition numbers used as parameters to other advanced imaging commands. For example:

img dump

Image   img dump geoDisplays the partition information of the hard disk and the geometry of the disk. This command is important because the partition numbers displayed from this command are the partition numbers used as parameters to other advanced imaging commands. For example:

img dump geo

Image   img pa<partition number>Makes the specified partition the active partition. The partition number is the partition number returned from the img dump command. For example:

img pa2
img pa1

Image   img pc<partition number> <partition type> [partition size] [cluster=<cluster size>]Creates a partition in an empty slot. The partition number is the partition number returned from the img d command. The command fails if the partition specified is not empty. The partition type must be one of the following: fat12, fat16, fat32, or ntfs. The partition size parameter is optional and represents the number of megabytes requested. If the size is not given, the largest partition size possible for the specified type is created. The cluster size is supported only for NTFS partition types. For the FAT partitions, the cluster size is determined automatically by the size of the partition.

     When a partition is created, the ZENworks imaging engine performs some low-level preformatting. This preformatting process depends on the actual file system being created. It is usually a subset of the formatting process performed on new partitions by the various operating systems, but it is not enough to be recognized as a valid partition by those operating systems. It is only formatted enough to enable the imaging engine to start inserting files into the partition. At least one base image must be applied to the partition before it is recognized by the operating system. Some examples follow:

img pc2 ntfs 500 c8
img pc3 fat32
img pc4 NTFS 2000 cluster=1

Image   img pd<partition number>Deletes the specified partition from the hard drive. For example:

img pd3

Creating Image Commands

The following commands deal with the creation of workstation images:

Image   img makel[partition number] <path> [comp=<comp level>] [x<partition number>]Makes an image of the disk and places it in the local file system. The optional partition number represents the partition where you want to store the image. This specified partition is not included in the image. If no partition is specified, all partitions (except the Linux boot partition) are imaged, and the image is stored on the Linux partition. The path must resolve to a valid path on the system. No directories are automatically created, and any existing file with the same name is overwritten.

     By being able to specify the partition number used to store the image, you can have an attached jaz drive, which shows up as a partition and then stores the image of the hard drive on your removable media. The comp parameter specifies the amount of compression used when storing the image. Valid compression levels are from 0-9, where, 0 is no compression for optimized speed, and 9 means full compression optimized for space. Use 6 to balance between space and speed. The x<partition number> option excludes the partition specified from the image. You can exclude as many partitions as you need to reduce the imaging size and time. Some examples are

img makell2 imgdump.zmg
img makel fulldump
img makel /images/wsdump.zmg comp=6 x2 x3

Image   img makep <imaging server address> <UNCpath> [comp=<comp level>] [x<partition number]Takes an image of the workstation and sends that image to the specified imaging server. This imaging server address is the actual IP address (not the DNS name) of the imaging server. The UNC path is where the image is stored on that imaging server. The path must resolve to a valid path on the system—no directories are automatically created, and any existing file with the same name is overwritten. The UNC must have the format of //server name/dir/dir. . ./filename (make sure that you use the forward slash). If the suffix .ZMG is not specified, it is automatically appended to the filename. The server name is really ignored because the image is sent and stored on the imaging server specified by the IP address. The comp parameter specifies the amount of compression used when storing the image. Valid compression levels are from 0-9, where, 0 is no compression for optimized speed, and 9 means full compression optimized for space. Use 6 to balance between space and speed. The x<partition number> option excludes the partition specified from the image. You can exclude as many partitions as you need to reduce the imaging size and time. The server name may be used at some future release. Some examples follow:

img makep 137.65.203.1 //zen1/vol1/images/dellb.zmg
img makep 137.65.203.254 //zen2/vol2/ibmlaptop
img makep 137.65.79.123 //zen2/vol2/ntws.zmg comp=9 x2

Restoring Image Commands

The following commands deal with the restoring of images onto the workstation. These commands may or may not destroy any previous data on the workstation:

Image   img restorel[partition number] path [s<set number>]Restores an image from the partition and path specified onto the disk. All partitions on the hard disk, other than the Linux partition, are removed prior to the image being placed on the workstation. The optional partition number specifies the partition (as displayed in the img d command) where the image is stored. The path must resolve to a valid image file on the system. If you are restoring from a removable media drive, the partition number is the partition for the jaz or CD-ROM drive. The path must be a valid path and must represent an image file on the specified partition. The optional set number enables you to specify which set of files to include from the image. The sets can be specified in the ZENworks Image Editor program. If the set number is not specified it is assumed that it is set 1. For example:

img restorel2 myimage
img restorel theimage.zmg s2

Image   img restorep <proxy IP address> <UNCpath> [s<set number>]—Rakes an image from the imaging server and puts it on the workstation. The proxy IP address must be the address of the imaging server where the image is stored. You cannot use a DNS name in this field. The UNC path must be a valid path that represents the image file. The path must be in the format //server name/share/dir/dir. . ./filename or //server name/volume/dir/dir. . ./filename. The optional set number enables you to specify which set of files to include from the image. The sets can be specified in the ZENworks Image Editor program. If the set number is not specified, it is assumed that it is set 1. Some examples are as follows:

img restorep 137.65.200.1 //zen9/image/delllaptop.zmg
img restorep 137.65.200.1 //any/image/delllaptop.zmg s2

Advanced Restoring Image Commands

These advanced image restore commands enable you to specify that the partitions on the disk should not be destroyed and how to map the partitions in the image to the partitions on the disk. Additionally, when images are restored, the partitions are automatically resized to fit the archived partition. In these commands, the physical partition can remain larger than the archived partition:

Image   img restorel[partition number] path [s<set number>] a<archive partition>:p<physical partition>Restores an image from the partition and path specified onto the specified partition on disk. This does not destroy the partition but instead takes the archived partition and places its files into the specified partition. Any files already existing on the partition remain; files with the same name are overwritten. The optional partition number specifies the partition (as displayed in the img d command) where the image is stored. The path must resolve to a valid image file on the system. If you are restoring from a removable media drive, the partition number is the partition for the jaz or CD-ROM drive. The path must be a valid path and must represent an image file on the specified partition. The optional set number enables you to specify which set of files to include from the image; the sets can be specified in the ZENworks Image Editor program. If the set number is not specified, it is assumed that it is set 1.

     The a<archive partition>:p<physical partition> enables you to create a mapping between the two drive spaces. You can take archived partition 1 and place it on physical partition 2, for example. You must specify at least one partition mapping to keep from having the default, wipe all partitions, behavior. You may specify as many mappings as are needed, and you may map multiple archive partitions onto a single physical partition. An archive partition cannot be mapped to more than one physical partition. For example:

img restorel2 myimage a1:p2
img restorel3 theimage.zmg s2 a1:p2 a2:p2

Image   img restorep <proxy IP address> <UNCpath> [s<set number>] a<archive partition>:p<physical partition>Takes an image from the imaging server and puts it on the workstation into the specified partition. The proxy IP address must be the address of the imaging server where the image is stored. You cannot use a DNS name in this field. The UNC path must be a valid path that represents the image file. The path must be the format //server name/share/dir/dir. . ./filename or //server name/volume/dir/dir. . ./filename. The optional set number enables you to specify which set of files to include from the image; the sets can be specified in the ZENworks Image Editor program. If the set number is not specified, it is assumed that it is set 1.

     The a<archive partition>:p<physical partition> enables you to create a mapping between the two drive spaces. You can take archived partition 1 and place it on physical partition 2, for example. You must specify at least one partition mapping to keep from having the default, wipe all partitions, behavior. You may specify as many mappings as are needed, and you may map multiple archive partitions onto a single physical partition. An archive partition cannot be mapped to more than one physical partition. For example:

img restorep 137.65.200.1 //zen9/image/delllaptop.zmg
Imagea2:p1
img restorep 137.65.200.1 //any/image/dtop.zmg s2 a2:p2
Imagea3:p2

ZENPartition Commands

You can use the ZENPartition mode to enable, disable, or remove the installed ZENworks Desktop Management imaging partition from the workstation. This allows you to control the behavior of ZENworks imaging on the workstation.

The following commands are available for the ZENPartition mode:

Image   zenPartition enableEnables the ZENworks imaging partition

Image   zenPartition disableDisables the ZENworks imaging partition to stop imaging on the workstation

Image   zenPartition removeRemoves the ZENworks imaging partition from the workstation to permanently stop imaging on it; for example:

img zenPartition enable

Multicast Commands

You can also set up the ZENworks imaging system to perform multicasting of the image. You can set up a single workstation to act as the master and send its hard drive contents to all the participating slave workstations.

You start the multicast session by entering the following on all workstations participating on the session:

img session <session name> [option]

The following options are available for the img session name:

Image   nameThe name of the multicast session that each computer joining the session will use.

Image   master|clientSpecifies whether this client will be the session master or just a client. If you do not use this parameter, the system waits until a master is found.

Image   clients=<count>Specifies the number of computers that must be registered with the master before imaging begins. After imaging begins, computers attempting to register with the session will be denied.

Image   t=<minutes>Specifies the number of minutes the master computer waits for the next participant to register before starting the imaging process without reaching the number of computers specified by the clients option.

The session name must be a unique string to identify this multicast session. The session name string used must be identically entered on all workstations (both master and slave) that are going to participate in the session. This string is used to hash a multicast address, so a small chance exists that two different strings may result in the same multicast address. Multicast addresses are class D IP addresses. To ease wire sniffing, troubleshooting, and LAN traffic analysis, the imaging engine always uses 231 as the first octet in its address.

When started, by entering the img session <name> command, each workstation waits until the user determines which station will act as the master. The master workstation should be the SOURCE workstation; all slave workstations are DESTINATION workstations.

To designate the master workstation, go to the workstation that contains the SOURCE drive. The workstation should have already had the session command started and should be waiting just like all the other workstations. Press the m key on the master workstation. This designates that workstation as the master. At this point, all the other workstations attempt to register with the master and receive a unique session identifier. If for some reason a slave station is rebooted before the session starts, it always receives the same identifier.

When the desired number of stations has registered with the master; the master displays a running count of the number of registered slaves and then starts the session by pressing g on the master workstation. Any station attempting to join the session after the session has started is denied access. This should now transfer the contents of the master to all the slave workstations.

After the session is over, the master workstation displays a list of the stations that did not successfully complete the image.

NOTE

The multicast operations are dependent on the multicast features configured in your network equipment. Possible problems might include the routing of multicast packets not being allowed, stations outside the defined scope of multicast on switches not receiving the packets, and so on.

Script Commands

The following commands perform some type of operation that would normally only be activated when the imaging engine is initially booted in manual mode. These are simple shell scripts that have been created for your convenience and use by the imaging system. Other script files exist, but these are the most useful to you.

Image   /bin/cdrom.sMounts the cdrom drive to /mnt/cdrom.

Image   /bin/config.sEnables you to configure the settings.txt file for the Linux partition.

Image   /bin/imaging.sRuns the imaging engine in auto mode, just like the img a command.

Image   /bin/install.sCreates the Linux partition and installs it onto the hard disk. It removes all partitions unless the Linux partition already exists; then it just updates the files.

Image   /bin/lilo.sInstalls the ZENworks imaging boot manager system, making sure that this system is booted first on the drive.

Summary

This chapter examined the capability of ZENworks to create and deploy images of workstations throughout the network. This can be useful when you set up workstations initially in your organization as well as when you need to restore a workstation to properly functioning status after problems have occurred.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.218.215