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:
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. |
|
|
define_resource [-a attr=value...] {ResourceObjectName} | Defines a new OS_Resource object. |
|
|
define_remote_resource [-a attr=value...] {ResourceObjectName} | Defines a new Remote_Resource object. |
|
|
define_ctrl_host [-a attr=value...] {ControlHostObjectName} | Defines a new Hardware Control_Host object. |
|
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. |
|
|
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
- 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
- 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
- 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
- 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
- To allocate the OS_Resource object defined
in example 2 to a client object, enter a command similar to the following:
orOS_install -o allocate -a os_resource=my53resource myclient01
OS_install -o allocate -a install_resource=my53resource myclient01
- 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:
orOS_install -o allocate -F -a remote_resource=myRemoteResource myclient01
OS_install -o allocate -F -a install_resource=myRemoteResource myclient01
- To deallocate the
my53resource
client object that was allocated in the example 5, enter:OS_install -o deallocate myclient01
- 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
- To execute a netboot operation, enter:
OS_install -o netboot myclient01
- To view a
myclient01
installation, enter:OS_install -o monitor_installation myclient01
- To remove the definition of the
my53resource
object, enter:OS_install -o remove my53resource
- To remove the definition of the
myclient01
object, enter:OS_install -o remove myclient01
- 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. |