Sun N1 System Manager 1.3 Operating System Provisioning Guide

Managing OS Profiles

This section describes the following tasks:

Creating, Listing, and Modifying OS Profiles

OS profiles specify the following information:

After you have copied an OS distribution, the N1 System Manager automatically creates an OS profile of the same name on the management server. This OS profile is also called a default OS profile. See Default OS Profiles for parameter settings and best practices for customizing OS profiles.

To view details of a default OS profile, use the show command with the osprofile keyword.

To create a new OS profile, use the create osprofile, add osprofile, and set osprofile commands. See Example 2–6 and Example 2–7 for command-line examples.

Default OS Profiles

When you copy an OS distribution, a default OS profile is automatically created for the OS distribution. The default profile is created for a typical Sun Fire V20z server, and it is mainly provided as an example. Settings for the default OS profiles are described in the following table.

Table 2–1 Default OS Profile Parameter Settings

Parameters 

Solaris OS 

Red Hat OS 

SUSE OS 

Root password 

admin

admin

admin

Language 

U.S. English 

U.S. English 

U.S. English 

Time zone 

Greenwich Mean Time (GMT) 

Greenwich Mean Time (GMT) 

Greenwich Mean Time (GMT) 

Partitions 

  • Root mount point ufs with a free file system size option on the c1t1d0s0 slice

  • swap mount point 2048-Mbyte swap on the c1t1d0s1 slice

  • Root mount point ext3 with a free file system size option on the sda slice

  • swap mount point 2048-Mbyte swap on the sda slice

  • Root mount point ext3 with a free file system size option on the /dev/sda slice

  • swap mount point 2048-Mbyte swap on the /dev/sda slice

Distribution group 

Entire Distribution plus OEM support

Everything

Default Installation

Network Interfaces 

Provisioning interface configured 

Data interface not configured 

Provisioning interface configured 

Data interface not configured 

Provisioning interface configured 

Data interface not configured 

Best Practices for Modifying Default OS Profiles

To provision servers other than Sun Fire V20z servers, you need to modify the default profile, create a new OS profile, or clone an existing OS profile and customize the parameter settings. Each server at your site with different hardware and provisioning requirements requires the creation of a customized OS profile.

The browser interface provides a wizard for creating new OS profiles to limit the complexity of this operation. See To Create an OS Profile for instructions.

Some best practices for modifying default OS profiles are:

ProcedureTo List the Available OS Profiles

This procedure describes how to use the browser interface to list the available OS profiles. The example that follows the procedure provides the command-line equivalent.

Steps
  1. Log in to the N1 System Manager.

    See To Access the N1 System Manager Command Line in Sun N1 System Manager 1.3 Discovery and Administration Guide for details.

  2. Click the System Dashboard tab.

    The Task Shortcuts pane appears on the right side of the page.

  3. Click the Edit List button beneath the OS Profiles list.

    The list of available OS profiles appears.


Example 2–5 Listing Available OS Profiles Through the Command Line

The following example shows how to view all of the OS profiles in the system.


N1-ok> show osprofile all

All available OS profiles appear in the output. See show osprofile in Sun N1 System Manager 1.3 Command Line Reference Manual for details.


ProcedureTo Create an OS Profile

This procedure describes how to use the browser interface's OS Profile wizard. The examples that follow the procedure provide command-line equivalents for creating and customizing OS profiles for the Solaris, Red Hat, and SUSE platforms.

Before You Begin

You must copy an OS distribution before you can create an OS profile. See To Copy an OS Distribution From CDs or a DVD or To Copy an OS Distribution From ISO Files.

Steps
  1. Log in to the N1 System Manager.

    See To Access the N1 System Manager Command Line in Sun N1 System Manager 1.3 Discovery and Administration Guide for details.

  2. Click the System Dashboard tab.

    The Task Shortcuts pane appears on the right side of the page.

  3. Click the New button under the OS Profiles list.

    The Create New Operating System Profile wizard appears.

  4. Use the wizard steps to guide you through the screens.

    Click the Help tab in the left pane of the wizard for detailed information about the entry fields.

  5. To complete the creation of the OS profile, click the Finish button in the wizard.

    The wizard window closes.

  6. To add the profile to the list of profiles shown in the OS Profile Task Shortcuts pane, click the subordinate Edit List button.

    A dialog box appears.

    1. Select the check box for the OS profile and click the OK button.

      The drag-and-drop icon appears in the OS profiles Task Shortcuts list.


