Sun N1 System Manager 1.2 Administration 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 3–5 and Example 3–6 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 3–3 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 reiser 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 list the available OS profiles by using the browser interface. 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 for details.

  2. Click the System Dashboard tab.

    The 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 3–4 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.2 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 for details.

  2. Click the System Dashboard tab.

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

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

    The Create New Operating System Profile wizard appears.

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


    Note –

    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. Click the Edit List button in the OS Profile Shortcuts.

    A dialog box appears.

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

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


Example 3–5 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 3–6 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 3–7 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 reiser 
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. You might want to clone an existing OS profile if you need to modify it, but cannot do so because it is deployed. A deployed OS profile is a profile that is currently being installed on a provisionable server.

Steps
  1. Log in to the N1 System Manager.

    See To Access the N1 System Manager Command Line for details.

  2. Type the following command:


    N1-ok> create osprofile osprofile clone oldprofile
    

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

  3. Type the following command:


    N1-ok> show osprofile osprofile
    

    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 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
    

    The modified OS profile information appears in the output.


Example 3–8 Modifying an 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 provisionable 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 Delete an OS Profile

An OS profile cannot be deleted if it is deployed. A profile is deployed if it is currently being installed on a provisionable server.

Steps
  1. Log in to the N1 System Manager.

    See To Access the N1 System Manager Command Line for details.

  2. Type the following command:


    N1-ok> delete osprofile osprofile
    

    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.