N1 Provisioning Server 3.1, Blades Edition, System Administration Guide

Creating and Managing Images from the Command Line

Using the command line, you can perform the following image management tasks:

Task 

Image Format 

Source 

Architecture 

Create 

Disk or flash 

From an existing disk image in the image repository 

Solaris SPARC or x86 

Create 

Disk or flash 

From an existing flash image in the image repository 

Solaris SPARC or x86 

Create 

Disk or flash 

From a JumpStart installation 

Solaris SPARC or x86 

Create 

Disk or flash 

Manual 

Solaris SPARC or x86 

Create 

Disk 

From an existing disk image in the image repository 

Linux x86 

Create 

Disk  

Manual 

Linux x86 

Upgrade 

All 

All 

All 

Import 

Disk or flash 

Preconfigured 

Solaris SPARC or x86 

Import 

Disk 

Preconfigured 

Linux x86 

Import 

Disk, flash, or JumpStart 

All 

Solaris SPARC or x86 

Import 

Disk 

All 

Linux x86 

Import 

All  

All 

All 

Validate 

All 

All 

All 

List 

All 

All 

All 

Update image attributes 

All 

All 

All 

Delete 

All 

All 

All 

The following graphic illustrates the sequence of creating and upgrading a global image:

Figure 3–2 Creating and Updating Global Images from the Command Line

>

Images are available to farms through the Control Center once the Control Center is synchronized. When configuring servers for a farm, you can select global images from a drop-down list as described in the N1 Provisioning Server 3.1, Blades Edition, Control Center Management Guide.


Note –

Before you begin creating global images, ensure that enough storage is available on the N1 Provisioning Server or, if you are using a separate server for storing images, on the image server.


Image Creation Methods and the Steps Involved

The following table summarizes the command line image creation methods supported by the N1 Provisioning Server software.

Table 3–1 Image Creation Methods

Steps 

Creating from JumpStart Setup 

Creating from existing disk, flash, or JumpStart Image 

Prerequisite for this operation. 

Set up a Solaris JumpStart environment. 

Image must exist in the CPDB. 

Run the image -p command on the control plane server. Wait for the command to complete.

Run the image -p -j command on the control plane server. Wait for the command to complete.

Run the image -p -i command on the control plane server. Wait for the command to complete.

Open a terminal window (terminal 1) and logon to the system controller.  

Open a terminal window and logon to the system controller using the system controller ID (admin) and password (admin). 

At the sc prompt type console -f blade-ID to get console access.

Open a terminal window and logon to the system controller using the system controller ID (admin) and password (admin). 

At the sc prompt type console -f blade-ID to get console access.

Open another terminal window (terminal 2) and logon to the system controller to get console access to the resource pool server. 

Open another terminal window and logon to the system controller to get console access to the resource pool server. 

Open another terminal window and logon to the system controller to get console access to the resource pool server. 

From terminal 1 set up the resource pool server to start the installation from the resource layer network. Wait for this operation to complete. 

From terminal 1 set up the resource pool server to start the installation from the resource layer network. 

At the sc prompt type bootmode bootscript="boot net:dhcp" blade -D for x86 architecture or bootmode bootscript="boot net:dhcp - install" blade-ID for SPARC architecture.

Type reset -y blade-ID. Wait for this operation to complete.

 

From terminal 2 logon to the resource pool server.  

From terminal 2 logon to the resource pool server. The default password for root user is root.

 

From terminal 2 shut down the resource pool server.  

From terminal 2 shut down the resource pool server by issuing the command /usr/sbin/shutdown -y -g0-i0 for Solaris.

 

From terminal 1 reboot the resource pool server to boot from disk. Wait for this operation to complete. 

From terminal 1 configure the resource pool server to boot from disk at the system controller prompt by typing bootmode bootscript="boot disk" and reset -y blade-ID. Wait for this operation to complete.

 

From terminal 2 logon to the resource pool server as root user with password root and customize the installation.

 

From terminal 2 logon to the resource pool server as root user with password root and customize the installation.

From terminal 2 customize the resource pool server. 

 

From terminal 2 customize the resource pool server. 

