PowerVM NovaLink command-line interface
The PowerVM® NovaLink command-line interface (CLI) is a Python-based CLI for administrative functions on a system that is managed through PowerVM NovaLink.
chlickey command
/usr/bin/chlickey -p <system name> -o a --lickey "<license key>"
chlickey -p lpar | --id id -o a (--lickey <comma separated list of licensekey.> | --lickeyfile <input file> )- -p <system name> indicates the logical partition or the server.
- -o indicates the type of the operation to be performed.
- a indicates that the license information must be added to the license repository.
- --lickey <license key> specifies a single key or comma-separated list of license keys that are 101 bytes long, which is applicable for an IBM i virtual machine.
- --lickey <inputfile> specifies the file that contains the license keys for an IBM i virtual machine. The license keys are listed as comma-separated list of keys, which are 101 bytes long.
Format for building the 101 byte long license key
Format for 101 byte key:
keyFileTimeStamp(13) + systemName(8) + productId + licenseTerm + feature + serial + processorGroup + usageLimit + expirationDate + vendorData + licenseKey + keyGenTimeStamp(13)
If any value unknown, default must be used as :
keyFileTimeStamp = "0000000000000";
systemName = " ";
serial = " *LOCAL";
processorGroup = "999";
expirationDate = "9999999";
vendorData = " ";
keyGenTimeStamp = "0000000000000";
More details on default and fillers as below:
Valid attribute names:( From HMC usage)
prdid
lictrm
Specify in Vx, VxRy, or VxRyMz format, where x and y can be a number from 0 through 9, and z can be a
number from 0 through 9 or a letter from A through Z
feature
[serial]
Defaults to *LOCAL
[prcgrp]
Specify in Pxx format where xx is a number from 00 to
99
Defaults to 999
usglmt
Specify *NOMAX for no limit
[expdate]
Specify in 1YYMMDD format
Defaults to 9999999 which correlates to *NONE
[vnddta]
Defaults to blank which correlates to *NONE
lickey
1210222210611RCHASC025770SS1V7R4M05117 7800050999 -11220223 DD0829B7E5E2A6B5011210222210611Pvmctl command
The command-line interface uses the pvmctl command for most operations. The command can be entered at the command line of the PowerVM NovaLink partition.
pvm_admin group. To add a user to the pvm_admin group, enter the
following command:sudo adduser user_id pvm_adminThe
admin user for the PowerVM
NovaLink
partition is added to the pvm_admin group automatically when PowerVM
NovaLink is installed.Displaying version information
To display version information for the PowerVM
NovaLink
software, enter the command pvmctl --version.
Command help
The pvmctl command includes help information that lists the operations that are used by the command. To view the help information, enter one of the following commands.
To view a list of objects on which you can perform actions, enter the command pvmctl
help or pvmctl --help.
To view a list of operations for a specific object type, enter the command pvmctl
object_type help or pvmctl object_type
--help.
To view information about the arguments for a specific object type and operation, enter the
command pvmctl object_type
operation help or pvmctl object_type
operation --help.
Supported object types
ClusterIOSlot(io)LogicalPartition(lparorvm)LogicalUnit(lu)LogicalVolume(lv)ManagedSystem(sys)LogicalPartition(lparorvm)NetworkBridge(nbr,bridge,sea,sharedethernetadapter)PhysicalVolume(pv)SharedProcessorPoool(sharedprocpool, spp)VirtualIOServer(vios)SharedStoragePool(ssp)SRIOVadapter(sriov)sriovethernetlogicalport(ethlogicalport, ethlp)SharedEthernetAdapter(sea)VirtualEthernetAdapter(veaoreth)VirtualFibreChannelMapping(vfcorvfcmapping)VirtualMediaRepository(vmrorrepo)VirtualNICdedicated(vnic)VirtualNetwork(vnetornet)VirtualOpticalMedia(vomormedia)VirtualSCSIMapping(scsiorscsimapping)VirtualSwitch(vswitchorvsw)Volumegroup(vg)virtualserialnumber(vsn)
persistentmemorydevice(pmemd)persistentmemoryvolume(pmemv)
Command structure
The CLI uses the following command structure.
pvmctl [--version] [object] [operation] [arguments...] [help | --help]
pvmctl LogicalPartition list--display-fields (or -d) argument:
pvmctl vios list -d name id state IOAdapter.dev_name--where argument to add the condition to the
command:pvmctl vios list -d name id state IOAdapter.dev_name --where VirtualIOServer.state!=running
--object-id (or
-i) argument: pvmctl bridge list --object-id pvid=10
mylpar to 512 MB,
use the --set-fields argument:
pvmctl lpar update -i name=mylpar --set-fields PartitionMemoryConfiguration.desired=512 --parent-id (or -p) argument:
pvmctl vea delete -i pvid=1 --parent-id name=lpar_name
To create a new logical partition, view the required arguments by using the command
pvmctl lpar create help.
new_lpar with one
dedicated processor and 512 MB of
memory:pvmctl lpar create --name new_lpar --proc 1 --proc-type dedicated
--sharing-mode normal --type AIX/Linux --mem 512Virtual serial number
When you are using IBM Power® servers at firmware level FW950, or later and PowerVM NovaLink software version 2.1.0, or later, you can assign a virtual serial number (VSN) to the logical partition. The virtual serial number has seven digits and it is a unique string. When the logical partition is in the Running state, you cannot change the virtual serial number.
A list of virtual serial numbers is activated in the POWER® Hypervisor by using a Capacity on Demand (CoD) code that is provided by IBM. The virtual serial number is used to license and track the usage of the logical partition.
In PowerVM
NovaLink software version 2.1.0, or later, the
PowerVM
NovaLink CLI supports virtualserialnumber
(vsn) object type.
[neo@MyCec ~]$ pvmctl vsn
usage: pvmctl virtualserialnumber [help] <operation> [help] [<args>]
Supported operations:
list List information about Virtual Serial Numbers.
delete Delete VSN from the system.
transfer Transfer VSN to other managed system.
Object type aliases:
virtualserialnumber
vsn[neo@MyCec ~]$ pvmctl vsn list
Virtual Serial Numbers
+---------+---------+-------------+
| VSN | LPAR ID | AUTO ASSIGN |
+---------+---------+-------------+
| VSHJKSZ | - | True |
| VSHJKZY | 22 | False |
+---------+---------+-------------+
pvmctl vsn delete -i name=<virtual serial number>pvmctl vsn transfer --mgmt-svr <server ip> -i id=<virtual serial number> --mgmt-usr <userid> --sys <target sys name>Platform keystore
When you are using IBM Power servers at firmware level FW950, or later and the PowerVM NovaLink software is at version 2.1.1, or later, the Platform keystore (PKS) feature in PowerVM NovaLink creates an encrypted non-volatile store. This keystore provides logical partitions with additional capabilities to store and protect sensitive information. PowerVM provides an isolated PKS storage allocation for each partition with individually managed access controls. The total partition size that can be allocated to a logical partition by the PKS feature is in the range 4 KB - 64 KB.
# lstskey
key_length=32,key_status=default_key
## chtskey
Usage: chtskey -m <managed system>
-o change | restore
--newkey <key file>
[--oldkey <key file>]
[--force]
[--help]
Changes the trusted system key for a managed system.
-m <managed system> - the managed system's name
-o - the operation to perform:
change - set the key and re-encrpyt virtual
Trusted Platform Module (vTPM) data
restore - set the key without re-encrpyting vTPM
data
--newkey <key file> - binary file that contains the new key
--oldkey <key file> - binary file that contains the current key
--force - force a change when previous change operation is
still re-encrypting vTPM data
--help - prints this help.
#
Managing the persistent memory volume
When the firmware is at level FW940, or later and PowerVM NovaLink is at a Version 2.0.0.0, or later, you can view and manage the persistent memory volume that is assigned to a logical partition. You can manage the persistent memory volume only when the logical partition is in the Not activated state. You cannot add virtual Persistent Memory (PMEM) volumes to a logical partition in which the Simplified Remote Restart (SRR) capability is enabled.
You can perform the following operations on your logical partition:
pvmctl pmemd listpvmctl pmemv list pvmctl pmemv create --name volume_name --size volume_size --lpar_id associated_lpar_id
pvmctl pmemv delete -i name=volume_nameVirtual terminal command
Enter the mkvterm command to open a virtual terminal connection to an AIX or Linux logical partition.
mkvterm --id 3
To exit the virtual terminal, press Control + ].
Partition configuration backup and restore commands
Enter the bkprofdata and rstprofdata commands to back up and restore the partition configuration data of a managed system. These commands back up and restore only the partition configuration data in the hypervisor.
bkprofdata -o backup -f /tmp/mybackup.bak
rstprofdata -l 2 -f /tmp/mybackup.bak
Virtual I/O Server command
Use the viosvrcmd command to run commands on an instance of the Virtual I/O Server.
viosvrcmd --id 2 -c "lsmap -all"