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 |
---|---|---|
1 |
Determine the disk type, disk size, server type, and disk controller. |
Control plane server |
2 |
Obtain a list of the images. |
Control plane server |
3 |
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 |
4 |
Logon to the resource pool server selected by the image —p -i command. |
Resource pool server |
5 |
Customize the image with any applications and services according to your requirements. |
Resource pool server |
6 |
Verify that the N1 Provisioning Server agent is running. |
Resource pool server |
7 |
Stop the server. |
Resource pool server |
8 |
Configure the server blade to boot from DHCP. |
Control plane server |
9 |
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 |
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.
Obtain a list of images using the image -ls command.
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 |
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.
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.
Logon to the resource pool server selected by the image -p -i command.
Customize the image with applications and services according to your requirements.
To find out which resource pool server is mapped to the farm that was created by the image -p command, type device -l.
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 |
Stop the resource pool 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.
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 |
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.
Example:
farm -Df 171 |