From terminal 2 shut down the resource pool server.  

From terminal 2 shut down the resource pool server by issuing the command /usr/sbin/shutdown -y -g0-i0.

 

From terminal 1 and 2 set up the resource pool server to start installation from the resource layer network. 

If the resource pool server is a SPARC blade, run the following command in OBP from terminal 1: setenv boot-device net:dhcp.

From terminal 2 set up the resource pool server to boot from the resource layer network. 

At the sc prompt type bootmode bootscript="boot net:dhcp" blade-ID

If the resource pool server is a SPARC blade, run the following command in OBP from terminal 1: setenv boot-device net:dhcp.

From terminal 2 set up the resource pool server to boot from the resource layer network. 

At the sc prompt type bootmode bootscript="boot net:dhcp" blade-ID

Run the image -r command.

Run the image -r command.

Run the image -r command.

Creating A Solaris Image from a Preconfigured Image

Before creating an image, use the image -ls command or the Control Center Administration dialog to check whether the image already exists. See the N1 Provisioning Server 3.1, Blades Edition, Control Center Management Guide for details. The N1 Provisioning Server software package comes with a preconfigured Solaris image. Use this image as a basis to create your Solaris image. This section describes how to create a Solaris image from the preconfigured Solaris image provided with the N1 Provisioning Server software product.

Creating a Solaris image involves 11 steps. These steps are performed either on the control plane server or on the resource pool server. The following table describes the sequence of the steps to be performed and on which device you need to perform each step for creating an image:

Table 3–2 Creating a Solaris Image from a Preconfigured Image

Step No. 

Description 

Performed on Server 

Determine the disk type, disk size, server type, and disk controller. 

Control plane server 

Obtain a list of the images. 

Control plane server 

Create a farm with one disk on a resource pool server that contains an appropriate-sized disk using the image —p -i command. Wait for this command to complete.

Control plane server 

Logon to the resource pool server selected by the image —p -i command.

Resource pool server 

Customize the image with any applications and services according to your requirements. 

Resource pool server 

Verify that the N1 Provisioning Server agent is running. 

Resource pool server 

Stop the server. 

Resource pool server 

Configure the server blade to boot from DHCP. 

Control plane server 

Release the farm by running the image —r command.

Control plane server 

10 

Optionally, you can update the image attributes by using the image -u command.

Control plane server 

11 

Delete the farm. 

Control plane server 

ProcedureTo Create a Solaris Image From a Preconfigured Image

Steps
  1. Determine the server type, disk type, disk size, and disk controller by using the following commands:

    /opt/terraspring/sbin/disk -l

    /opt/terraspring/sbin/disk -lv

    /opt/terraspring/sbin/device -l

    The output of these commands is used as a parameter to the image command in subsequent steps.

  2. Obtain a list of images using the image -ls command.

  3. Run the image -p -i command from the N1 Provisioning Server.

    The command creates a farm with one disk on a resource pool server that contains an appropriate-sized disk.

    The image -p -i command for such an image creation procedure takes the form:


    image -p  -i image_name server_type disk_type controller_type disk_size
    

    For example:


    image -p -i solaris9u5sun4ublade-flash  sunfire100s-95-blade local ide 30000000000 

    Note –

    For more detailed information, see the image man page.



    Note –

    In addition, if access to the N1 Provisioning Server DVD or another shared medium is required for software installation, use the -z option to specify this. You can also specify this option to have access to these shared media during new image creation.



    Note –

    The image -p command creates a new farm to be used in creating a new image. The image -p tool exits with information regarding the allocated resource pool server and the farm ID of the farm created. The farm ID is required for the eventual release of the allocated resources using the image -r command (see below). The image -r command releases the image, reactivates the farm, and completes the image creation process.


  4. Logon to the resource pool server selected by the image -p -i command.

  5. Customize the image with applications and services according to your requirements.


    Note –

    To find out which resource pool server is mapped to the farm that was created by the image -p command, type device -l.


  6. Verify that the N1 Provisioning Server agent is running by typing from the resource pool server:


    ps -aef | grep tspragt IP-address-of-server-used-to-create-image
    "tsprnop IP-address-of-server-used-to-create-image"

    The output from the ps command should look similar to the following:


    root 361  1 1 00:37:41 ? 0:01 java-Dsun.net.inetaddr.ttl=0 
    com.terraspring.mon.client.tspragt start 220.240
  7. Stop the resource pool server by typing:

    /usr/sbin/shutdown -y -g0 -i0 for Solaris

    /sbin/shutdown —h now for Linux

  8. Configure the server blade to boot from DHCP.

    • For SPARC, at the OBP prompt type:

      setenv boot-device net:dhcp


      Note –

      x86 servers boot from DHCP by default.


  9. Run the image -r command from the N1 Provisioning Server.

    This command releases the farm you created with the image —p command. Releasing the farm includes the following:

    • Taking a snapshot of the image. The snapshot serves as the new image you have just created.

    • Releasing the resource pool server to the resource pool.

    • Updating the N1 Provisioning Server database with a reference to the image.


    image -r -f farm_ID -S image_size -i image_name -T archive-type
    

    For example:


    image -r -f 171 -S 3000000000 -i new_solaris_image -T flash-image

    Note –

    If, after starting the image -r command, a replaceFailedDevice request is queued. You must delete this request for the image creation process to complete successfully. Run the request -l command to get the request ID, then use the request -d request_ID command to do delete the request.


  10. Optionally, you can update the image attributes by using the image -u command.

  11. Delete the farm by typing farm -Df farm-ID.

    Example:


    farm -Df 171

