OS_install Command

Purpose

Performs network installation operations on OS_install objects.

Syntax

Traditional usage:

OS_install [ -K keyfile_path_name]{ -o Operation } [ -F] [-a- attr=value... ] {ObjectName}

For system plan installations (System Plan mode ):

OS_install [ -K keyfile_path_name] -i sysplan { -x sysplan.xml } [ -d] [ -F]

For listing OS_install objects (List mode ):

OS_install -l [ -v] [ -t object_type | object_name]

For managing network daemons:

OS_install -S | -U

Description

The OS_install command performs a network installation operation on an OS_install object. The type of operation is dependent on the type of object specified by the ObjectName parameter. The object pointed to by the ObjectName parameter can be one of four types: Client, OS_Resource, Remote_Resource or Control_Host. Command operations involve the creation and management of OS_install objects that enable network installation to install an operation system on a client system.

OS_install can also be run in System Plan mode by passing the -i sysplan flag instead of specifying an operation. This operation provides the ability to combine multiple OS_install operations into a single XML document.

The operations involving Remote_Resource objects require configuring an SSH key that is generated with the ssh-keygen command. The SSH key is required to run ssh commands on the local platform and remote resource server. On an HMC, the default name of the file keyfile_path_name containing the SSH key is /home/hscroot/ssh_keys. This file name can be overridden with the -K option. On other platforms, there is no default file name for the SSH key file. If the -K option is not specified on other platforms, the standard path names of SSH key files must be accessible to the OS_install command process.

The List mode of OS_install is used to list the current configuration of objects in the OS_install environment.

The HMC or IVM network daemons can be started and stopped with the S and U options, without modifying the OS_install objects.

Flags

Item Description
-a attr=value Assigns the specified value to the specified attribute. Operations lists the required and optional attributes for a specific operation.
-d Deletes all OS_install objects created during System Plan mode after all operations are completed.
-F Authorizes a reset of the existing remote server client system objects if required, during an OS_install allocate operation or system plan installation.
-i sysplan Specifies System Plan mode.
-K keyfile_path_name Specifies the absolute path name of the file where the SSH keys are generated.
-l Lists all OS_install objects in the environment by default.
-o Operation Specifies an operation to perform on an OS_install object.
-S Starts the network daemons without modifying the OS_install objects.
-t object_type | object_name Narrows the list returned by the -l flag to only objects of type object_type or to the single OS_install object specified by object_name.
-U Stops the network daemons without modifying the OS_install objects.
-v Displays the list returned by the -l flag.
-x sysplan.xml Specifies the XML file that contains the system plan.

Operations

Operation Description Required Attributes Optional Attributes
define_client [-a attr=value...] {ClientObjectName} Defines a new client object.
ip_addr
Client's IP address.
mac_addr
MAC address of the network interface of the client system.
gateway
IP gateway address of the client system.
subnet_mask
IP subnet mask of the client system.
lpar
LPAR name to install client (required attribute for the netboot operation).
profile
LPAR profile to use for the client (required attribute for the netboot operation).
managed_system
Name of the managed system that contains LPAR (required attribute for the netboot operation).
ctrl_host
Name of the Hardware Control Host object for this client (required attribute for the netboot operation).
adapter_speed
Speed of the network adapter of the client system.
adapter_duplex
Duplex setting of the network adapter of the client system.
disk_location
Location of the disk to install client.
vlan_tag
Specifies the virtual logical area network (VLAN) tag to be used for tagging Ethernet frames during network installation for virtual network communication. Valid values are 0 - 4094.
vlan_pri
Specifies the virtual logical area network (VLAN) tag to be used for tagging Ethernet frames during network installation for virtual network communication. Valid values are 0 - 7.
define_resource [-a attr=value...] {ResourceObjectName} Defines a new OS_Resource object.
type
AIX® or VIOS.
version
OS version.
location
Absolute path where OS_Resource resides.
source
Source of installation images.
configfile
Install configuration file.
define_remote_resource [-a attr=value...] {ResourceObjectName} Defines a new Remote_Resource object.
server
Host name of the remote resource server.
type
AIX or Linux.
remote_identifier
Name of the resource or resource set on the remote resource server.
communication_method
Supports ssh communication method.
define_ctrl_host [-a attr=value...] {ControlHostObjectName} Defines a new Hardware Control_Host object.
communication_method
Supports ssh communication method.
hostname
Host name of control host (the host name localhost can be specified if OS_install is run on the HMC control host).
type
hmc or ivm.
None.
allocate [-F][-a attr=value...] {ClientObjectName} Allocates an OS_Resource or Remote_Resource to a client object. Both objects must exist in the OS_install environment. An error occurs if the client object has an OS_Resource or Remote_Resource already allocated to it.
os_resource
Existing OS_Resource or Remote_Resource object to allocate to the client object.
remote_resource
Existing Remote_Resource object to allocate to the client object.
install_resource
Existing OS_Resource or Remote_Resource object to allocate to the client object.
config_file
Install configuration file (applies for an OS_Resource object).
netboot {ClientObjectName} Instructs the hardware control host of the client object to initiate a network boot. None. None.
monitor_installation {ClientObjectName} Monitors the installation status of the client object. None. None.
deallocate {ClientObjectName} Deallocates the OS_Resource or Remote_Resource that was allocated to the client object by an allocate operation. None. None.
remove {ObjectName} Removes the object from the OS_install environment. None. None.

