Sun N1 System Manager 1.3 Operating System Provisioning Guide

Managing UNIX OS Distributions

This section describes the following tasks:

Copying OS Distributions and Flash Archives

Before you can install an OS profile on a managed server, you must copy an OS image. This copied image is called an OS distribution. You can copy an OS image from files that are located on the management server or from a network mounted file system. OS distributions are copied to the directories on the management server as follows:

Supported file types are:


Note –

The N1 System Manager does not support the copying of Solaris OS CDs and CD ISO files. You must copy a Solaris DVD or DVD ISO file.


Refer to Hardware and OS Requirements for Systems to be Provisioned for a detailed list of supported distributions for each provisionable server type.

To copy an OS distribution, use the create os command. Type help create os at the N1–ok command line for syntax and parameter details, or see create os in Sun N1 System Manager 1.3 Command Line Reference Manual. Refer to the following procedures for instructions about how to copy an OS distribution:

After you have copied an OS distribution, you can copy a flash archive file to the management server for use with a customized OS profile. Copying flash archives involves several manual steps, but it provides the most efficient method for loading OS distributions with the N1 System Manager. See To Copy a Flash Archive to the Management Server.

ProcedureTo Copy an OS Distribution From ISO Files

This procedure describes how to copy an OS distribution to the management server from a set of ISO files by using the command line.


Note –

After a distribution is copied, an OS profile of the same name is created by default. This profile appears in the OS Profiles list in the Task Shortcuts pane of the browser interface or by typing show osprofile all at the N1–ok> prompt.


Before You Begin
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 os os-name file file[,file...]

    The file identifies the absolute full path name to the file.

    See create os in Sun N1 System Manager 1.3 Command Line Reference Manual for details.

  3. Verify that the OS distribution was copied.


    N1-ok> show os all
    

    The OS distribution appears in the output.


Example 2–2 Creating an OS Distribution from a File

The following example shows how to create an OS distribution for Solaris 10 from a single Solaris DVD ISO file.


N1-ok> create os solaris_ver10 file /tmp/solaris_10_dvd.iso
Job "7" started.


Example 2–3 Creating an OS Distribution from Several Files

The following example shows how to create an OS distribution for Red Hat Linux from several ISO files. This command must be typed as a single line.


N1-ok> create os RHEL30 file 
/os/RHEL3/RHEL3AS-U3-re1215.RC1.0-i386-disc1.iso, 
/os/RHEL3/RHEL3AS-U3-re1215.RC1.0-i386-disc2.iso, 
/os/RHEL3/RHEL3AS-U3-re1215.RC1.0-i386-disc3.iso, 
/os/RHEL3/RHEL3AS-U3-re1215.RC1.0-i386-disc4.iso

See Also

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

ProcedureTo Copy a SUSE Linux Enterprise Server 9 Service Pack OS Distribution from ISO Files

The following procedure describes how to copy a SUSE Linux Enterprise Server (SLES) 9 Service Pack (SP) OS distribution to the management server. To copy an SLES SP distribution, you must first copy the base distribution, then add the SP to it. Although the specific example below illustrates SP1, the same process applies to all SLES 9 SP numbers.

Before You Begin

Move any file systems off the /mnt mount point.

Steps
  1. Copy the SLES 9 distribution.

    Use a command similar to the following.


    # n1sh create os sles9u1 file
      /directory/SLES-9-i386-RC5-CD1.iso,/directory/SLES-9-i386-RC5-CD2.iso,
      /directory/SLES-9-i386-RC5-CD3.iso,/directory/SLES-9-i386-RC5-CD4.iso,
      /directory/SLES-9-i386-RC5-CD5.iso,/directory/SLES-9-i386-RC5-CD6.iso
    

    Note –

    Wait for the Create OS command to complete before going to the next step.


  2. Copy the SLES 9 SP distribution:


    Note –

    When you add the update, use the same OS profile name as you used in the previous step.


    Type a command similar to the following. This example uses SLES 9 SP1. Replace file names as appropriate for other service packs, such as SP2 and SP3.


    # n1sh create os sles9u1 file
      /directory/SLES-9-SP-1-i386-RC5-CD1.iso,/directory/SLES9/SLES-9-SP-1-i386-RC5-CD2.iso,
      /directory/SLES-9-SP-1-i386-RC5-CD3.iso
    
  3. Verify that the OS distribution was copied.


    N1-ok> show os all
    

    The OS distribution appears in the output.

See Also

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

ProcedureTo Copy an OS Distribution From CDs or a DVD

This procedure describes how to copy an OS distribution to the management server from CDs or a DVD by using the command line.