Make the Image Available to Accounts

To make the image available to accounts, use the Administration dialog of the Control Center to synchronize the Control Center with the CPDB. See the N1 Provisioning Server 3.1, Blades Edition, Control Center Management Guide for details.

Creating a Solaris Image Manually from JumpStart

Before creating an image, use the image -ls command or the Control Center Administration dialog to check whether the image already exists. See the N1 Provisioning Server 3.1, Blades Edition, Control Center Management Guide for details.

Creating a Solaris image requires setting up a JumpStart server. This section describes how to create a Solaris image using a JumpStart server.

Creating a Solaris image using JumpStart involves 14 steps. These steps are performed either on the control plane server or on the resource pool server. The following table describes the sequence of the steps to be performed and on which device you need to perform each step for creating an image:

Table 3–3 Creating a Solaris Image from JumpStart

Step No. 

Description 

Performed on Server 

Determine the disk type, disk size, server type, and disk controller. 

Control plane server 

Set up a JumpStart installation server using DHCP. 

Control plane server 

Customize the boot and configuration JumpStart servers for either SPARC or x86 architectures. 

 

Create a farm with one disk on a resource pool server that contains an appropriate-sized disk using the image -p -j command.

Control plane server 

Logon to the chassis that contains the resource pool server. 

Resource pool server 

Logon to the SSC. 

Resource pool server  

Log onto the resource pool server and verify that the N1 Provisioning Server agent is running. 

Resource pool server 

Customize the image. 

Resource pool server 

Stop the resource pool server. 

Resource pool server 

10 

Configure the server blade to boot from DHCP. 

Resource pool server 

11 

Logon to the SSC to set the boot mode for the resource pool server. 

Resource pool server 

12 

Release the farm by running the image —r command.

Control plane server 

13 

Optionally, you can update the image attributes by using the image -u command.

Control plane server 

14 

Delete the farm. 

Control plane server 

ProcedureTo Create a Solaris Image Manually From JumpStart

