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 |
---|---|---|
1 |
Determine the disk type, disk size, server type, and disk controller. |
Control plane server |
2 |
Set up a JumpStart installation server using DHCP. |
Control plane server |
3 |
Customize the boot and configuration JumpStart servers for either SPARC or x86 architectures. | |
4 |
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 |
5 |
Logon to the chassis that contains the resource pool server. |
Resource pool server |
6 |
Logon to the SSC. |
Resource pool server |
7 |
Log onto the resource pool server and verify that the N1 Provisioning Server agent is running. |
Resource pool server |
8 |
Customize the image. |
Resource pool server |
9 |
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 |
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.
Set up a JumpStart installation Server.
Customize the boot and configuration JumpStart servers appropriately for SPARC and x86 architectures.
See Customizing the JumpStart Boot and Configuration Server.
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 |
For more detailed information, see the image man page.
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.
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.
Logon to the system controller of the chassis that contains the resource pool server through telnet.
To find out which resource pool server is mapped to the farm that was created by the image -p command, type device -l.
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.
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.
If the resource pool server does not boot from disk, from the system controller type:
bootmode bootscript="boot disk" blade blade-ID
reset -y
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.
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 |
Stop the server by typing:
/usr/sbin/shutdown -y -g0 -i0 for Solaris
/sbin/shutdown -h now for Linux
Configure the server blade to boot from DHCP.
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
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 |
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.
Optionally, you can update the image attributes by using the image -u command.
Delete the farm by typing farm -Df farm-ID.