Note –

The N1 System Manager does not support the copying of Solaris OS CDs and CD ISO files. You must copy a Solaris DVD or DVD ISO file.


When copying an OS distribution from multiple installation CDs, you must run the create os command multiple times. For example, if you are copying an OS distribution that is provided on two CDs, you must insert the first CD, run the create os command, and wait for the job to complete. Once the first job completes, you must insert the second CD, run the create os command again, and wait for the job to complete. The OS distribution is successfully copied when the second job completes.

When copying a SUSE Linux Enterprise Server 9 Service Pack distribution, you must run the create os command multiple times. First, copy the SLES 9 base distribution. When that job finishes, you can then copy the SLES 9 Service Pack distribution. A default OS profile is automatically created for each newly created OS distribution, with the same name as the OS distribution.

The default profile is provided as an example. Most of the time, you will have to update the default profile to match your hardware or it may be easier to just create a new profile. Use the show osprofile osprofile-name command to see the configuration of an OS profile. The same OS profile name should be used when adding the Service Pack distribution.


Note –

After a distribution is copied, an OS profile of the same name is created by default. This profile appears in the OS Profiles list in the Task Shortcuts pane of the browser interface or by typing show osprofile all at the N1–ok> prompt.


Before You Begin

Move any file systems off the /mnt mount point.

Steps
  1. Insert Disk 1 and type the following command:


    N1-ok> create os os-name cdrom cdrom
    

    A Create OS Distribution job is started. Note the job ID. When the job completes, insert the next disk. See create os in Sun N1 System Manager 1.3 Command Line Reference Manual for details.


    Note –

    You are not prompted to insert the next disk, so you must track the Create OS Distribution job completion and the disk number for your OS. When the job completes, an event is generated.


  2. Insert Disk 2 and type the following command:


    N1-ok> create os os-name cdrom cdrom
    
  3. Continue with additional disks if needed.

  4. When the final Create OS Distribution job completes, type the following command:


    N1-ok> show os os-name
    

    The new OS distribution appears in the output.

Troubleshooting

OS Distribution Creation Fails with a Copying Files Error in Sun N1 System Manager 1.3 Troubleshooting Guide

Next Steps

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

ProcedureTo Create a Flash Archive

The following procedure explains how to create a flash archive that is suitable for N1 System Manager to use. For general information about creating Solaris flash archives, see Solaris 10 Installation Guide: Solaris Flash Archives (Creation and Installation).


Note –

Flash archives on Red Hat Linux systems are limited to 2 GBytes.


Steps
  1. On the management server, create the Solaris distribution.

    Type a command similar to the following:


    N1-ok> create os s10x file /images/solarisdvd.iso
    
  2. Clone the automatically-generated OS profile.

    Type a command similar to the following, where the osprofile name is the name of the new profile and the clone name is the name of the existing profile created when you create the distribution.


    N1-ok> create osprofile s10-noagent clone s10x
    
  3. Modify the cloned OS profile.

    For this example, remove SUNWn1smx86ag-1-2 and /opt/SUNWscs/data/allstart/scripts/init_agent_firstboot.sh from s10-noagent.


    	N1-ok> remove osprofile s10-noagent update SUNWn1smx86ag-1-2
    N1-ok> remove osprofile s10-noagent script /opt/SUNWscs/data/allstart/scripts/init_agent_firstboot.sh
    
  4. Deploy the modified OS profile to the managed server that will create the flash archive.


    N1-ok> load server server osprofile s10-noagent networktype static ip ip
    

    Note –

    For Solaris, the networktype must be static.


  5. On the managed server, create the archive.


    bash-3.00# flarcreate -n s10xga-flar -c /tmp/s10x-ga.flar
    	Full Flash
    	Checking integrity...
    	Integrity OK.
    	Running precreation scripts...
    	Precreation scripts done.
    	Determining the size of the archive...
    	4921218 blocks
    	The archive will be approximately 1.32GB.
    	Creating the archive...
    	4921218 blocks
    	Archive creation complete.
  6. Copy securely the resulting file to the management server.

    Make sure that the file is in an NFS accessible location, such as /var/js. Use the scp (secure copy) utility as shown in the following command:


    bash-3.00# scp -v /tmp/s10x-ga.flar root@mgmt_server:/var/js
    
  7. Create an OS profile for the flash archive.


    N1-ok> create osprofile s10x-flar os s10x flar /var/js/s10x-ga.flar rootpassword password
    
  8. Add partition information to the flash archive OS profile.


    N1-ok> add osprofile s10x-flar partition / device c1t1d0s0 sizeoption free type ufs
    	N1-ok> add osprofile s10x-flar partition swap device c1t1d0s1 sizeoption fixed size 1024 type swap
  9. Deploy the flash archive OS profile to a managed server.


    N1-ok> load server server osprofile s10x-flar networktype static ip ip
    
  10. Add the OS monitoring feature to the managed server on which you deployed the flash archive (after clearing .ssh/known_hosts).


    N1-ok> add server server feature osmonitor agentssh root/admin agentip ip
    

    If you do not follow the above steps to create your flash archive, you might see messages similar to the following on the managed server console:


    Nov 23 11:56:08 websvr-21 agent[26169]: error    Nov 23 11:56:08 agent
    agentServer parameter (luke-8) is not a valid local hostname
    Nov 23 11:56:08 websvr-21 agent[26169]: syslog          Nov 23 11:56:08 agent
    agentServer parameter (luke-8) is not a valid local hostname

    If you see these messages, perform the following steps on the management server:

    1. Add the basemanagement feature to the managed server.


      N1-ok> add server server feature basemanagement agentip agentip agentssh agentssh
      
    2. Restart the managed server.


      N1-ok> start server server command "/opt/SUNWsymon/sbin/es-uninst -X"
      

      You can run this command on each managed server, or use start group to start all managed servers in a server group. Once the managed server restarts, you can add the osmonitoring feature.