Steps
  1. Determine the server type, disk type, disk size, and disk controller by using the following commands:

    /opt/terraspring/sbin/disk -l

    /opt/terraspring/sbin/disk -lv

    /opt/terraspring/sbin/device -l

    The output of these commands is used as a parameter to the image command in subsequent steps.

  2. Set up a JumpStart installation Server.

    See Creating the JumpStart Setup.

  3. Customize the boot and configuration JumpStart servers appropriately for SPARC and x86 architectures.

    See Customizing the JumpStart Boot and Configuration Server.

  4. Run the image -p -j command from the N1 Provisioning Server.

    The command creates a farm with one disk on a resource pool server that contains an appropriate-sized disk.

    The image -p -j command for such an image creation procedure takes the form:


    image -p -j JumpStart_options_file server_type disk_type controller_type disk_size
    

    For example:


    image -p -j /image/jumpstart/js-options sunfire100s-95-blade local ide 30000000000 

    Note –

    For more detailed information, see the image man page.



    Note –

    In addition, if access to the N1 Provisioning Server DVD or another shared medium is required for software installation, use the -z option to specify this. You can also specify this option to have access to these shared media during new image creation.


    Use the -j option to specify the path to a file containing the DHCP name/value pairs pertinent to the Solaris SPARC JumpStart server. This file might look like the following:


    SinstNM image-server
    SinstIP4 10.42.42.1 
    SinstPTH /images/s9u5s
    SrootNM image-server
    SrootIP4 10.42.42.1
    SrootPTH /images/s9u5s/Solaris_9/Tools/Boot 
    SsysidCF 10.42.42.1:/images/jumpstart/sun4ublade
    SjumpsCF 10.42.42.1:/images/jumpstart

    The file contains one option pair per line. The Solaris DHCP server options are required and they are typically furnished by the add_install_client tool (when used with the -d option) for configuring a JumpStart client. See alsoCreating the JumpStart Setup for an example of setting up a JumpStart server and running the add_install_client script.


    Note –

    The image -p command creates a new farm to be used in creating a new image. The farm attempts to activate but will fail because no image has yet been installed on the server. The image -p tool exits with information regarding the allocated resource pool server and the farm ID of the farm created. The farm ID is required for the eventual release of the allocated resources using the image -r command (see below). The image -r command releases the image, reactivates the farm, and completes the image creation process.


    The image command sets up a resource pool server of the type requested. When the resource pool server is ready, you are notified to connect to the server through the console to initiate the JumpStart installation.

  5. Logon to the system controller of the chassis that contains the resource pool server through telnet.


    Note –

    To find out which resource pool server is mapped to the farm that was created by the image -p command, type device -l.



    Note –

    If you are using the postinstall.sh script and customizing the JumpStart boot and configuration servers, the DHCP client configuration and the N1 Provisioning Server agent installation onto the resource pool server are completed. If you are not using the postinstall.sh script, see Customizing the Resource Pool Server Manually.


  6. Logon to the blade's SSC to set up the resource pool server to start installation type:

    For SPARC architecture:

    bootmode bootscript="boot net:dhcp - install" blade-ID

    reset -y blade-ID

    For x86 architecture:

    bootmode bootscript="boot net:dhcp" blade-ID

    reset -y blade-ID

    This command initiates the JumpStart installation, if the DHCP parameters you provided in previous steps are correct.


    Note –

    If the resource pool server does not boot from disk, from the system controller type:

    bootmode bootscript="boot disk" blade blade-ID

    reset -y


  7. Optionally, you can customize the image with applications and services according to your requirements. To customize the image logon to the resource pool server as root.

  8. Verify that the N1 Provisioning Server agent is running by typing:


    ps -aef | grep tspragt IP-address-of-server-used-to-create-image
    "tsprnop IP-address-of-server-used-to-create-image"

    The output from the ps command should look similar to the following:


    root 361  1 1 00:37:41 ? 0:01 java-Dsun.net.inetaddr.ttl=0 
    com.terraspring.mon.client.tspragt start 220.240
  9. Stop the server by typing:

    /usr/sbin/shutdown -y -g0 -i0 for Solaris

    /sbin/shutdown -h now for Linux

  10. Configure the server blade to boot from DHCP.

    • For SPARC, at the OBP prompt type:

      setenv boot-device net:dhcp


      Note –

      x86 servers boot from DHCP by default.


  11. Logon to the blade's SSC to set the boot mode for the blade to boot from DHCP:

    bootmode bootscript="boot net:dhcp" blade-ID

    reset -y blade ID

  12. Run the image -r command from the N1 Provisioning Server.

    This command releases the farm you created with the image —p command. Releasing the farm includes the following:

    • Taking a snapshot of the image. The snapshot serves as the new image you have just created.

    • Releasing the resource pool server to the resource pool.

    • Updating the N1 Provisioning Server database with a reference to the image.


    image -r -f farm_ID -S image_size -i image_name -T archive-type
    

    For example:


    image -r -f 171 -S 3000000000 -i new_solaris_image -T flash

    Note –

    If, after starting the image -r command, a replaceFailedDevice request is queued. You must delete this request for the image creation process to complete successfully. Run the request -l command to get the request ID, then use the request -d request_ID command to do delete the request.


  13. Optionally, you can update the image attributes by using the image -u command.

  14. Delete the farm by typing farm -Df farm-ID.

