Sun N1 System Manager 1.3 Operating System Provisioning Guide

Provisioning the Solaris 10 Operating System

This section explains how to use the N1 System Manager command-line interface to provision the Solaris 10 OS. The process for provisioning the Red Hat Linux and SUSE Linux operating systems is similar.


Tip –

You can also perform some provisioning steps from the browser interface. These steps are identified in the following procedure, along with information about where to access those features from within the browser interface. For detailed information about performing tasks in the browser interface, view the N1 System Manager online help.


ProcedureTo Provision the Solaris 10 OS

Before You Begin
Steps
  1. Copy the Solaris 10 OS ISO file to the management server.


    N1-ok> create os os-name file file-location
    

    See To Copy an OS Distribution From ISO Files or To Copy an OS Distribution From CDs or a DVD for more information.


    Note –

    This operation is CPU intensive and might take several minutes to complete.


    A default OS profile is created on the management server. For Solaris and Linux systems, the default profile is optimized for Sun Fire V20z systems. To view the list of OS profiles, type show osprofile all.

  2. (Optional) Set up a flash archive file on the management server.

    See To Copy a Flash Archive to the Management Server.

  3. (Optional) Create a custom post-installation script on the management server to add a host.

    The following sample script is named /etc/sysconfig/network-scripts/add-solaris-host. This script adds a host to the /etc/hosts file on a managed server.


    echo "129.10.12.101 myhost" >>/a/etc/hosts
  4. (Optional) Customize the default OS profile to use a flash archive and a post-installation script.


    N1-ok> set osprofile osprofile-name flar flar
    

    The flar attribute value is the full path and flash archive file name, for example, /jumpstart/Flash/archive1.flar.


    N1-ok> add osprofile osprofile-name script script type type
    

    The script attribute value is the full path and script file name, for example, /etc/sysconfig/network-scripts/add-solaris-host.

    The type attribute specifies the time when the custom script will run during the installation. Valid values for the type attribute are:

    • pre – Run the script before the installation (for example, drivers).

    • post – Run the script after the installation.

    The OS profile is modified to use the designated post-installation script and the flash archive file.

  5. To use the browser interface to perform the rest of the provisioning procedure, you might want to perform the following two steps:

    1. Show the drag-and-drop OS profile icon on the Dashboard tab.

      1. On the Task Shortcuts pane, click the Edit List button beneath the OS Profiles list.

        The list of available OS profiles appears.

      2. Select the relevant check box and click OK.

        The selected OS profile is added to the Task Shortcuts pane.

    2. (Optional) Connect to the serial console of the managed server.

      1. Choose All Servers from the View Selector menu.

        The Servers table appears.

      2. Select the server for which you want to launch a serial console.

        The Server Details page appears.

      3. Choose Open Serial Console from the Actions menu.

        The serial emulator appears.

  6. Load the OS profile on a server or server group.

    • To load the OS profile on a server, use the following command:


      N1-ok> load server server-name osprofile profile-name networktype=static ip=ip-address
      

      Note –

      The networktype attribute must be set to static for Solaris profile installations. See Table 2–2 and load server in Sun N1 System Manager 1.3 Command Line Reference Manual for details.


      The ip attribute specifies the static IP to assign to the provisioned server.

    • To load the OS profile on a server group, use the following form of the command:


      N1-ok> load group group-name osprofile osprofile-name [excludeserver=ip-address-range] 
      networktype=static ip=ip-address-range
      

      The optional excludeserver attribute enables you to exclude specified IP addresses from the load operation. For the excludeserver and ip attributes, you can provide a list of addresses, separated by commas, or a range of addresses, specified with a hyphen.


    Tip –

    You can also load the OS profile from the browser interface. To do so, drag and drop the OS profile icon from the Task Shortcuts pane to a server or server group. The Load OS Profile wizard appears. Follow the steps on the screen to load the OS profile.


  7. View the job status.


    N1-ok> show job job-number
    

    Tip –

    You can also track the progress of the OS profile installation from the browser interface. To do so, use one of the following methods:

    • Launch the Serial Console window and view its output.

    • Click the Jobs tab to view the OS Load job, and click the Job ID for details.

    • Click the Event Log tab to view any events generated by the job.



Example 2–1 Provisioning the Solaris 10 OS through the Command Line

For the following example, assume that you have created a Solaris 10 OS on x86 platform flash archive file named archive1.flar and that you have created a post-installation script called add-host. Your management server is also assumed to be running the Solaris 10 OS on x86 platform software.

The following example shows how to copy an OS distribution from the /tmp/solarisdvd.iso file.


N1-ok> create os solaris_ver10 file /tmp/solarisdvd.iso
Job "1" started.

The following example shows how to add a line to the /etc/dfs/dfstab file, below the last comment, which creates the /jumpstart/Flash directory.


# vi /etc/dfs/dfstab

# Put custom additions below (Do not change/remove this line)
share -F nfs -o ro,anon=0 -d "Flash Share" /jumpstart/Flash

The following example shows how to copy the flash archive to the /jumpstart/Flash directory.


# cp /tmp/archive1.flar /jumpstart/Flash/

The following example shows how to restart NFS.


# /etc/init.d/nfs.server stop
# /etc/init.d/nfs.server start

The following example shows how to create an OS profile that uses the flash archive.


N1-ok> create osprofile solaris_ver10 rootpassword admin 
flar /jumpstart/Flash/archive1.flar
description "solaris 10with flar" os solx86
Job "2" started. 

The following example shows how to add a swap partition to the OS profile.


N1-ok> add osprofile solaris_ver10 partition swap sizeoption fixed size 2048 
device c1t1d0s1 type swap

The following example shows how to add a root partition to the OS profile.


N1-ok> add osprofile solaris_ver10 partition / sizeoption free device 
c1t1d0s0 type ufs

The following example shows how to add a post-installation script to the OS profile.


N1-ok> add osprofile solaris_ver10 script 
/etc/sysconfig/network-scripts/add-host type post

The following example shows how to load the OS profile on a server group with the name devgroup.


N1-ok> load group devgroup osprofile solaris_ver10 
excludeserver=192.168.73.205,192.168.73.31,192.168.73.14 
networktype=static ip=192.168.72.201-192.168.73.214
Job "3" started.

The excludeserver attribute excludes the specified IP addresses from the load operation. The networktype attribute specifies the static IP range to assign to the provisioned servers.

The networktype attribute must be set to static for Solaris profile installations. See Table 2–2 and load server in Sun N1 System Manager 1.3 Command Line Reference Manual for details.

The following example shows how to view the job status. The number 3 in this example is the number of the job that was started in the preceding load group example.


N1-ok> show job 3
Job ID:   3
Date:     2005-06-01T13:11:46-0600
Type:     OS Load
Status:   Completed (2005-06-01T13:11:59-0600)
Command: 	 load group devgroup osprofile solaris_ver10 
excludeserver=192.168.73.205,192.168.73.31,192.168.73.14 
networktype=static ip=192.168.72.201-192.168.73.214Owner:    root
Errors:   0
Warnings: 0

Troubleshooting

OS Distributions and Deployment in Sun N1 System Manager 1.3 Troubleshooting Guide

See Also
Next Steps

To Add the OS Monitoring Feature in Sun N1 System Manager 1.3 Discovery and Administration Guide