viosupgrade command
Purpose
To back up the virtual and logical configuration data, install the specified image, and restore the virtual and logical configuration data of the Virtual I/O Server (VIOS).
Syntax
viosupgrade -t bosinst -n hostname -m ios_mksysbname
-p spotname { -a RootVGCloneddisk: ... | -r RootVGInstallDisk: ... | -s } [ -c ] [ -e resources: ... ] [ -F skipclusterstate ] [ -v ]viosupgrade -t altdisk -n hostname -m ios_mksysbname
-a RootVGInstallDisk: ... [ -c ] [ -e
resources: ... ] [ -F Options: ... ] [ -v ] [ -g filename ] [ -P post_install_script ] [ -k pre_restore_script ] [ -X options: ... ] [ -u ] [ -bg ] [ -noprompt options,... ]
viosupgrade -t { bosinst | altdisk } -f filename [ -v ]
viosupgrade -q { [ -n hostname | -f filename ] } [ -S ]
Description
- Backup
- Backs up the virtual and logical configuration data to ensure that the VIOS partition can be recovered after a new installation.
- Installation
- Installs a new VIOS partition from the provided VIOS image.
- Restore
- Restores the virtual and logical configuration data of the VIOS partition.
- When you use the viosupgrade command, you can install and configure the logical partition only once during the upgrade operation.
- When you run the viosupgrade command, by default the following security
configurations are saved and restored:
- User accounts and groups with login attributes and password.
- Role based access control (RBAC) configurations such as user roles, authorizations, privileged commands database (privcmds), privileged device database (privdevs), privileged files (privfiles), and the domains.
- Login and authentication configurations.
- AIX audit sub system configurations.
- Trusted execution policies and the databases.
- IPSec filters and the tunnel configurations.
- Lightweight directory access protocol (LDAP) client configurations.
- Open Secure Sockets Layer (OpenSSL), Open Secure Shell protocol (OpenSSH), and the Kerberos configurations.
- Some of the security configurations are restored from the previous version of VIOS. Some new security configurations are activated on the latest version of VIOS. For the remaining security configurations, the old and the new versions are merged.
- Security configurations for which both the previous and current versions are not used are saved in the /usr/ios/security/saveconf directory. You can review and merge the configuration files manually.
Flags
| Flag name | Description |
|---|---|
| -a | Specifies one or more alternative disks for the installation. Based on the
type of installation, one of the following actions is performed:
|
| -c | Specifies that the cluster-level backup and restore operations are
performed. Note: The -c flag is mandatory for the VIOS that is part of a Shared
Storage Pool (SSP) cluster.
|
| -e | Specifies the configuration resources to be applied after the installation.
The valid values for this attribute are resolv_conf,
script, fb_script, file_res,
image_data, and log. Notes:
|
| -f | Specifies the file name that contains the list of VIOS nodes. The values and
fields in the file must be specified in a particular sequence and format. The details of the format
are specified in the /usr/samples/nim/viosupgrade.inst file and they are
separated by a comma. The maximum number of nodes that can be installed through the -f option is 30. The VIOS images are installed on the nodes simultaneously. The installation status is displayed for each node. For an SSP cluster, you
must run the viosupgrade command on individual nodes. Out of the
Note: Enter all the information in the
specified format. Do not specify any value for blank or optional fields. The fields that are blank
in alternate
vg and rootvg disk indicates the
SKIP option from the user. |
| -F options | Overrides certain default parameters to proceed with the
viosupgrade installation. The following options are supported for the
viosupgrade installation:
|
| -F options (Continued) |
|
| -g filename | Specifies the file that contains the list of files that must be backed up from the current system and saved in the new VIOS installed image. Each line must contain a single filename along with its path. Multiple files must be specified in separate new lines. |
| -I | Specifies the ISO image files that must be used to create the
ios_mksysb resource. |
| -k pre_restore_script | Specifies the script name that runs before the system configuration
restoration. Notes:
|
| -m | Specifies the IOS_MKSYSB resource name on the Network
Installation Management (NIM) Master server for the specified VIOS installation. |
| -n | Specifies the target VIOS host name to perform the VIOS upgrade operation. |
| -p | Specifies the resource object name of the Shared Product Object Tree (SPOT) for NIM installation. |
| -P post_install_script | Specifies and runs a script file after the VIOS metadata configuration restore process is successful. |
| -q | Queries the status of the VIOS upgrade operation. |
| -r | Specifies a new rootvg disk where the specified image must be
installed. If you specify the -r flag, the existing rootvg
disks are not used and the new disk is used for the installation. |
| -S | Provides the detailed summary of the VIOS upgrade operation. You must use the -q option with the -S flag. |
| -s | Skips the cloning of current rootvg disks to alternative
disks and continues with the VIOS installation on the current rootvg disk. If the
storage disks are not available, you can specify the -s flag to continue with
the installation. |
| -t | Specifies the type of installation from the NIM server. The supported types of
installation are bosinst and altdisk.
|
| -u | Specifies that the VIOS must be manually rebooted to activate the installed
root volume group in the VIOS partition. If the VIOS is in an SSP cluster, the
cluster services are down until you restart the VIOS.Note: The VIOS must be
rebooted to complete the VIOS metadata restore process in the newly installed
root
volume group. |
| -v | Validates whether the VIOS hosts are ready for the installation. The -v flag must be specified only for validation and can be used only for preview of the installation image. |
| -bg | Specifies the command to be run in the background. |
| -w | Specifies the directory path to create new ios_mksysb image file. |
| -x | Specifies the ios_mksysb image file name that must be
created. |
| -X options | Specifies the list of system files or configuration settings that must be
excluded from the mksysb image installation. You can exclude the following file types:
|
| -y | Specifies a new SPOT resource that must be created from the
ios_mksysb resource. |
| -noprompt options | Overrides the user prompts to proceed with the VIOS upgrade installation
operation. When the -noprompt flag is used, the viosupgrade
command automatically accepts all the user prompts. You can specify the following options with the
-noprompt flag to accept or reject the individual user prompts:
|
Exit Status
| Return code | Description |
|---|---|
| 0 | Indicates success |
| 1 | Indicates failure |
Requirements
- Alternate disks that are used with the -a and -r options as part of the viosupgrade command must
be free. You must be able to list the disks by running the
lspv -freecommand on the VIO Server. - Installations through the viosupgrade command are categorized as new and
complete installation. Any customized configurations on the current system that were running before
the installation, including the time zone, are not carried to the new installation image. If you
need to copy a customized file to the new image, use the -e flag with the file_res option. The -e flag with the
file_res option specifies the customized file that must be backed up after
the installation. You can use the viosupgrade command with the -e flag and file_res
option only for the bosinst type of installations. After the installation,
the customized files are copied to the /home/padmin/backup_files
directory.Note: Follow the manual steps on the NIM master to define the file_res resources before you run the viosupgrade command. The customized files are stored on the NIM master in the source directory /export/nim/viosupgrade/copyfiles. The customized files are copied on the VIOS after the installation in the destination directory /home/padmin/backup_files.For example, to restore the files in the /etc/environment and /var/custom.conf directories, perform the following steps:
- Create a source directory.
mkdir -p /export/nim/viosupgrade/copyfiles - Define the file_resource
option.
nim -o define -t file_res -a location=/export/nim/viosupgrade/copyfiles -a dest_dir=/home/padmin/ backup_files -a server=master file_res_user - Create the /export/nim/viosupgrade/copyfiles/etc and
/export/nim/copyfiles/var directories under the source
directory.
mkdir -p /export/nim/viosupgrade/copyfiles/etc mkdir -p /export/nim/copyfiles/var. - Copy the files from VIOS to the NIM master source directories.
scp -r root jaguar13:/etc/environment /export/nim/viosupgrade/copyfiles/etc scp -r root jaguar13:/var/custom.conf /export/nim/viosupgrade/copyfiles/var
- Create a source directory.
- The
viosbrrestore process does not support the virtual device mappings withvscsidisks that are created on therootvgdisks of the VIO server. Therefore, the viosupgrade command cannot restore thevscsimappings if logical volumes (LVs) are created from therootvgdisk of VIO server. - To enable the VIOS to be managed remotely by the AIX NIM master, run the remote_management command from VIOS.
- Considerations for the target
ios_mksysbimage level are as follows:- The level of the target
ios_mksysbimage must be at 3.1.0.00 level, or later. - The target
ios_mksysbimage level must be higher than the current VIOSrootvglevel.
- The level of the target
- The viosupgrade command on NIM server is supported from IBM® AIX® 7.2 with Technology Level 3, or later.
- For the NIM bosinst type of installation, the following
VIOS levels are supported:
- 2.2.6.30, or later for an SSP Cluster environment
- 2.2.x.x, or later for a non-SSP Cluster environment
- On the NIM master, VIOS must be defined along with the Network Adapter Hardware
Address (MAC) or Network Adapter Logical Device Name (ent name) in the
if1definition of NIM object. If not defined, the viosupgrade command displays a message that the network boot operation might be delayed or fail. - For a NIM bosinst type of installation, the interface
resource (MAC or ent name), defined on the
if1definition of NIM object for any given VIOS, must adhere to the following considerations:- The interface resource can be any available Ethernet interface that is connected to the network.
- The interface resource can be a physical interface that is part of a SEA.
- The interface resource cannot be a SEA interface.
- For a NIM altdisk type of installation, the current VIOS levels that are supported are 2.2.6.30, or later.
- The NIM altdisk type of installation is not supported for
VIOS when an SEA is the only primary interface for communication.Note: To enable the NIM altdisk type of installation for the preceding case, you must configure an additional Ethernet interface as the primary interface for remote management. The NIM master must be able to establish the network connection with the VIOS by using the IP address that is configured on this interface by default.
- If a node is part of a cluster, then the hostname of the node must be resolvable during the metadata restore process after the installation is complete. This can be achieved either by passing the resolv.conf file or a script to add an entry in the /etc/hosts file, along with the -e option.
- If the VIOS belongs to an SSP cluster and if the current VIOS version is older than 2.2.6.30,
the following two-step upgrade process is necessary to upgrade to VIOS 3.1.0.00, or later.
- Upgrade the VIOS to version 2.2.6.30 through the upgrade methods such as by using the updateios command.
- Use the viosupgrade command to upgrade to the VIOS to version 3.1.0.00, or later.
- If you are using altdisk type of installation for the VIOS, and if the
VIOS has
altinst_rootvgorold_rootvgdisks, the viosupgrade command fails to indicate the user to rename the disks. - The NIM master might restart the VIOS and reinitiate the restore process to restore multiple
virtual IO mappings through the
viosbrrestore process after the installation. - If the NIM master fails to restore the mappings, you must manually reinitiate the
restore operation on the NIM master by using the following commands:
- VIOS-non-SSP
Cluster:
nim -o viosbr -a viosbr_action=restore -a ios_backup=<BackupObjectName> <VIOSObjectName> - VIOS-SSP
Cluster:
nim -o viosbr -a viosbr_action=restore -a ios_backup=<BackupObjectName> -a clustername=<clusterName> -a viosbr_flags="-curnode" <VIOSObjectName>Note: The BackupObjectName is <VIOSName>_backup. You can get the list of backup object names from the command, lsnim -t ios_backup.
- VIOS-non-SSP
Cluster:
- If you installed additional software on the VIOS that is not a part of the base
VIOS image, the viosupgrade command might fail to restore software-related
configurations. Create a customized VIOS image with the software applications that you want to
include and provide this customized VIOS image as an input to the viosupgrade
command for installation.
The viosupgrade command identifies the software applications that are not included in the
ios_mksysbimage file, but are installed in the current system, such as the Subsystem Device Driver (SDD) or the Subsystem Device Driver Path Control Module (SDDPCM). The viosupgrade command displays a warning prompt on the console output during software validation or before software installation. You can choose to continue or stop the upgrade process by selecting the corresponding option. For example, if the software application that is installed on the VIOS is SDDPCM, you must customize theios_mksysbimage file to include the SDDPCM application and to provide the customized VIOS image file as an input to the viosupgrade command.Note: For more information about creating a customized VIOS image, see backupios command. - To create the
ios_mksysbimage file from the ISO image files, you require approximately 4 GB memory in the directory that you specify by using the -w flag in the viosupgrade command.
Examples
- To validate the VIOS upgrade operation by using the
bosinst type of installation, enter the following
command:
viosupgrade -v -t bosinst -n systemA -m mksysbA -p spotA -sWhere, target VIOS node is
systemA,mksysbimage name is mksysbA, spot name is spotA and the type of install is bosinst. - To validate the VIOS upgrade operation by using the
bosinst method, enter the following
command:
viosupgrade -v -t bosinst -n clusternodeA -m mksysbA -p spotA -r hdisk1:hdisk2 -c -e resolv_conf:scriptWhere, target cluster VIOS node is clusternodeA,
mksysbimage name is mksysbA, spot name is spotA, NIM resources areresolv_confand script, type of install is bosinst and provided newrootvgdisks arehdisk1andhdisk2. - To perform the VIOS upgrade operation by using the
bosinst method by skipping the current
rootvgcloning, enter the following command:viosupgrade -t bosinst -n systemA -m mksysbA -p spotA -sWhere, target VIOS node issystemA,mksysbimage name is mksysbA, spot name is spotA and type of install is bosinst.Note: After the installation, the newrootvgdisk will be the currentrootvgdisk. - To perform the VIOS upgrade operation by using the
bosinst method by installing on provided disks, enter the following
command:
viosupgrade -t bosinst -n systemA -m mksysbA -p spotA -r hdisk1:hdisk2Where, target VIOS node issystemA,mksysbimage name is mksysbA, spot name is spotA, type of install is bosinst and provided newrootvgdisks arehdisk1andhdisk2.Note: After reinstall the newrootvgdisk is on the provided disks. - To perform the VIOS upgrade operation by using the
bosinst method by backing up the current
rootvgdisk on provided alternate disks, enter the following command:viosupgrade -t bosinst -n systemA -m mksysbA -p spotA -a hdisk3:hdisk4 - To perform the SSP cluster VIOS upgrade operation by using the
bosinst method on the provided disks, enter the following
command:
viosupgrade -t bosinst -n clusternodeA -m mksysbA -p spotA -r hdisk1:hdisk2 -cWhere, target cluster VIOS node is
clusternodeA,mksysbimage name ismksysbA, spot name isspotA, type of install is bosinst and provided disks for newrootvgarehdisk1andhdisk2. - You can perform the VIOS upgrade operation by using the
bosinst method and the provided NIM resources. You can also create a backup
of the current
rootvgon a provided alternate disk. To perform all three of these operations, enter the following command:viosupgrade -t bosinst -n systemA -m mksysbA -p spotA -a hdisk3:hdisk4 -e resolv_conf:script:fb_scriptWhere the target VIOS node is
systemA,mksysbimage name ismksysbA, spot name isspotA, type of install is bosinst and provided alternaterootvgdisks arehdisk3andhdisk4, provided NIM resources areresolv_conf,script, andfb_script. - To validate the VIOS upgrade operation by using the
altdisk method, enter the following
command:
viosupgrade -v -t altdisk -n systemA -m mksysbA -a hdisk3:hdisk4Where the target VIOS node is
systemA,mksysbimage name ismksysbA, alternate disks arehdisk3,hdisk4, and the type of install is altdisk. - To perform the VIOS upgrade operation by using the
altdisk method, enter the following
command:
viosupgrade -t altdisk -n systemA -m mksysbA -a hdisk3:hdisk4Where the target VIOS node is
systemA,mksysbimage name ismymksysbA, type of install is altdisk and provided alternaterootvgdisks arehdisk3andhdisk4. - To perform the SSP cluster VIOS upgrade operation by using the
altdisk method, enter the following command
:
viosupgrade -t altdisk -n clusternodeA -m mksysbA -a hdisk3:hdisk4:hdisk5 -cWhere the target cluster node is
clusternodeA,mksysbimage name ismksysbA, type of install is altdisk and provided alternaterootvgdisks arehdisk3,hdisk4, andhdisk5. - To validate the upgrade operation of one or more VIOS nodes in the provided file
by using the bosinst method, enter the following
command:
viosupgrade -v -t bosinst -f "/usr/samples/nim/viosupgrade.inst" - To perform the upgrade operation on a provided VIOS node in file by using the
bosinst method, enter the following
command:
viosupgrade -t bosinst -f "/usr/samples/nim/viosupgrade.inst"If the target VIOS node issystemA,mksysbimage name ismksysbA, spot name isspotA, provided alternaterootvgarehdisk3andhdisk4, type of install is bosinst and file that contains VIOS node information is /usr/samples/nim/viosupgrade.inst, then the file must contain the following data:systemA, mksysbA, spotA, ,hdisk3:hdisk4 - To perform the upgrade operation on provided SSP cluster VIOS nodes in file
through the bosinst method, enter the following
command:
viosupgrade -t bosinst -f "/usr/samples/nim/viosupgrade.inst"If the target cluster VIOS node isclusternodeA,mksysbimage name ismksysbA, spot name isspotA, type of install is bosinst and the file that contains VIOS nodes information is /usr/samples/nim/viosupgrade.inst, then the file must contain the following data:clusternodeA, mksysbA, spotA, , , , c, - To perform the upgrade operation on the provided VIOS nodes in the file by using
the altdisk method, enter the following
command:
viosupgrade -v -t altdisk -f "/usr/samples/nim/viosupgrade.inst" - To perform the VIOS upgrade operation by using the
bosinst method and to restore files from the current
rootvgdisk to a newly installed image, enter the following command:viosupgrade -t bosinst -n systemA -m mksysbA -p spotA -s -e file_resWhere the target VIOS node is
systemA,mksysbimage name ismksysbA, spot name isspotA, file_res option is file_res_user, and the type of install is bosinst. - To create the
ios_mksysbimage file and SPOT resource from ISO image files, enter the following command:
Where, /home/padmin/dvdimage.v1.iso and /home/padmin/dvdimage.v2.iso are the ISO image files, /home/myNewIosMksysbImageDir is the path where theviosupgrade -I /home/padmin/dvdimage.v1.iso:/home/padmin/dvdimage.v2.iso -w /home/myNewIosMksysbImageDir -x myIosMkysysbRes -y mySPOTResourceios_mksysbimage file is created,myIosMkysysbResis the name of theios_mksysbimage file that is created, andmySPOTResourceis the name of the SPOT resource that is created. - To perform the VIOS upgrade operation by using the bosinst
method on specified disks and to override the verification of the SSP cluster state, enter the
following
command:
Where the target VIOS node isviosupgrade -t bosinst -n systemA -m mksysbA -p spotA -r hdisk1:hdisk2 -F skipclusterstate -csystemA,mksysbAis the name of themksysbimage,spotAis the name of the SPOT resource, the type of installation is bosinst, and the specified newrootvgdisks arehdisk1andhdisk2. - To perform the VIOS upgrade operation by using the altinst method and to
copy the files from the current
rootvgdisk to a newly installed VIOS image in /home/padmin/backup_files directory, enter the following command:
Where the target VIOS node isviosupgrade -t altdisk -n systemA -m mksysbA -a hdisk3:hdisk4 -g file_list_namesystemA, the image name of themksysbismymksysbA, the type of install is altdisk, the alternaterootvgdisks arehdisk3andhdisk4, and the file_list_name file is the file that contains the list of files that needs to be copied to the newrootvgimage. - To perform the VIOS upgrade operation by using the altinst method and to
copy the files from the current
rootvgdisk to the respective directories of a newly installedrootvgdisk, enter the following command:
Where the target VIOS node isviosupgrade -t altdisk -n systemA -m mksysbA -a hdisk3:hdisk4 -g file_list_name -F forcecopysystemA, the image name of themksysbimage ismksysbA, the type of install is altdisk, the alternaterootvgdisks arehdisk3andhdisk4, and the file_list_name file is the file that contains the list of files that needs to be copied to the newrootvgimage. - To perform the VIOS upgrade operation by using the altinst method and to
run a script after the restore process of the VIOS metadata configuration is successful on the new
rootvg disk, enter the following command:
viosupgrade -t altdisk -n systemA -m mksysbA -a hdisk1:hdisk2 -P <post_install_script>Where the target VIOS node is
systemA, the image name of themksysbimage ismksysbA, the type of install is altdisk, the alternaterootvgdisks arehdisk1andhdisk2, and thepost_install_scriptis the script that you must run. - To perform the VIOS upgrade operation by using the altinst method and to
run a script before the restore process of the virtual devices on the new
rootvgdisk, enter the following command:viosupgrade -t altdisk -n systemA -m mksysbA -a hdisk1:hdisk2 -k <pre_restore_script>Where the target VIOS node is
systemA, the image name of themksysbimage ismksysbA, the type of install is altdisk, the alternaterootvgdisks arehdisk1andhdisk2, and thepre_restore_scriptis the script that you must run. - To perform the VIOS upgrade operation by using the altinst method and to
run the command in the background, enter the following command:
viosupgrade -t altdisk -n systemA -m mksysbA -a hdisk1:hdisk2 -bgWhere the target VIOS node is
systemA, the image name of themksysbimage ismksysbA, the type of install is altdisk, and the alternaterootvgdisks arehdisk1andhdisk2. - To perform the VIOS upgrade operation by using the altinst method to copy
the list of files from the file_list_name file to the
/home/padmin/backup_files directory, and to copy the list of files from the
file_list_name2 file to their respective paths, enter the following command:
viosupgrade -t altdisk -n systemA -m mksysbA -a hdisk1:hdisk2 –g file_list_name –F forcecopy=file_list_name2Where the target VIOS node is
systemA, the image name ismksysbA, the type of install is altdisk, and the newrootvgdisks arehdisk1andhdisk2. The file_list_name file contains the list of files that needs to be copied to the newrootvgimage in the /home/ padmin/backup_files directory. The file_list_name2 file contains the list of files that needs to be copied to the newrootvgimage in their respective paths. - To use the -noprompt flag without the
additionalfs=Y|Nand theskiplv=Y|Noptions, enter the following command:viosupgrade -t altdisk -n systemA -m mksysbA -a hdisk1:hdisk2 -nopromptWhere the target VIOS node is
systemA, the image name ismksysbA, the type of install is altdisk, and the newrootvgdisks arehdisk1andhdisk2. - To perform the VIOS upgrade operation by using the altinst method and to
use the -noprompt flag with the
additionalfs=Y|Nandskiplv=Y|Noptions, enter the following commands:viosupgrade -t altdisk -n systemA -m mksysbA -a hdisk1:hdisk2 -noprompt skiplv=Y,additionalfs=Nviosupgrade -t altdisk -n systemA -m mksysbA -a hdisk1:hdisk2 -noprompt skiplv=YWhere the target VIOS node is
systemA, the image name ismksysbA, the type of install is altdisk, and the newrootvgdisks arehdisk1andhdisk2. - To verify the VIOS upgrade operation by using the altinst method to copy
the list of files in the file_list_name2 file to their respective paths, and to
skip the restore operation on the new
rootvgdisks, enter the following command:viosupgrade -v -t altdisk -n systemA -m mksysbA -a hdisk1:hdisk2 -F forcecopy=file_list_name2:skiprestoreWhere the target VIOS node is
systemA, the image name ismksysbA, the type of install is altdisk, the newrootvgdisks arehdisk1andhdisk2, and the file_list_name2 file is the file that contains the list of files that needs to be copied to the newrootvgimage in their respective paths. - To verify the VIOS upgrade operation by using the altinst method to
exclude the system files like the SSHKEYS, and the root Cron tab entries, enter the following
command:
viosupgrade -v -t altdisk -n systemA -m mksysbA -a hdisk1:hdisk2 -X SSHKEYS:ROOTCRONWhere the target VIOS node is
systemA, the image name ismksysbA, the type of install is altdisk, and the newrootvgdisks arehdisk1andhdisk2.