Make the Image Available to Accounts

To make the image available to accounts, use the Administration dialog of the Control Center to synchronize the Control Center with the CPDB. See the N1 Provisioning Server 3.1, Blades Edition, Control Center Management Guide for details.

Creating a Linux Image Manually

For details on how to manually create a Linux image, see the N1 Provisioning Server 3.1, Blades Edition, Release Notes.

Upgrading Images

You might want to upgrade an image with patches or software packages. This section describes how to upgrade images. Upgrading images involves the same steps and commands as are used for creating images, except that you use the -i image_name option with the image -p command.


Note –

When you upgrade an image, a copy of the original image is placed onto a new disk to allow you to upgrade the newly copied image. Before releasing the new image using the image -r command, you must give the new image a unique name.


ProcedureTo Upgrade Images

Steps
  1. Obtain a list of the images using the command:


    image -ls
    IMAGE_ID  IMAGE_NAME        CUSTOMER    DISK_VOL_ID  SIZE    OS
    2	         solaris	           __grid__   22001/5       8631   Solaris
    1087      solaris_dhcpfix    __grid__   22001/22      8631   Solaris
  2. Type the following command:


    image –p [-z] [-i image_name] server_type disk_type controller_typ disk_size
    

    For example:


    image -p –z –i master_image sun_svr_420R local ide 30004789248

    Note –

    If access to the N1 Provisioning Server DVD or other shared media is required for software installation, use the -z option to specify this.


  3. Logon to the resource pool server.

  4. Modify the image according to your requirements, such as updating the N1 Provisioning Server monitoring package. See Upgrading the N1 Provisioning Server Agent of an Image for more information.

  5. Run the image —r command from the control plane server.

    This command releases the farm you created with the image —p command. Releasing the farm includes the following:

    • Taking a snapshot of the image. The snapshot serves as the new image you have just created.

    • Releasing the resource pool server to the resource pool.

    • Updating the N1 Provisioning Server database with a reference to the image.


    image -r -f farm_ID [-S image_size] -i image_name
    

    For example:


    image -r -f 171 -S 9050849280 -i image_name

    The value of the farm-ID option is the ID of the farm you created using the image —p command in step 3.

  6. Delete the farm by typing:

    farm -Df farm-ID

Upgrading the N1 Provisioning Server Agent of an Image

You can upgrade the monitoring software of an image at any time.

ProcedureTo Upgrade the N1 Provisioning Server Agent Package of an Image

Steps
  1. Use TFTP to get the agent package from the control plane server.


    Note –

    If you are running the JumpStart post installation script postinstall.sh, skip this step.



    cd var/tmp
    tftp>cp
    tftp>binary
    tftp>get TSPRagsol.pkg
    Received 456704 bytes in 0.4 seconds 
    tftp>quit
    
  2. Type the command pkgrm old-package-name.

  3. Type the command pkgadd -d new-package-name.

Importing Images

The N1 Provisioning Server supports importing preconfigured and manually created image from the command line.

ProcedureTo Import Preconfigured Images

Use the image -c command to import preconfigured images. The -c option creates a server image entry in the database.

Before You Begin

Ensure that the image contents are accessible on an NFS-shared directory on the image server.

Ensure that enough storage is available on the N1 Provisioning Server or, if you are using a separate server for storing images, on the image server.


Note –