Example 2–6 Creating a Solaris OS Profile Through the Command Line

The following example illustrates the commands that are used to create an OS profile for a Solaris OS distribution. The first command creates a Solaris 10 profile that is named S10profile and sets the root password to admin.


N1-ok> create osprofile S10profile rootpassword admin 
description "S10 for host123" os solaris10

The following example command shows how to configure a swap partition with a size of 2048 Mbytes.


N1-ok> add osprofile s10profile partition swap size 2048 device c1t1d0s1 
type swap

The following example command shows how to configure a free ufs partition.


N1-ok> add osprofile s10profile partition / sizeoption free device c1t1ds0 
type ufs

The following example command shows how to add the default Solaris distribution group.


N1-ok> add osprofile s10profile distributiongroup "Entire Distribution 
plus OEM support"

OS profiles that install only the Core System Support distribution group cannot be monitored by using the OS monitoring feature.



Example 2–7 Creating a Red Hat OS Profile Through the Command Line

The following example illustrates the commands that are used to create an OS profile for a Red Hat distribution.


N1-ok> create osprofile RH30profile rootpassword admin 
os RedHat30

The following example command shows how to configure a root partition.


N1-ok> add osprofile RH30profile partition / device sda type ext3 
sizeoption free

The following example command shows how to configure a swap partition.


N1-ok> add osprofile RH30profile partition swap device sda type swap 
size 2048 sizeoption fixed

The following example command shows how to specify the distribution group.


N1-ok> add osprofile RH30profile distributiongroup "Everything"


Example 2–8 Creating a SUSE OS Profile Through the Command Line

The following example illustrates the commands that are used to create an OS profile for a SUSE distribution.


N1-ok> create osprofile default os suse rootpassword admin

The following example command shows how to configure a root partition.


N1-ok> add osprofile default partition / device /dev/sda type ext3 
sizeoption free

The following example command shows how to configure a swap partition.


N1-ok> add osprofile default partition swap device /dev/sda type swap 
size 2048 sizeoption fixed

The following example command shows how to specify the distribution group.


N1-ok> add osprofile default distributiongroup "Default Installation"

Troubleshooting
See Also

To find out how to load the OS profile, see To Load an OS Profile on a Server or a Server Group.

ProcedureTo Clone an Existing OS Profile

The following procedure describes how to clone or copy an existing OS profile. There are two main reasons that you would clone a profile:

Steps
  1. Log in to the N1 System Manager.

    See To Access the N1 System Manager Command Line in Sun N1 System Manager 1.3 Discovery and Administration Guide for details.

  2. Type the following command:


    N1-ok> create osprofile osprofile-name clone oldprofile
    

    The new OS profile is created. See create osprofile in Sun N1 System Manager 1.3 Command Line Reference Manual

  3. Type the following command:


    N1-ok> show osprofile osprofile-name
    

    The new OS profile appears in the output.

See Also

To find out how to load the OS profile, see To Load an OS Profile on a Server or a Server Group.

ProcedureTo Modify an OS Profile

This procedure describes how to modify the scripts, partitions, updates, and distribution groups that are configured for an OS profile.


Note –

An OS profile that is currently being deployed cannot be modified.


Steps
  1. Log in to the N1 System Manager.

    See To Access the N1 System Manager Command Line in Sun N1 System Manager 1.3 Discovery and Administration Guide for details.

  2. Modify an OS profile by performing one of the following actions:

  3. View the new OS profile details.


    N1-ok> show osprofile osprofile-name
    

    The modified OS profile information appears in the output.


Example 2–9 Modifying a Solaris 10 OS Profile Through the Command Line

This example shows how to use a flash archive and a post-installation script by modifying the solaris_ver10 OS profile.

For this example, assume that you have created the following script in a directory named /scripts on the management serverdirectory.

This sample script name is add_host.sh and the script adds a host to the /etc/hosts file on a managed server.


echo "129.10.12.101 myhost" >>/a/etc/hosts

Note that the root file system on the provisioned server is /a during the post installation time.

This example also assumes that you have created a flash archive file called archive1.flar and that you have completed the steps in To Copy a Flash Archive to the Management Server.

The following example shows how to add the script to the OS profile.


N1-ok> add osprofile solaris_ver10 script 
/scripts/add_host.sh type post

The following example shows how to set up the OS profile to use the flash archive.