ProcedureTo Copy a Flash Archive to the Management Server

This procedure describes how to set up and deploy a flash archive on a server or a server group by using the command line.

Before You Begin
Steps
  1. Log in to the management server as root.

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

  2. To make the shared flash archive directory available through NFS, perform one of the following actions:

    • If your management server is running the Solaris operating system, modify the /etc/dfs/dfstab file.

      Add share -F nfs -o ro,anon=0 -d "Flash Share" /jumpstart/Flash below the last comment in the file.

      For example:


      # Put custom additions below (Do not change/remove this line)
      share -F nfs -o ro,anon=0 -d "Flash Share" /jumpstart/Flash
      
    • If your management server is running Linux, modify the /etc/exports file.

      Add /jumpstart/Flash *(ro,no_root_squash) below the last comment in the file.

      For example:


      # Put custom additions below (Do not change/remove this line)
      /jumpstart/Flash      *(ro,no_root_squash)
      
  3. Copy the flash archive file to the /jumpstart/Flash directory.

  4. To restart NFS, perform one of the following actions:

    • If your management server is running the Solaris OS version 9, type the following commands:


      # /etc/init.d/nfs.server stop
      # /etc/init.d/nfs.server start
      
    • If your management server is running the Solaris OS version 10 or later, type the following command:


      # svcadm restart svc:/network/nfs/server:default
      
    • If your management server is running Linux, type one of the following commands:


      # /etc/init.d/nfs restart
      # /etc/rc3.d/S60nfs restart
      
  5. Create an OS profile that specifies the location of the flash archive file that you copied in Step 3.


    N1-ok> create osprofile osprofile-name os os-name rootpassword rootpassword flar flar 
    description description language language timezone timezone
    

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

    The OS profile is created.

  6. To verify the OS profile settings, type the following command:


    N1-ok> show osprofile osprofile-name
    

    The OS profile details appear. Check that the partition settings are appropriate for your business needs. See To Create an OS Profile for partition settings and examples.

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

    See To Load an OS Profile on a Server or a Server Group.


Example 2–4 Deploying a Solaris 9 OS Flash Archive

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


N1-ok> create osprofile solaris9_flar rootpassword admin description "solaris 
9 with flar" os solx86 flar /jumpstart/Flash/S9-u7-req-v20z.archive

The following examples show how to add root and swap partitions to the OS profile.


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

N1-ok> add osprofile solaris9_flar partition swap sizeoption fixed size 128 
device c1t1d0s1 type swap

The following example shows how to deploy the modified OS profile to a server.


N1-ok> load server 192.168.73.2 osprofile 
solaris9_flar networktype=static ip=192.168.73.244

The networktype attribute specifies that the installed host is assigned the 192.168.73.244 IP address.


ProcedureTo Delete an OS Distribution


Note –

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


Before You Begin

Delete all OS profiles that are associated with the OS distribution. This process includes deleting the default OS profile that was created when the OS distribution was copied. An OS profile cannot be deleted while it is being deployed. You may remove it after the deployment is completed. See To Delete an OS Profile for instructions.

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

    The distribution is deleted. See delete os in Sun N1 System Manager 1.3 Command Line Reference Manual for details.

  3. View the available OS distributions.


    N1-ok> show os all
    

    The deleted OS distribution should not appear in the output.