Preconfigured images are packaged with the N1 Provisioning Server agent and other configurations. Do not use the -n option with the image -c command because it will set the image to a non-deployable state.


Step
  1. Type image -c


Example 3–5 Importing an Image


image -c -s -L nfs://3001/image/s9u5-img -S 4096M -A sun4ublade 
-o solaris s9u5-js 'Solaris 9 update 5 jumpstart for sparc blades' 

In the example, an image is created and imported with the name s9u5-img, the size 4096MB, located at device 3001 in the directory path /images/s9u5-js. The image is for the sun4ublade architecture.


ProcedureTo Import JumpStart Images

Steps
  1. Set up the JumpStart server.

    See Creating the JumpStart Setup.

  2. Customize the boot and configuration JumpStart servers.

    See Customizing the JumpStart Boot and Configuration Server.

  3. Use the following command to import the JumpStart environment into the N1 Provisioning Server environment:

    image -c -s -n -L nfs://3001/images/jumpstart -S image size -A sun4ublade -O solaris -T jumpstart -P /images/jumpstart/dhcp-options.txt sun4ublade-js-image "*description*"

    Example:


    image -c -s -n -L nfs://3001//images/jumpstart-3 -S 1 -A sun4ublade -O solaris 
    -T jumpstart -P dhcp-options.txt solaris-jumpstart-validate-img "Jumpstart validation desc" 
    Created server image: 92  

    Note –

    The image locator URL must be unique. The -n option is required.


    This operation will create a new image in a non-deployable state. You need to validate the image before you can deploy the image to a farm.

Validating Images

ProcedureTo Validate a Solaris JumpStart Image

Validating an image puts the image in a deployable state.

Steps
  1. Import the JumpStart image as described in Importing Images.

  2. Customize the boot and configuration JumpStart servers as described in Customizing the JumpStart Boot and Configuration Server.

  3. Obtain a list of images by using the image -ls command.

  4. Use the following command to validate the image:

    image -C -i image_name server_type disk_type controller_type disk_size

    Example:


    image -C -i solaris-jumpstart-validate-img sunfireb100s-95-blade local ide 3004789248 

    The following shows the output of the image -l command before image validation:


    image -l
    IMAGE_ID IMAGE_NAME                      CUSTOMER  SIZE    OS               TYPE          STATE     
    3        sw@50150                        __grid__  19809                    disk_image    READY  
    92       solaris-jumpstart-validate-img  __grid__  1       solarisjumpstart               NOT READY 
    LOCATION nfs://3001//images/jumpstart-3

    The following shows the output of the image -l command after image validation:


    image -l
    IMAGE_ID IMAGE_NAME                     CUSTOMER  SIZE    OS   TYPE          STATE     
    92       solaris-jumpstart-validate-img __grid__  1       solarisjumpstart   READY 
    LOCATION nfs://3001//images/jumpstart-3

Listing Images from the Command Line

The image command provides several options for listing images from the command line:

ProcedureTo List all Images in the Image Repository

Step
  1. Type image -l at the command line.

    Example output:


    IMAGE_ID  IMAGE_NAME                   CUSTOMER  SIZE        OS       TYPE       STATE   
    7         solaris9u5-sun4ublade-flash  __grid__  28000000000 solaris  flash      READY 
    LOCATION: nfs://3001//images/master-images/solaris9u5-sun4ublade-flash
    8         solaris9u5-i86pc-flash       __grid__  30000000000 solaris  flash      READY 
    LOCATION: nfs://3001//images/master-images/solaris9u5-i86pc-flash
    9        js-x86-test-img                __grid__ 30000000000 solaris jumpstart   READY     
    LOCATION: nfs://3001/images/jumpstartx-GA
    10       sw@50150                       __grid__ 19807               disk_image  READY
    11       js-sparc-test-img              __grid__ 30000000000 solaris jumpstart   READY     
    LOCATION: nfs://3001/images/jumpstarts-GA
    13       s9u5-x86-disk-jstest-img       __grid__ 30000000000 unknown disk_image  READY 
    LOCATION: nfs://3001/images/master-images/s9u5-x86-disk-jstest-img
    16       s9u5-jumpstart-test            __grid__ 30000000000 solaris jumpstart   READY     
    LOCATION: nfs://3001/images/jumpstart