N1-ok> set osprofile solaris_ver10 flar /jumpstart/Flash/archive1.flar

See Also

To find out how to load the modified OS profile, see To Load an OS Profile on a Server or a Server Group.

ProcedureTo Modify the Default Solaris OS Profile for a Sun Fire V40z or a SPARC V440 Server

This procedure describes how to modify the Solaris OS profile that is created by default. The following modification is required for successful installation of the default Solaris OS profile on a Sun Fire V40z or a SPARC V440 server.

Steps
  1. Log in to the N1 System Manager.

    See To Access the N1 System Manager Command Line in Sun N1 System Manager 1.3 Discovery and Administration Guide for details.

  2. Clone the default profile.


    N1-ok> create osprofile sol10v40z clone sol10
    
  3. Remove the root partition.


    N1-ok> remove osprofile sol10v40z partition /
    
  4. Remove the swap partition.


    N1-ok> remove osprofile sol10v40z partition swap
    
  5. Add new root parameters.


    N1-ok> add osprofile sol10v40z partition / device c1t0d0s0 sizeoption free
     type ufs
    
  6. Add new swap parameters.


    N1-ok> add osprofile sol10v40z partition swap device c1t0d0s1 size 2000
     type swap sizeoption fixed
    
See Also

To find out how to load the modified OS profile, see To Load an OS Profile on a Server or a Server Group.

ProcedureTo Modify a Solaris 9 OS Profile for a Sun Fire V20z Server With a K2.0 Motherboard

This procedure describes how to create and add a script to your Solaris OS profile. This script installs the Broadcom 5704 NIC driver needed for Solaris 9 x86 to recognize the NIC Ethernet interface on a Sun Fire V20z server with a K2.0 motherboard. Earlier versions of the Sun Fire V20z server use the K1.0 motherboard. Newer versions use the K2.0 motherboard.


Note –

This patch is needed for K2.0 motherboards but can also be used on K1.0 motherboards without negative consequences.


Steps
  1. Log in to the N1 System Manager.

    See To Access the N1 System Manager Command Line in Sun N1 System Manager 1.3 Discovery and Administration Guide for details.

  2. Type the following command:


    % /opt/sun/n1gc/bin/n1sh show os
    

    The list of available OS distributions appears.

  3. Note down the ID for the Solaris 9 distribution.

    You use this ID, which is in fact the DISTRO_ID of the OS, in the next step.

  4. Type the following command:


    # mkdir /js/DISTRO_ID/patch
    

    Here, distro_id is the ID you noted previously. A patch directory is created for the Solaris 9 distribution.

  5. Download the 116666-04 patch from http://sunsolve.sun.com to the /js/DISTRO_ID/patch directory.

  6. Change to the /js/DISTRO_ID/patch directory.


    # cd /js/DISTRO_ID/patch
    
  7. Unzip the patch file.


    # unzip 116666-04.zip
    
  8. Type the following command:


    # mkdir /js/scripts
    
  9. In the /js/scripts directory, create a script called patch_sol9_k2.sh that includes the following three lines:


    #!/bin/sh
    echo "Adding patch for bge devices."
    patchadd -R /a -M /cdrom/patch 116666-04

    Note –

    Ensure the script is executable. You can use the chmod 775 patch_sol9_k2.sh command.


  10. Add the script to the Solaris 9 OS profile.


    N1-ok> add osprofile osprofile script /js/scripts/patch_sol9_k2.sh type post 
    

Example 2–10 Adding a Script to a Solaris OS Profile

This example shows how to add a script to an OS profile. The type attribute specifies that the script is to be run after the installation.


N1-ok> add osprofile sol9K2 script /js/scripts/patch_sol9_k2.sh 
type post

Next Steps

To load the modified Solaris OS profile, see To Load an OS Profile on a Server or a Server Group.

ProcedureTo Delete an OS Profile


Note –

You cannot delete an OS profile when it is being deployed. Wait until the deployment job finishes, then delete the OS profile.


Steps
  1. Log in to the N1 System Manager.

    See To Access the N1 System Manager Command Line in Sun N1 System Manager 1.3 Discovery and Administration Guide for details.

  2. Type the following command:


    N1-ok> delete osprofile osprofile-name
    

    The OS profile is deleted from the management server.

  3. Type the following command:


    N1-ok> show osprofile all
    

    The deleted OS profile should not appear in the output.