Exit Status

Item Description
0 The command completed successfully.
>0 An error occurred.

Examples

  1. To define a client object, enter a command similar to the following:
    OS_install -o define_client -a ip_addr=128.0.64.117 -a mac_addr=ab:cc:de:10:23:45 -a \
    gateway=128.0.64.1 -a subnet_mask=255.255.255.0 -a ctrl_host=myhmc -a lpar=AIX1 -a \
    profile=AIX1 -a managed_system=myMngSys myclient01
    The preceding client object is a logical partition in a managed system.
  2. To define an OS_Resource object, enter a command similar to the following:
    OS_install -o define_resource -a location=/images/AIX/53ML3 -a type=AIX -a version=53ML3 my53resource
  3. To define a Remote_Resource object (using the OS_install default SSH key file for HMC), enter a command similar to the following:
    OS_install -o define_remote_resource -a server=MyNimServer -a type=AIX
      -a remote_identifier=NimResGrp1 myRemoteResource
  4. To define a Remote_Resource object (using a previously generated ssh-keygen key located in /home/hscroot/id_dsa file), enter the following:
    OS_install -K /home/hscroot/id_dsa -o define_remote_resource -a server=MyNimServer -a type=AIX -a 
    remote_identifier=NimResGrp1 myRemoteResource
  5. To allocate the OS_Resource object defined in example 2 to a client object, enter a command similar to the following:
    OS_install -o allocate -a os_resource=my53resource myclient01
    or
    OS_install -o allocate -a install_resource=my53resource myclient01
  6. To allocate the Remote_Resource object defined in example 3 to a client object and authorize reset on an existing client, enter a command similar to the following:
    OS_install -o allocate -F -a remote_resource=myRemoteResource myclient01
    or
    OS_install -o allocate -F -a install_resource=myRemoteResource myclient01
  7. To deallocate the my53resource client object that was allocated in the example 5, enter:
    OS_install -o deallocate myclient01
  8. To define a Control_Host object to be specified for the ctrl_host attribute of a Client object, enter a command similar to the following:
    OS_install -o define_ctrl_host -a type=hmc -a hostname=hmc_hostname -a communication_method=ssh myhmc
    Although the preceding example shares the same name of the ctrl_host attribute in the first example, the define_client operation allows an undefined Control_Host object to be specified for the ctrl_host attribute. In that case the controlling host of the Client object must be the HMC or IVM on which the netboot operation for the client is executed.
  9. To execute a netboot operation, enter:
    OS_install -o netboot myclient01
  10. To view a myclient01 installation, enter:
    OS_install -o monitor_installation myclient01
  11. To remove the definition of the my53resource object, enter:
    OS_install -o remove my53resource
  12. To remove the definition of the myclient01 object, enter:
    OS_install -o remove myclient01
    If an OS_Resource object is specified, the remove operation removes OS images that exist in the file system directory specified by the location attribute of the object.
Configuring SSH
  • Generate SSH Rivest-Shamir-Adleman (RSA) keys and place them in an accessible ssh_keys file in the HMC HOME directory, by entering the command:
     ssh-keygen -t rsa -f /home/hscroot/ssh_keys
  • On the remote resource server, append or copy the content of the /home/hscroot/ssh_keys.pub file that is generated by using the ssh-keygen command to the resource server's .ssh/authorized_keys file.
  • If OS_install command is used to run a netboot operation on a target client of a remote HMC control host, append the content of the /home/hscroot/ssh_keys.pub file that is generated by using the ssh-keygen command to the remote HMC hscroot user's .ssh/authorized_keys2 file, by entering the following command as a hscroot user on the remote HMC:
    mkauthkeys -a '<content_of_ssh_keys.pub>'

Location

Item Description
/usr/sbin/OS_install  
/opt/osinstall Directory containing the OS_install Perl module files.

Files

Item Description
/var/osinstall Directory containing configuration files for the OS_install environment.
/home/hscroot/ssh_keys Default file name for SSH keys on an HMC.