ProcedureTo List a Single Image by Specifying its ID

Step
  1. Type image -lv image-ID at the command line.

    Example output:


    IMAGE_ID IMAGE_NAME                CUSTOMER  SIZE         OS       TYPE         STATE     
    13       s9u5-x86-disk-jstest-img  __grid__  30000000000  unknown  disk_image   READY 
    LOCATION: nfs://3001/images/master-images/s9u5-x86-disk-jstest-img
    
    Description:   s9u5-x86-disk-jstest-img
    Architecture:  i86pc
    Last Updated:  2004-02-09 13:48:19.0
    
    Image Locations:
         ID    STATE     SIZE             LOCATION
         58    done      699981071 

ProcedureTo List Detailed Information about a Single Image by Specifying its ID

Step
  1. Type image -lV image-ID at the command line.

    Example output for a flash archive image:


    IMAGE_ID IMAGE_NAME                   CUSTOMER  SIZE         OS       TYPE    STATE    
    7        solaris9u5-sun4ublade-flash  __grid__  28000000000  solaris  flash   READY 
    LOCATION: nfs://3001//images/master-images/solaris9u5-sun4ublade-flash
    
    Description:   solaris9u5-sun4ublade-flash
    Architecture:  sun4ublade
    Last Updated:  2004-02-09 13:52:26.0
    
    Image Locations:
         ID    STATE     SIZE             LOCATION
         7     done      759291924 
    nfs://3001//images/master-images/solaris9u5-sun4ublade-flash
    Image Contents:
    ===============================================
    partitioning explicit
    filesys any free /

    Example output for a JumpStart image:


    IMAGE_ID IMAGE_NAME          CUSTOMER    SIZE          OS        TYPE         STATE     
    9        js-x86-test-img     __grid__    30000000000   solaris   jumpstart    READY    
    LOCATION: nfs://3001/images/jumpstartx-GA
    
    Description:   Testing validation of image
    
    Architecture:  i86pc
    Last Updated:  2004-02-08 10:25:28.0
    
    Image Locations:
         ID    STATE     SIZE             LOCATION
         9     done      512              nfs://3001/images/jumpstartx-GA
    Image Contents:
    ===============================================
    SinstNM 10.42.42.1
    SinstIP4 10.42.42.1
    SinstPTH /images/s9u5x
    SrootNM 10.42.42.1
    SrootIP4 10.42.42.1
    SrootPTH /images/s9u5x/Solaris_9/Tools/Boot
    SsysidCF 10.42.42.1:/images/jumpstartx-GA
    SjumpsCF 10.42.42.1:/images/jumpstartx-GA
    BootFile nbp.SUNW.i86pc
    SbootURI tftp://10.42.42.1/SUNW.i86pc

Updating Image Attributes from the Command Line

If you upgrade an image, the image attributes should reflect any upgrades you have made.

With the image -u command, you can update the following attributes:

Command usage: image -u -N image name -S image size -A architecture- O operating sytem -U image description -T image archive type -P configuration file image ID


Note –

For any image, except for a disk image, if you specify the -T option, you must also specify the -P option.



Example 3–6 image -u Command


image -u -S 3000000000 101

You can specify a new disk layout for a global flash image using the image -u command. You can view the default disk layout in the output of the image -lV command:


image -lV 16
IMAGE_ID IMAGE_NAME                   CUSTOMER  SIZE       OS       TYPE   STATE    
16       solaris9u5-sun4ublade-flash  __grid__  3200000000 solaris  flash  READY    
LOCATON:  nfs://3001//images/master-images/solaris9u5-sun4ublade-flash

Description:   solaris9 update 5 flash image for sun4ublade with Cassini NIC
Architecture:  sun4ublade
Last Updated:  2004-02-13 23:35:53.0

Image Locations:
    ID    STATE     SIZE             LOCATION
    16    done      759291924        
nfs://3001//images/master-images/solaris9u5-sun4ublade-flash
Image Contents: 
===============================================
partitioning explicit
filesys any free /

===============================================

Create a new layout file with the following contents:


/var/tmp/newdisklayout.sun4ublade
partitioning explicit 
filesys any 8096 / 
filesys any free /export 

Then run the command:


image -u -P /var/tmp/newdisklayout.sun4ublade 16 
Updated image: 16  
image -lV 16 
IMAGE_ID IMAGE_NAME                   CUSTOMER  SIZE       OS       TYPE   STATE   
16       solaris9u5-sun4ublade-flash  __grid__  3200000000 solaris  flash   READY    
LOCATION: nfs://3001//images/master-images/solaris9u5-sun4ublade-flash  

Description:   solaris9 update 5 flash image for sun4ublade with Cassini NIC 
Architecture:  sun4ublade 
Last Updated:  2004-02-13 23:35:53.0  

Image Locations:    
ID    STATE     SIZE      LOCATION     
16    done      759291924  nfs://3001//images/master-images/solaris9u5-sun4ublade-flash 
Image Contents:  
=============================================== 
partitioning explicit 
filesys any 8096 / 
filesys any free /export  
===============================================

ProcedureTo Update Image Attributes from the Command Line

Steps
  1. Obtain a list of the images using the command:


    image -ls
    IMAGE_ID  IMAGE_NAME       CUSTOMER   DISK_VOL_ID  SIZE   OS
    2	         solaris          __grid__   22001/5      8631   Solaris
    1087      solaris_dhcpfix  __grid__   22001/22     8631	 Solaris
  2. Run the image -u command with the options of the attributes you want to update.


    image -l 22
    IMAGE_ID IMAGE_NAME  CUSTOMER   SIZE        OS       TYPE        STATE       
    22       js-sample   __grid__   30000000000 unknown  disk_image  NOT READY  
    LOCATION: nfs://3001/images/master-images/js-sample
    image -u -S 40000000000 22
    Updated image: 22
    image -l 22
    IMAGE_ID IMAGE_NAME  CUSTOMER   SIZE        OS       TYPE        STATE      
    22       js-sample    __grid__  40000000000 unknown  disk_image  NOT READY  
    LOCATION: nfs://3001/images/master-images/js-sample

Deleting Images

When you delete snapshots and images from the Control Center, they are only marked as deleted; they are not yet deleted from the image server and the I-Fabric. Until you delete them from the image server and the I-Fabric, you will not be able to create snapshots and images with the same names as the ones marked as deleted.

To purge snapshots and images from the image server and the I-Fabric, type the image -lR command from the control plane server to view a list of the images marked as deleted, then execute the image -d command to delete them from the I-Fabric.

ProcedureTo Delete Images

Steps
  1. Obtain a list of the images using the image command:


    image-ls
    

    Example output when listing images:


    IMAGE_ID  IMAGE_NAME           CUSTOMER  SIZE        OS        STATE	
    1	         solaris8-blade-3001  __grid__	3004789248  solaris8  READY	
    LOCATION: nfs://3001//images/master-images/solaris8-blade 
    2         solaris8-blade-3002	__grid__	3004789248  solaris8  READY	
    LOCATION: nfs://3002//images/master-images/solaris8-blade 
    3	         solaris8-blade-3003	__grid__	3004789248  solaris8  READY	
    nfs://3003//images/master-images/solaris8-blade 
  2. Type one of the following commands to delete the image:


    image -d {-s | customer_name} [-L URL] name
    

    image -d [-L URL] image ID
    

    For example:


    image -d -s js-sample-new
    Delete system image js-sample-new (y/n)? y
    Queueing request to delete image ...
    Request (id: 1633) submitted.
    Waiting for request 1633 to complete...
    .
    Deleting image content at: nfs://3001/images/master-images/js-sample size: 0 ip: 10.2.2.1   
    State: created

    The image -d command deletes an image from the image server and removes the entry for that image from the CPDB. It also scrubs and frees the disk. You then use the Administration dialog of the Control Center to synchronize the Control Center with the CPDB. See the N1 Provisioning Server 3.1, Blades Edition, Control Center Management Guide for details.