15 Oracle Appliance Manager Command-Line Interface for Virtualization

Oracle Appliance Manager Command-Line Interface (OAKCLI) is a command-line interface (CLI) for Oracle VM Server (Xen hypervisor technology virtualization) on Oracle Database Appliance X7-2-HA. Only use the oakcli commands on an Oracle Database Appliance X7-2-HA virtualized platform.

About the Oracle Appliance Manager Command-line Interface (OAKCLI)

The oakcli commands are the primary method for performing database and system administration on Oracle Database Appliance, and on Oracle Database Appliance Virtualized Platform.

You can perform the following tasks with OAKCLI commands:
  • List the hardware components

  • Validate and diagnose the hardware components

  • Install and upgrade software

  • Apply software patches

  • Create and drop databases

  • Install and uninstall Oracle Homes

  • Deploy and manage virtual machines

  • Test Oracle Auto Service Request (Oracle ASR)

  • Enable CPU cores

Depending on your version of Oracle Appliance Manager and your hardware, some of the OAKCLI commands may not be available to you. To see which OAKCLI commands are supported on your version of Oracle Appliance Manager and your hardware, run the help command for OAKCLI: oakcli -h

OAKCLI Command Location and Path Configuration

The Oracle Appliance Manager command-line interface is in the following directory:

/opt/oracle/oak/bin/oakcli 

Configure the root user account on your Oracle Database Appliance servers to have the PATH variable defined to search for oakcli commands in the path /opt/oracle/oak/bin/oakcli.

OAKCLI Syntax

Oracle Appliance Manager command-line interface commands and parameters are case-insensitive.

An oakcli command uses the following command syntax:

oakcli command object [options]
  • command is an action you want to perform on the appliance. For example: show, locate, apply.

  • object is the target or object on which the oakcli command performs the operation. For example, you issue a command to create or configure a disk, or a controller, or perform other system or software administration. You can also use object abbreviations.

  • options are optional parts of the oakcli command. Options can consist of one or more options that extend the use of the oakcli command carried out on an object. Options include additional information about the action that you want to perform on the object. Option names are preceded with a dash. Many options require the name of an object for the command to perform the action that you want to carry out. The help option (-h) is an option that is available with every command. When you include the -h option, you can obtain additional information about the command that you want to perform.

Oracle Appliance Manager Command-Line Interface Help

Run the following command to see the usage information for all oakcli commands available for your Oracle Database Appliance:

oakcli -h

Run the following command to see detailed help about a specific oakcli command:

oakcli command -h

Run the following command to see detailed help about a specific oakcli command carried out on an object, and the options that are available for you to use with that object.

oakcli command object -h

Managing OAKCLI Privileges and Security with SUDO

Oracle Appliance Manager command-line utility requires root system privileges for most administration actions. You may want to use SUDO as part of your system auditing and security policy.

For most tasks, Oracle recommends that you log in as root to use the Oracle Appliance Manager command-line interface on Oracle Database Appliance. If you are not logged in as root, then you cannot carry out most actions on the appliance. For example, if you are not logged in as root, then you can view storage information, but you cannot modify the storage.

Allowing Root User Access Using SUDO

In environments where system administration is handled by a different group than database administration, or where security is a significant concern, you may want to limit access to the root user account and password. SUDO enables system administrators to grant certain users (or groups of users) the ability to run commands as root, while logging all commands and arguments as part of your security and compliance protocol.

A SUDO security policy is configured by using the file /etc/sudoers. Within the sudoers file, you can configure groups of users and sets of commands to simplify and audit server administration with SUDO commands.

Caution:

Configuring SUDO to allow a user to perform any operation is equivalent to giving that user root privileges. Consider carefully if this is appropriate for your security needs.

SUDO Example 1: Allow a User to Perform Any OAKCLI Operation

This example shows how to configure SUDO to enable a user to perform any OAKCLI operation. You do this by adding lines to the commands section in the /etc/sudoers file:

## The commands section may have other options added to it.
##
Cmnd_Alias OAKCLI_CMDS=/opt/oracle/oak/bin/oakcli *
jdoe ALL = OAKCLI_CMDS

In this example, the user name is jdoe. The file parameter setting ALL= OAKCLI_CMDS grants the user jdoe permission to run all oakcli commands that are defined by the command alias OAKCLI_CMDS. After configuration, you can copy one sudoers file to multiple hosts. You can also create different rules on each host.

Note:

Before database creation, you must set up user equivalency with SSH for the root user on each server. If you do not set up user equivalency and configure SSH on each server, then you are prompted to provide the root password for each server during database creation.

After you configure the sudoer file with the user, the user jdoe can run the set of oakcli commands configured with the command alias OAKCLI_CMDS. For example:

$ sudo oakcli create database -db newdb

INFO: 2015-08-05 14:40:55: Look at the logfile  '/opt/oracle/oak/log/scaoda1011/tools/12.1.2.4.0/createdb_newdb_91715.log' for more details

INFO: 2015-08-05 14:40:59: Database parameter file is not provided. Will be using default parameters for DB creation
Please enter the 'SYSASM'  password:
Please re-enter the 'SYSASM' password:
 
INFO: 2015-08-05 14:41:10: Installing a new home: OraDb12102_home3 at /u01/app/oracle/product/12.1.0.2/dbhome_3

Please select one of the following for Database type  [1 .. 3]:
1    => OLTP 
2    => DSS 
3    => In-Memory

SUDO Example 2: Allow a User to Perform Only Selected OAKCLI Operations

To configure SUDO to allow a user to perform only selected OAKCLI operations, add lines to the commands section in the /etc/sudoers file as follows:

## oakcli commands 
Cmnd_Alias OAKENV = /opt/oracle/oak/bin/oakcli show env_hw 
Cmnd_Alias OAKVER = /opt/oracle/oak/bin/oakcli show version 
oracle  ALL=       OAKENV,OAKVER

The following are sample outputs for the commands:

$ sudo /opt/oracle/oak/bin/oakcli show env_hw
VM-ODA_BASE ODA X6-2-HA

$ sudo /opt/oracle/oak/bin/oakcli show version
Version
-------
12.2.1.2.0

In this example, the user jdoe2 tries to run the oakcli show databases command, which is not part of the set of commands that is configured for that user. Sudo prevents jdoe2 from running the command.

$ sudo /opt/oracle/oak/bin/oakcli show databases
Sorry, user oracle is not allowed to execute '/opt/oracle/oak/bin/oakcli show databases' as root on servernode1.

See Also:

The SUDO man pages for more information about configuring and using SUDO:

http://www.sudo.ws/sudo.html

oakcli add disk -local

Use the oakcli add disk -local command to add a local disk to the system after physically replacing a failed disk.

Syntax

oakcli add disk -local

Usage Notes

  • You cannot add more than two disks per node.

  • You must remove the failed drive and replace it with a new drive before running the oakcli add disk -local command.

  • The new disk must be inserted into the slot before you run this command.

  • The oakcli add disk -local command is supported only on bare metal deployments. It is not supported on virtualized configurations.

oakcli configure commands

Use the oakcli configure commands to configure components on Oracle Database Appliance.

oakcli configure additionalnet

Use the oakcli configure additionalnet command to configure any unconfigured public networks in bare metal, Domain 0, and ODA_BASE.

Syntax

oakcli configure additionalnet  [-h]

Parameter

-h displays online help for using the command.

Usage Notes

The oakcli configure additionalnet command automatically detects any unconfigured networks and runs an interactive script that guides you through how to configure the network. The script requires the following input:

  • Interface name

  • DHCP [Y/N]

  • IP

  • Netmask

Note:

If you are running the command on a bare metal deployment, then the interface name expects a bond name. If you are running the command on Dom0, then the interface name expects a net name. If you are running the command on Dom1, then the interface name expects an eth name.

oakcli configure asr

Use the oakcli configure asr command to configure Oracle Auto Service Request (Oracle ASR) on Oracle Database Appliance.

Syntax

oakcli configure asr [-h]

Parameter

-h displays help for using the command.

Usage Notes

  • The oakcli configure asr command initiates an interactive script that requests the following information to implement Oracle ASR on Oracle Database Appliance:

    • Action to be performed (setup internal, setup external, deinstall, or reconfigure Oracle ASR Manager)

    • PROXY server name, port, user ID, and password

    • Oracle ASR user ID and password

    • Oracle ASR Manager IP and port

  • You can configure Oracle ASR on Oracle Database Appliance to use its own ASR Manager (internal Oracle ASR) or use Oracle ASR Manager configured on another server in the same network as your appliance (external Oracle ASR). If you already have Oracle ASR Manager configured in your environment, you can register Oracle Database Appliance with your existing Oracle ASR Manager.

    Note:

    With an internal Oracle ASR Manager, an alert is not sent when the server goes down. If a critical event occurs on Oracle Database Appliance with an external Oracle ASR Manager, then an alert can still be sent to Oracle.

Configuring Oracle ASR

# oakcli configure asr

INFO   : Logging all actions in /opt/oracle/oak/onecmd/tmp/scaoda1011-20150805153300.log and traces in /opt/oracle/oak/onecmd/tmp/scaoda1011-20150805153300.trc

Please enter
1 to setup Internal ASR
2 to setup External ASR
3 to Deinstall ASR
0 to Exit

 [1]:INFO   : Logging all actions in /opt/oracle/oak/onecmd/tmp/scaoda1011-20150805153300.log and traces in /opt/oracle/oak/onecmd/tmp/scaoda1011-20150805153300.trc

oakcli configure cpupool

Use the oakcli configure cpupool command to configure a CPU pool on one Oracle Database Appliance Virtualized Platform node.

Syntax

oakcli configure cpupool poolname -numcpu cpu_count -node nodenum [-h]

Parameters

Parameter Description

poolname

Unique name for the CPU pool

-numcpu cpu_count

Number of CPUs for the CPU pool

-node nodenum

Node where the CPU pool will be created (0 or 1)

-h

(Optional) Display help for using the command.

Configuring a CPU Pool

Configure a CPU pool named twonode with two cores on Node 1 of Oracle Database Appliance Virtualized Platform:

oakcli configure cpupool twonode -numcpu 2 -node 1

oakcli configure firstnet

Use the oakcli configure firstnet command to configure an initial network on Oracle Database Appliance that enables you to download deployment software.

Syntax

oakcli configure firstnet

Example

The oakcli configure firstnet command creates an initial network on a new Oracle Database Appliance using an interactive script. The following example shows how to configure the initial network on a bare metal Oracle Database Appliance:

oakcli configure firstnet
Select the interface to  configure network on [bond0 bond1 bond2 xbond0]:bond0
Configure DHCP on bond0?(yes/no):no
       INFO: Static configuration selected
       Enter the IP address to configure:192.0.2.18
       Enter the netmask address to configure:255.255.252.0
       Enter the gateway address to configure:192.0.2.1
Plumbing the IPs now
Restarting the network
:::::::::::::::::

Note:

Oracle recommends using the oakcli configure firstnet command only one time on Oracle Database Appliance. Subsequent use after configuring the initial network can cause unpredictable changes to your network settings.

oakcli configure network

Use the oakcli configure network command to configure the network after either replacing a network card or swapping the public network from copper to fiber and vice versa. The meaning of the command changes depending on which parameter you use.

Syntax

oakcli configure network [-changeNetCard|-publicNet][-h]

Parameters

Parameter Description

-changeNetCard

Configures the network card after it has been replaced. You must run the oakcli configure network -changeNetCard command on each node if the network card was replaced. This parameter is supported on all Oracle Database Appliance hardware models. This command must be executed from Dom0 on virtualized platforms.

-publicNet

Configures the network after you have swapped the public network from copper to fiber and vice versa. You must run the oakcli configure network -publicNet command on each node, and this requires the stack to be down. The stack includes GI and RDBMS. If you are using Oracle Database Appliance Virtualized Platform, the virtual machines must be down. The virtual machines may need some configuration changes, especially if they are using VLANs. This parameter is supported only on Oracle Database Appliance X4-2 hardware models.

-h

(Optional) Display help for using the command.

oakcli configure oda_base

Use the oakcli configure oda_base command to change the CPU core count assigned to ODA_BASE, add or remove virtual local area networks assigned to ODA_BASE, and adjust resource allocation among user domains and between ODA_BASE and other user domains.

You must restart the domain for the resource allocation change to take effect.

Syntax

oakcli configure oda_base

Examples

Here are examples of how to use the oakcli configure oda_basecommand.

Changing the CPU Core Count in ODA_BASE

Change the CPU core count from six to eight in ODA_BASE:

# oakcli configure oda_base
Core Licensing Options:
        1. 2 CPU Cores
        2. 4 CPU Cores
        3. 6 CPU Cores
        4. 8 CPU Cores
        5. 10 CPU Cores
        6. 12 CPU Cores
        Current CPU Cores       :6
        Selection[1 : 6](default 12 CPU Cores) : 4
        ODA base domain memory in GB(min 8, max 88)(Current Memory 64G)[default
32]     :
INFO: Using default memory size i.e. 32 GB
Additional vlan networks to be assigned to oda_base? (y/n) [n]:
Vlan network to be removed from oda_base (y/n) [n]
INFO: Node 0:Configured oda base pool
INFO: Node 1:Configured oda base pool
INFO: Node 0:ODA Base configured with new memory
INFO: Node 0:ODA Base configured with new vcpus
INFO: Changes will be incorporated after the domain is restarted on Node 0
INFO: Node 1:ODA Base configured with new memory
INFO: Node 1:ODA Base configured with new vcpus
INFO: Changes will be incorporated after the domain is restarted on Node 1

Changing the Amount of Memory Allocated to ODA_BASE

  1. Log in to Dom0.

  2. Execute the oakcli configure oda_base command and change the configuration.

  3. Restart ODA_BASE.

Assigning VLANs to ODA_BASE

  1. Log in to Dom0.

  2. Execute the oakcli configure oda_base command.

  3. Change the setting for Additional vlan networks to be assigned to oda_base? (y/n) to y.

  4. Follow the prompts to assign additional VLANs to ODA_BASE.

  5. Restart ODA_BASE.

oakcli configure repo

Use the oakcli configure repo command to increase the size of a shared repository.

Syntax

oakcli configure repo reponame -incsize size [M|G] [-h]
Parameter Description

reponame

Name of the shared repository

size

Number that can be followed by M to define the size as megabytes or by G to define as size as gigabytes

-h

(Optional) Display help for using the command.

Increasing the Size of a Shared Repo

Increase the size of the repo1 shared repository by 2 gigabytes:

# oakcli configure repo repo1 -incsize 2G

Configured Shared Repo : repo1 with new size 3712.0.

oakcli copy

Use the oakcli copy command to prepare a copy of the configuration file for use during the configuration of Oracle Database Appliance.

Syntax

oakcli copy -conf absolute_conf_file [-h]

Parameters

Parameter Description

-conf absolute_conf_file

Specifies the full path name of the configuration file

-h

(Optional) Display help for using the command.

Example 15-1 Preparing a Copy of the Configuration File

If you created a configuration file previously and copied this file to Oracle Database Appliance, then prepare the configuration file to be used during the configuration process. For example, if you copied the file myserver1.conf to /tmp, then enter the following command:

oakcli copy -conf /tmp/myserver1.conf

oakcli create commands

Use the oakcli create commands to create components on Oracle Database Appliance.

oakcli create cpupool

Use the command oakcli create cpupool to create a CPU pool on one Oracle Database Appliance Virtualized Platform node.

Syntax

oakcli create cpupool poolname -numcpu cpu_count -node nodenum [-h]

Parameters

Parameter Description

poolname

Uniquely names the CPU pool

-numcpu cpu_count

Defines the number of CPUs for the CPU pool

-node nodenum

Defines the node where the CPU pool will be created (0 or 1)

-h

(Optional) Display help for using the command.

Example

Create a CPU pool with two CPUs on Node 1 of Oracle Database Appliance Virtualized Platform:

oakcli create cpupool twonode -numcpu 2 -node 1

oakcli create database

Use the oakcli create database command to create additional databases on Oracle Database Appliance.

When you run the commandoakcli create database, the command prompts you for further inputs.

Note:

Do not use Oracle Database Configuration Assistant (DBCA) to create databases on Oracle Database Appliance. Only use Oracle Appliance Manager for database configuration. Deploying Oracle Database instances using Oracle Appliance Manager ensures that these databases are properly configured, optimized, and supported on Oracle Database Appliance.

File Path

$ORACLE_HOME/directory_name

Syntax

oakcli create database -db db_name [[[-oh home] | [-version version]] [-params params_file] [-storage asm] [-cdb]][h]

Parameters

Parameter Description

-cdb

(Optional) Creates the database as a container database.

-db db_name

Name of the database that you want to create.

-oh home

(Optional) Name of an existing Oracle home to use when creating the database. By default, the command creates a new database home.

-params params_file

(Optional) Name of the configuration file. By default, Oracle Database Appliance uses the default configuration file.

-storage [ASM|ACFS]

(Optional) Creates an Oracle 12c database with the specified storage, either Oracle Automatic Storage Management (Oracle ASM) or Oracle Automatic Storage Management Cluster File System (Oracle ACFS). Oracle ASM storage is the default storage.

-version version

(Optional) Version of the database that you want to create. By default, Oracle Database Appliance uses the highest version that you have downloaded.

-h

(Optional) Display help for using the command.

Usage Notes

  • Flash cache is disabled and cannot be enabled.

  • The -oh and the -version parameters are mutually exclusive. Attempting to use both in the same command will generate an error.

  • When a database is created without identifying an Oracle home, a new Oracle home is created using a standard naming convention (for example, OraDb11204_home3). The number at the end of the name is incremented by one for each new home created with the same version number.

  • On Oracle Database Appliance X7-2-HA, the minimum supported Oracle Database release is 11.2.0.4. Oracle Database 11.2.0.3.x is not supported.

  • When you upgrade the database, infrastructure, and Oracle Grid Infrastructure, you must specify an existing home to create a new database.

  • If you try to create a database using the option -version version before downloading and unpacking the specific version database clone files, then the command will fail.

  • You can create configuration files with the oakcli create db_config_params command.

  • The prompt "Do you want to keep the data files on FLASH storage: [ Y | N ] " is only shown if you choose the OLTP database type and if there is some free space available on flash storage.

  • Beginning with Oracle Database 12c release 1 (12.1.0.2), you can create an Oracle Database in Oracle ASM. Oracle ASM is the default storage.

Examples

This section shows different scenarios for using the command oakcli create database.

Example 15-2 Creating a New Database Showing Prompts

When you run the command oakcli create database, you are prompted for several inputs.

The following command creates a database named mydb using an existing Oracle home named OraDb12102_home1:

# oakcli create database -db DBPROD 

INFO: 2017-07-25 19:21:16: Please check the logfile  
 '/opt/oracle/oak/log/ODADBI1/tools/12.2.1.1.0/createdb_DBPROD_29285.log' for more details 
INFO: 2017-07-25 19:21:24: Database parameter file is not provided. 
Will be using default parameters for DB creation  

Please enter the 'SYSASM'  password: 
Please re-enter the 'SYSASM' password: 

INFO: 2017-07-25 19:21:35: Installing a new Home : OraDb12102_home2 at
  /u01/app/oracle/product/12.1.0.2/dbhome_2 

Please select one of the following for Database type  [1 .. 3] : 
1    => OLTP 
2    => DSS 
3    => In-Memory 
1
 The selected value is : OLTP

1 => EE : Enterprise Edition
2 => RACONE
3 => RAC1
3
Selected value is : RAC
 
Specify the  Database Class (1. odb-01 '1 core, 8 GB memory'   2.Others) [1]
:2
 
Please select one of the following for Database Class    [1 .. 10]:
1    => odb-01s  (   1 cores ,     4 GB memory)
2    =>  odb-01  (   1 cores ,     8 GB memory)
3    =>  odb-02  (   2 cores ,    16 GB memory)
4    =>  odb-04  (   4 cores ,    32 GB memory)
5    =>  odb-06  (   6 cores ,    48 GB memory)
6    =>  odb-08  (   8 cores ,    64 GB memory)
7    =>  odb-10  (  10 cores ,    80 GB memory)

Example 15-3 Creating a New Database in an Existing Oracle Home

Create a database called sales1 in OraDb11204_home2:

oakcli create database -db sales1 -oh OraDb11204_home2

Example 15-4 Creating a New Database from a Template

Create a database called sales2 from the salesdbtemplate.bconf file (by appending the default file extension to the file name provided). This example also creates a new Oracle home:

oakcli create database -db sales2 -params salesdbtemplate

oakcli create dbhome

Use the oakcli create dbhome command to create a new database home on Oracle Database Appliance.

Syntax

oakcli create dbhome [-version version] [-h]

Parameters

Parameter Description

-version version

(Optional) Version that you want to install. If this is not provided, then Oracle Database Appliance uses the latest available version.

-h

(Optional) Display help for using the command.

Creating a Database Home

Create a database home called sales1 using Oracle Database version 12.1.0.2.4.

oakcli create dbhome -version 12.1.0.2.4

oakcli create dbstorage

Use the oakcli create dbstorage command to create a storage structure for migrating databases from Oracle ASM to Oracle ACFS.

Syntax

oakcli create dbstorage -db db_name [-cdb][-h]

Parameters

Parameter Description

-db db_name

Sets up the required Oracle ACFS storage structure for the database to be created called db_name

-cdb

Must be passed if you are creating a multitenant container database

-h

(Optional) Display help for using the command.

Example

The oakcli create dbstorage command requests user input to determine the size of the storage structure to create, as shown in this example:

oakcli create dbstorage -db sales
 
Please enter the 'root' password :
Please re-enter the 'root' password:
 
Please enter the 'oracle' password :
Please re-enter the 'oracle' password:
 
Please enter the 'SYSASM' password:
Please re-enter the 'SYSASM' password:
 
Specify the Database Class (1. odb-01 '1 core, 8 GB memory' 2. Others) [1]:2
 
Please select one of the following for Database Class [1 .. 8] :
1 => odb-01s ( 1 cores , 4 GB memory)
2 => odb-01 ( 1 cores , 8 GB memory)
3 => odb-02 ( 2 cores , 16 GB memory)
4 => odb-04 ( 4 cores , 32 GB memory)
5 => odb-06 ( 6 cores , 48 GB memory)
6 => odb-12 ( 12 cores , 96 GB memory)
7 => odb-16 ( 16 cores , 128 GB memory)
8 => odb-24 ( 24 cores , 192 GB memory)
 
 
Selected value is: odb-01s ( 1 cores , 4 GB memory)
...

oakcli create db_config_params

Use the oakcli create db_config_params command to generate a database configuration file.

The configuration file is created in /opt/oracle/oak/install/dbconf and is given the default extension .dbconf.

Syntax

oakcli create db_config_params -conf filename [-h]

Parameters

Parameter Description

-conf filename

Name you want to give to the configuration file, without its path name.

-h

(Optional) Display help for using the command

Example

Create the database parameter file: /opt/oracle/oak/install/dbconf/newconf.dbconf:

# oakcli create db_config_params -conf newconf

Please select one of the following for Database Block Size  [1 .. 4]:
1 ==> 4096
2 ==> 8192
3 ==> 16384
4 ==> 32768
2
Selected value is: 8192

Specify the  Database Language (1. AMERICAN 2. Others) [1]:
Selected value is: AMERICAN

Specify the  Database Characterset (1. AL32UTF8 2. Others) [1]:2

Please select one of the following for Database Characterset [0 .. 10] :
0 => Others
1 => AL32UTF8
2 => AR8ADOS710
3 => AR8ADOS710T
4 => AR8ADOS720
5 => AR8ADOS720T
6 => AR8APTEC715
7 => AR8APTEC715T
8 => AR8ARABICMACS
9 => AR8ASMO708PLUS
10 => AR8ASMO8X
1
Selected value is: AL32UTF8

Specify the  Database Territory (1. AMERICA 2. Others) [1]:2

Please select one of the following for Database Territory [0 .. 10] :
0 => Others
1 => ALBANIA
2 => ALGERIA
3 => AMERICA
4 => ARGENTINA
5 => AUSTRALIA
6 => AUSTRIA
7 => AZERBAIJAN
8 => BAHRAIN
9 => BANGLADESH
10 => BELARUS
3
Selected value is: AMERICA

Specify the  Component Language (1. en 2. Others) [1]:2

Please select one of the following for Component Language [0 .. 10] :
0 => Others
1 => en : English
2 => fr : French
3 => ar : Arabic
4 => bn : Bengali
5 => pt_BR : Brazilian Portuguese
6 => bg : Bulgarian
7 => fr_CA : Canadian French
8 => ca : Catalan
9 => hr : Croatian
10 => cs : Czech
1
Selected value is: en
Successfully generated the Database parameter file 'newconf'

oakcli create repo

Use the oakcli create repo command to create a new shared repository on Oracle Database Appliance Virtualized Platform.

Syntax

oakcli create repo repo_name -size size [M|G] -dg DATA|RECO [-h]

Parameters

Parameter Description

repo_name

Name assigned to the shared repository

-size size [M|G]

Amount of storage to be assigned to the shared repository. It can be defined in megabytes with the M option or in gigabytes with the G option.

-dg DATA|RECO

Oracle ASM disk group in which the shared repository is to be stored, either the DATA+ disk group or the RECO+ disk group, selected by using the DATA or RECO option respectively

-h

(Optional) Display help for using the command.

Usage Notes

  • The -size parameter requires a whole number for size.

  • The minimum value for size is 500 when M is used or 1 when G is used for the sizing unit.

  • The default unit for size is G (gigabytes).

  • A shared repository should only be used for the virtual machine and not as a file staging area. Avoid copying or moving files into a shared repository.

Example

Create a 25-gigabyte shared repository named repoprod1 in the DATA+ disk group:

oakcli create repo repoprod1 -dg DATA -size 25

oakcli create snapshotdb

Use the oakcli create snapshotdb command to create a snapshot database from an existing database.

Syntax

oakcli create snapshotdb [-db snap_dbname -from dbname] | [-h]

Parameters

Parameter Description

-db snap_dbname

Name of the snapshot database to be created

-from source_dbname

Name of the source database

-h

(Optional) Display help for using the command

Example

Create a new snapshot database, name snapprod, from the database named prod:

oakcli create snapshotdb -db snapprod -from prod

oakcli delete commands

Use the oakcli delete commands to delete components from Oracle Database Appliance.

oakcli delete cpupool

Use the oakcli delete cpupool command to delete a CPU pool from one Oracle Database Appliance Virtualized Platform node.

Syntax

oakcli delete cpupool poolname -node nodenum [-h]

Parameters

Parameter Description

poolname

Name of the CPU pool to be deleted

-node nodenum

Node from which the CPU pool will be deleted (0 or 1)

-h

(Optional) Display help for using the command.

Example

Delete the CPU pool named twonode from Node 1 of Oracle Database Appliance Virtualized Platform:

oakcli delete cpupool twonode -node 1

oakcli delete database

Use the oakcli delete database command to delete a database from Oracle Database Appliance.

Syntax

oakcli delete database -db db_name [-h]

Parameters

Parameter Description

db_name

Name of the database that you want to delete

-h

(Optional) Display help for using the command

Example

Delete the database named sales1:

oakcli delete database -db sales1

oakcli delete db_config_params

Use the oakcli delete db_config_params command to delete a database configuration file.

Syntax

oakcli delete db_config_params -conf filename [-h]

Parameters

Parameter Description

-conffilename

Name of the configuration file that you want to remove, without its path name

-h

(Optional) Display help for using the command

oakcli delete dbhome

Use the oakcli delete dbhome command to delete a database home from Oracle Database Appliance.

Syntax

oakcli delete dbhome -oh oracle_home [-h]

Parameters

Parameter Description

-oh oracle_home

The database home to be uninstalled

-h

(Optional) Display help for using the command.

Example

Delete a database home called ora11_1:

oakcli delete dbhome -oh ora11_1

oakcli delete dbstorage

Use the oakcli delete dbstorage command to delete a storage structure that was created for the purpose of migrating databases from Oracle ASM to Oracle ACFS.

For example, run this command if you created a storage structure using create dbstorage that is no longer required.

Syntax

oakcli delete dbstorage -db  db_name [-cdb] [-h]

Parameters

Parameter Description

db db_name

Name of the database structure to be deleted

-cdb

Must be passed if you are deleting a multitenant container database

-h

(Optional) Display help for using the command

Example

Delete the sales storage structure:

oakcli delete dbstorage -db sales

oakcli delete repo

Use the oakcli delete repo command to delete a shared repository.

Syntax

oakcli delete repo repository_name [-h]

Parameter

Parameter Description

repository_name

The name of the shared repository to be deleted

-h

(Optional) Display help for using the command.

Example

Delete the testrepo01 shared repository:

oakcli delete repo testrepo01

The command will not succeed if testrepo01 is active on one or both nodes.

oakcli deploy

Use the command oakcli deploy to deploy Oracle Grid Infrastructure for a cluster on Oracle Database Appliance.

Syntax

oakcli deploy [-config] [-conf config_file] [-advance][-h]

Parameters

Parameter Description

-config

(Optional) Run the Oracle Appliance Manager Configurator.

-conf config_file

(Optional) Preload the configuration stored in the named configuration file, config_file.

-advance

(Optional) Perform the deployment, or run the Oracle Appliance Manager Configurator, in advance mode. Use this option to launch Oracle Appliance Manager and change the default user ID or group user ID.

-h

(Optional) Display help for using the command.

Usage Notes

When defining the user ID and the group ID, it is a best practice to use different values.

Examples

Use these examples to understand how to use the command oakcli deploy.

Example 15-5 Deploying the Complete Oracle Database Appliance

oakcli deploy

Example 15-6 Running the Configurator

oakcli deploy -config

Example 15-7 Running the Offline Configurator with Advance Mode

To run the offline Configurator with advance mode, update the config.sh file and add -advance.

cat config.sh #!/bin/sh  java -Djava.util.logging.config.file=onecommand.properties -jar onecommand.jar config -advance  run ./config.sh 

Example 15-8 Preloading an Existing Configuration File

Preload the configuration stored in the configuration file MYCONFIG-VM:

oakcli deploy -conf myconfig -vm_file

Example 15-9 Changing a User Group Name or ID

You can change the following group user names or IDs on the User Group Information page: GI User, DB User, Install Group, DBA Group, DBA Oper Group, ASM DBA Group, ASM Oper Group, and ASM Admin Group.

  1. Run the Configurator or Offline Configurator in -advance mode.

  2. Select Custom to display the User Group Information page.

  3. Change the group name or ID, then click Next.

  4. Click Finish.

Example 15-10 Viewing the Log File

The command oakcli deploy creates a log file that is prepended with the character string STEP*. The log file is stored in the following location:

/opt/oracle/oak/onecmd/tmp/

oakcli expand storage

Use the oakcli expand storage command to configure the solid-state drives (SSDs) for data storage into the existing base configuration to fully populate the base storage shelf.

File Path

$ORACLE_HOME/opt/oracle/oak/bin/oakcli

Syntax

 oakcli expand storage [-h]

Parameters

Parameter Description

-h

(Optional) Display help for using the command.

Usage Notes

After all disks are inserted into the slots, execute the oakcli expand storage command on both nodes. First on the master node and then wait for 30 seconds and execute from the slave nodes. It takes about 10 to 12 minutes to add all of the disks.

Review the procedure for how to add the storage shelf for detailed steps on how to add the disks, the timing needed to avoid flooding disk events, and the steps to validate that all disks are online and are in a good state.

Example 15-11 Expanding Storage

#oakcli expand storage 

Precheck passed. 
Successfully formatted 1.6TB SSD disks... 
Check the progress of expansion of storage by executing 'oakcli show disk' 
Waiting for expansion to finish ...

oakcli diskwritecache

Use the oakcli diskwritecache command to locate disks with write cache enabled and to disable disk write cache for those disks.

Enabled write caches should be disabled as soon as downtime for Oracle Database Appliance can be scheduled. During the downtime, use this command with the disable option for each disk, in turn, that has an enabled write cache.

Syntax

oakcli diskwritecache [disable disk_name | enable disk_name | status ] [-h]

Parameters

Parameter Description

disable disk_name

(Optional) Disable disk write cache for named disk.

enable disk_name

(Optional) Enable disk write cache for named disk.

status

(Optional) Show the write cache status of all disks.

-h

(Optional) Display help for using the command.

Example 15-12 Displaying the Write Cache Status of Disks

Show the write cache status of all disks:

oakcli diskwritecache status

oakcli locate disk

Use the oakcli locate disk command to locate the physical disk that is associated with a named Oracle ASM disk by turning the disk's LED light on or off.

Syntax

oakcli locate disk diskname [on|off][-h]

Parameters

Parameter Description

diskname

Name of the Oracle ASM disk to locate

on

(Optional) Turns on the LED of the named disk

off

(Optional) Turns off the LED of the named disk

-h

(Optional) Display help for using the command.

Example 15-13 Locating an Oracle ASM Disk by Turning on the Disk’s LED

Turn on the LED of the Oracle ASM disk named disk pd_23:

oakcli locate disk pd_23 on

oakcli manage diagcollect

Use the oakcli manage diagcollect command to collect diagnostic information about Oracle Database Appliance for troubleshooting purposes, and for working with Oracle Support Services.

Syntax

oakcli manage diagcollect [--all | --crs [--crshome crs_home_dir] 

(continued)
[--core] | --install | --chmos [--incidenttime time] [--incidentduration time]

(continued)
|--adr adr_location [--afterdate date] 

(continued)
[--aftertime time] [--beforetime time] ]
 [excl comp1,comp2,...] [--clean] [--storage][-h]

Parameters

Parameter Description

--all

Collect all of the diagnostic information excluding Automatic Diagnostic Repository (ADR) and Cluster Health Monitor. This is the default option.

--crs

Collect Oracle Clusterware diagnostic information.

--crshome crs_home_dir

Specifies the location of the Oracle Clusterware home directory

--core

Package core files with the Oracle Clusterware diagnostic data.

--install

Collect the installation logs when the installation failed before running the script root.sh.

--adr adr_location

Collect diagnostic information for ADR, where adr_location specifies the location of the ADR information.

--afterdate date

Collect archives from the specified date. Specify the date in the mm/dd/yyyy format.

--aftertime time

Collect the archives after the specified time. Enter the time using the format YYYYMMDDHHMMSS24. Supported only with the -adr parameter.

--beforetime time

Collect the archives before the specified time. Enter the time using the format: YYYYMMDDHHMMSS24. Supported only the with the -adr parameter.

--chmos

Collect Cluster Health Monitor data.

--incidenttime time

Collect Cluster Health Monitor data from the specified time. Enter the time using the format: YYYYMMDDHHMMSS24.

If you do not use the --incidenttime parameter, then the command collects data for the past 24 hours.

--incidentduration time

Collect Cluster Health Monitor data for the duration after the specified time. Enter the time using the format: HH:MM. If you do not specify a duration, then the command collects all Cluster Health Monitor data after the specified incident time.

--excl [comp1,comp2...]

Exclude the specified component logs. Valid components are: acfs, invt, sys, ocr, crs, home, and base.

--clean

Remove the diagnosability information gathered by this command.

--storage

Collect all of the logs for any storage issues. The logs can be used when you are experiencing any problems with storage and need support to diagnose the logs.

--h

(Optional) Display help for using the command.

oakcli modify database

Use the oakcli modify database command to modify the database type or size class for a named database.

Syntax

oakcli modify database -db db name [-dbtypeOLTP|DSS|in-Memory] [-to dbSizeclass] 

Parameters

Parameter Description

-db db-name

Identifies the database being modified.

-dbtype OLTP|DSS|in-Memory

(Optional) Changes the database type. The parameter dbtype takes one of the following three options:

  • OLTP: Online transaction processing

  • DSS: Decision support system

  • in-Memory: Oracle Database In-Memory

-to dbclass

(Optional) Changes the database size class.

-h

(Optional) Displays help for using the command.

Usage Notes

Note:

When you resize the database, the redo log file size is not modified automatically. Change the size of the redo log manually to the size that you require for your applications.

Example 15-14 Modifying the Database Type

Here are examples of how to use the oakcli modify database command.

Change the database type assigned to the database dbhome_1 to a DSS database:

oakcli modify database DB dbhome_1 -dbtype DSS

Example 15-15 Modifying the Database Size

Change the database size for the database named dbhome_1 to a 6-core CPU Oracle Database Appliance DSS database template:

oakcli modify database dbhome_1 -to odb-06

oakcli orachk

Use the oakcli orachk command to audit configuration settings with the ORAchk utility.

Syntax

oakcli orachk [-a|-b|-v|-h|-p|-f|-m[-u -o][o]-c -t][-clusternodes |-localonly][-debug][-dbnames |-dbnone|-dball][upgrade]listlist

Parameters

Parameter Description

-a

Perform a best practice check and recommended patch check.

-b

Perform a best practice check only without the recommended patch check.

-v

Display version.

-h

Display command usage (help).

-p

Perform patch check only.

-f

Run the command offline.

-m

Exclude checks for Maximum Availability scorecards.

-u -o

Perform check on pre-upgrade best practices (-u -o pre) or on post-upgrade best practices (-u -o post).

-o

As an argument to an option, if -o is followed by v, V, Verbose, or VERBOSE, output will display checks that pass on the display. Without the -o option, only failures will display on the screen.

-c

Determines granularity of information displayed on the screen. For use only when working with Oracle Support Services.

-clusternodes list

list is a comma-delimited list containing the names of the nodes where the command should run.

-localonly

Run the command only on the local node.

-debug

Creates a debug log.

-dbnames list

list is a comma-delimited list containing the names of the subset of databases on which the command should run.

-dbnone

Skip all database-related checks on all databases without prompting to select which database to skip.

-dball

Run all database-related checks on all databases without prompting to select which databases to check.

-upgrade

Force upgrade of the version of the ORAchk utility being run.

Usage Notes

  • The command offers multiple options that are generic to the ORAchk command when run on servers other than the Oracle Database Appliance server. You can find details about these options by running the command oakcli orachk -h. The options are grouped into the following categories, but this document does not list the options for each category:

    • Report Options

    • Auto Restart Options

    • Daemon Options

    • Profile Run Options

  • For more information about ORAchk, see My Oracle Support note 1268927.2, "ORAchk Health Checks for the Oracle Stack" at https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=1268927.2

oakcli reconfigure osparams

Use the oakcli reconfigure osparams command to adjust the kernel parameters based on the available RAM after you upgrade memory or DIMM.

After you change or expand memory on Oracle Database Appliance, use the oakcli reconfigure osparams command to display the current configuration and suggested values for memlock and vm.nr_hugepages. When prompted, answer yes or no to change the value to the suggested value.

Syntax

oakcli reconfigure osparams [-h] 

Parameters

Parameter Description

-h

(Optional) Displays help for using the command.

Usage Notes

After you change or expand memory on Oracle Database Appliance, use this command to update the kernel parameters.

Note:

When adjusting the settings, ensure that you make the changes on both nodes.

Example 15-16 Viewing the Current and Suggested Kernel Parameters

In this example, the output displays the configured and suggested values for memlock and vm.nr_hugepages. When prompted, enter no for both parameters to view, but not implement the suggested values.

# oakcli reconfigure osparams
Configured value for memlock is: 11000000
Suggested value for memlock is: 11000000
Do you want to use suggested value of memlock?: yes/no
no
User entered no, not updating kernel.memlock
Configured value for vm.nr_hugepages is: 2048
Suggested value for vm.nr_hugepages parameter is: 4150
Do you want to update to suggested value?: yes/no
no
User entered no, not updating kernel.vm.nr_hugepages

Example 15-17 Reconfiguring the Kernel Based on Available RAM

In this example, the output displays the configured and suggested values for memlock and vm.nr_hugepages. The memlock value does not require changing. A new value is suggested for vm.nr_hugepages. When prompted, enter yes to update to the suggested value.

Note:

You must adjust the value on both nodes.
# oakcli reconfigure osparams 
Configured value for memlock is: 193000000 
Suggested value for memlock is: 193000000 
Configured and suggested values are same 
Configured value for vm.nr_hugepages is: 67815 
Suggested value for vm.nr_hugepages parameter is: 67748 
Do you want to update to suggested value?: yes/no 
yes

oakcli resize dbstorage

Use the oakcli resize dbstorage command to resize the space used for a storage structure that was created for the purpose of migrating databases from Oracle ASM to Oracle ACFS.

You can check the current space usage using oakcli show fs and then add space using oakcli resize dbstorage.

Note:

You cannot decrease the size of the space used for Oracle ACFS.

Syntax

oakcli resize dbstorage -data size -reco size -redo size -db  db_name [-h]

Parameters

Parameter Description

-data size

Extendable size in GB for the DATA volume.

-reco size

Extendable size in GB for the REDO volume.

-redo size

Extendable size in GB for the RECO volume.

-db db_name

Database for which these volumes must be resized.

-h

(Optional) Display help for using the command.

Example 15-18 Increasing the Size of the DATA Volume

Increase the size of the volume by 10 GB on the DATA volume:

oakcli resize dbstorage -data 10

oakcli restart oda_base

Use the oakcli restart oda_base command to stop and restart ODA_BASE on the local node.

Use this command only when you are not concerned about the current status of ODA_BASE, because it performs a forced shutdown. You must run this command from Dom0. Typically, if ODA_BASE needs to be restarted, then you must restart it on both nodes.

Syntax

oakcli restart oda_base [-h]

The ODA_BASE that you want to restart is on the same node as the Dom0 from which you run this command.

Parameter

(Optional) -h displays help for using the command.

oakcli show commands

Use the oakcli show commands to display the status of Oracle Database Appliance components.

The oakcli show commands display status information for the node where you run the command. To see the list of components available on the current node, use the help option: oakcli show -h:

Note:

Depending on your model and version of Oracle Database Appliance software, the oakcli show command options may differ from the ones shown in this section and explained in the following sections. To obtain an annotated list of components available on your system, run the command oakcli show -h.

oakcli show asr

Use the oakcli show asr command to display your Oracle Auto Service Request configuration details.

Syntax

oakcli show asr [-h]

Parameters

(Optional) -h displays the help for using this command.

oakcli show cooling

Use the oakcli show cooling command to display the status of the cooling units.

Syntax

oakcli show cooling [-h]

Parameters

(Optional) -h displays the help for using this command.

Example

Display the cooling unit information for the node where the command is executed:

oakcli show cooling        
NAME   HEALTH HEALTH_DETAILS LOCATION FAN % FAN SPEED        
Fan_0  OK     -              FM0      30 %  6300 RPM        
Fan_1  OK     -              FM0      19 %  3800 RPM        
Fan_10 OK     -              FM2      34 %  6600 RPM        
Fan_11 OK     -              FM2      23 %  4100 RPM        
Fan_12 OK     -              FM3      32 %  6300 RPM        
Fan_13 OK     -              FM3      22 %  3900 RPM        
Fan_14 OK     -              FM3      24 %  4700 RPM        
Fan_15 OK     -              FM3      14 %  2500 RPM        
Fan_2  OK     -              FM0      29 %  6400 RPM        
Fan_3  OK     -              FM0      18 %  3700 RPM        
Fan_4  OK     -              FM1      32 %  6400 RPM        
Fan_5  OK     -              FM1      20 %  3700 RPM        
Fan_6  OK     -              FM1      33 %  6400 RPM        
Fan_7  OK     -              FM1      22 %  3800 RPM        
Fan_8  OK     -              FM2      33 %  6400 RPM        
Fan_9  OK     -              FM2      22 %  3900 RPM

oakcli show controller

Use the oakcli show controller command to display information about the disk controllers.

Syntax

oakcli show controller controller_id [-h]

Parameters

Parameter Description

controller_id

Specifies the controller for which to display information

-h

(Optional) Display help for using the command.

Displaying Disk Controller Details

Display details of controller 0:

oakcli show controller 0

oakcli show cpupool

Use the oakcli show cpupool command to display core allocations to virtual machine mappings.

Syntax

oakcli show cpupool -node nodenum

nodenum is the number of the Oracle Database Appliance node that you want to examine, either 0 or 1.

Displaying Core Mapping for Node 0

Display the core mapping information for Node 0:

oakcli show cpupool -node 0
         Pool           Cpu List          VM List
default-unpinned-pool   [14, 15, 16, 17,  ['test1_odarepo1','sample5_odarepo1', 
                         18, 19, 20, 21,   'vm_very_long_name_sample1_odarepo1',
                         22, 23]           'win_vm1']
         twocpu          [12, 13]         ['vm1_odarepo1']
      odaBaseCpuPool     [0, 1, 2, 3, 10  ['oakDom1']
                          , 11]

oakcli show databases

Use the oakcli show databases command to display information about each existing database, including database name, database type, database home name and location, and database version.

Syntax

oakcli show databases [-h]

Parameters

Parameter Description
-h

(Optional) Displays help for using the command.

Usage Notes

On Oracle Database Appliance, the minimum supported Oracle Database release is 11.2.0.4. Oracle Database 11.2.0.3.x is not supported.

Example 15-19 Displaying Database Details

# oakcli show databases
Name   Type   Storage   HomeName             HomeLocation                                Version                            
-----  -----  --------  --------------       ----------------                            ----------                         
omydb  RAC     ACFS      OraDb12102_home1    /u01/app/oracle/product/12.1.0.2/dbhome_1   12.1.0.2.160719(23054246,23054327) 
orcl   RAC     ACFS      OraDb12102_home1    /u01/app/oracle/product/12.1.0.2/dbhome_1   12.1.0.2.160719(23054246,23054327) 

Example 15-20 Displaying Database Details for Four Databases

#oakcli show databases

Name Type     Storage  HomeName         HomeLocation                               Version
---- ----     -------  --------         ------------                               -------
db1 RAC        ACFS    OraDb12102_home1 /u01/app/oracle/product/12.1.0.2/dbhome_1  12.1.0.2.5(21359755,21359758)
db2 SINGLE     ACFS    OraDb12102_home2 /u01/app/oracle/product/12.1.0.2/dbhome_2  12.1.0.2.5(21359755,21359758)
db3 RACOneNode ACFS    OraDb12102_home3 /u01/app/oracle/product/12.1.0.2/dbhome_3  12.1.0.2.5(21359755,21359758)
db4 RAC        ACFS    OraDb12102_home4 /u01/app/oracle/product/12.1.0.2/dbhome_4  12.1.0.2.5(21359755,21359758)

oakcli show db_config_params

Use the oakcli show db_config_params command to display configuration file names and parameters.

The command searches for files with the extension .dbconf located in the /opt/oracle/oak/install/dbconf directory.

Syntax

oakcli show db_config_params [-conf filename] [-detail] [-h]

Parameters

Parameter Description

-conf filename

(Optional) Name of configuration file to be displayed. If not included, then the command displays all configuration files.

-detail

(Optional) Display the parameter values stored in the configuration file or files.

-h

(Optional) Display help for using the command.

Displaying the Default Database Configuration Parameters

Display the default database configuration parameter values stored in the configuration file or files:

oakcli show db_config_params -detail
Available DB configuration files are:
          Default
          DATABASE_BLOCK_SIZE       =>    8192
          DATABASE_LANGUAGE         =>    AMERICAN
          DATABASE_CHARACTERSET     =>    AL32UTF8
          DATABASE_TERRITORY        =>    AMERICA
          COMPONENT_LANGUAGES       =>    en

oakcli show dbhomes

Use the oakcli show dbhomes command to display information about each existing Oracle database home, including home name, home location, and database version.

Syntax

oakcli show dbhomes [-detail] [-h]

Parameters

Parameter Description

-detail

(Optional) Include a list of databases associated with each home.

-h

(Optional) Display help for using the command.

Usage Notes

On Oracle Database Appliance, the minimum supported Oracle Database release is 11.2.0.4. Oracle Database 11.2.0.3.x is not supported.

Example 15-21 Displaying DB Home Details

# oakcli show dbhomes

Oracle Home Name      Oracle Home version                  Home Location     
---------------       -------------------                  ------------ 
OraDb12102_home1      12.1.0.2.160719(23054246,23054327)  /u01/app/oracle/product/12.1.0.2/dbhome_1                      

Example 15-22 Displaying DB Home Details

oakcli show dbhomes -detail

Oracle HomeName  Oracle Home Version            Oracle HomeLocation                 Database Name  Database Type
---------------  -------------------            -------------------                 -------------  -------------
OraDb11204_home1 11.2.0.4.8(21352635,21352649)  /u01/app/oracle/product/11.2.0.4/dbhome_1  no DB      available
OraDb12102_home1 12.1.0.2.5(21359755,21359758)  /u01/app/oracle/product/12.1.0.2/dbhome_1  one43      RACOneNode
OraDb12102_home1 12.1.0.2.5(21359755,21359758)  /u01/app/oracle/product/12.1.0.2/dbhome_1  ee120      SINGLE
OraDb12102_home1 12.1.0.2.5(21359755,21359758)  /u01/app/oracle/product/12.1.0.2/dbhome_1  one311     RACOneNode
OraDb12102_home1 12.1.0.2.5(21359755,21359758)  /u01/app/oracle/product/12.1.0.2/dbhome_1  ee311      SINGLE
OraDb12102_home1 12.1.0.2.5(21359755,21359758)  /u01/app/oracle/product/12.1.0.2/dbhome_1  rac311     RAC
OraDb12102_home1 12.1.0.2.5(21359755,21359758)  /u01/app/oracle/product/12.1.0.2/dbhome_1  ee43       SINGLE
OraDb12102_home1 12.1.0.2.5(21359755,21359758)  /u01/app/oracle/product/12.1.0.2/dbhome_1  one120     RACOneNode
OraDb12102_home1 12.1.0.2.5(21359755,21359758)  /u01/app/oracle/product/12.1.0.2/dbhome_1  odacn      RAC
OraDb12102_home1 12.1.0.2.5(21359755,21359758)  /u01/app/oracle/product/12.1.0.2/dbhome_1  rac43      RAC
OraDb12102_home1 12.1.0.2.5(21359755,21359758)  /u01/app/oracle/product/12.1.0.2/dbhome_1  rac120     RAC

oakcli show dbstorage

Use the oakcli show dbstorage command to display database storage information for databases created on Oracle Automatic Storage Management Cluster File System (Oracle ACFS).

All non-cdb databases are listed together, because they share a common set of volumes. Each CDB database is listed separately.

Syntax

oakcli show dbstorage [-db] db_name[-h]

Parameters

Parameter Description

-db dbname

(Optional) Display the name of the database for the storage information.

-h

(Optional) Display help for using the command.

Usage Notes

Add additional information about the command here.

Example 15-23 Oracle Database Appliance with Non-CDB Databases

Here is an example of the oakcli show dbstorage command output for an Oracle Database Appliance. The output includes only non-CDB databases. Half of the available disk group storage is allocated to Oracle ACFS, except for the FLASH disk group. In the FLASH disk group, all storage is allocated to Oracle ACFS.

# oakcli show dbstorage
 
All the DBs with DB TYPE as non-CDB share the same volumes 
 
DB_NAMES            DB_TYPE  Filesystem                       Size    Used  Available  AutoExtend Size DiskGroup
--------            -------  ----------                       -----   ----  ---------  --------------- ---------
db1, db2, db3, db4  non-CDB /u01/app/oracle/oradata/datastore   62G  27.26G    34.74G       6G         REDO
                            /u02/app/oracle/oradata/datastore 3730G   7.86G  3722.14G     373G         DATA
                            /u02/app/oracle/oradata/flashdata  558G 205.25G   352.75G      55G         FLASH
                            /u01/app/oracle/fast_recovery_area/datastore
                                                              4958G  21.05G  4936.95G      495G        RECO

oakcli show disk

Use the oakcli show disk command to display disk information.

Syntax

oakcli show  disk  [-shared | -local | -shared_disk_name |-asm [-all][-h]

Parameters

Parameter Description

-local

(Optional) Display information for all of the local disks.

-shared

(Optional) Display information for all of the shared disks.

-shared_disk_name

(Optional) Display information for only the specified shared disk.

-asm

(Optional) Displays information for an assembly.

-all

(Optional) Display complete details of the selected disk or disks.

-h

(Optional) Display help for using the command.

Usage Notes

  • Running the command with no parameters is identical to running the oakcli show disk -shared command.

  • The -all parameter produces valid output only when used with the shared_disk_name parameter. All other parameters are optional and cannot be combined with other parameters.

Example 15-24 Displaying Information About the Local Disks

oakcli show disk -local

Example 15-25 Displaying Information About the Shared Disks

oakcli show disk -shared

Example 15-26 Displaying Information About a Specific Shared Disk

Display information about the shared disk named pd_01:

oakcli show disk -shared pd_01

oakcli show diskgroup

Use the oakcli show diskgroup command to display Oracle Automatic Storage Management (Oracle ASM) disk group information.

Syntax

oakcli show diskgroup [disk_group_name][-h]

Parameters

Parameter Description

disk_group_name

(Optional) The name of an Oracle ASM disk group for which complete details should be displayed. If you do not specify this parameter, then information for all of the Oracle ASM disk groups is displayed.

-h

(Optional) Display help for using the command.

oakcli show enclosure

Use the oakcli show enclosure command to display information about the storage enclosure subsystem on the node where the command is executed.

Syntax

oakcli show enclosure [-h]

Parameter

-h displays help for using the command.

oakcli show env_hw

Use the oakcli show env_hw command to display the environment type and hardware version of the current node.

Syntax

oakcli show env_hw [-h]

Parameter

(Optional) -h displays help for using the command.

Displaying the Environment and Hardware for a Virtualized Platform

Show the environment type and hardware model when logged in to ODA_BASE on Oracle Database Appliance Virtualized Platform:

oakcli show env_hw
VM-ODA_BASE ODA X7-2

oakcli show expander

Use the oakcli show expander command to display information about a SAS expander.

Syntax

oakcli show expander [expander_id] [-h]

Parameter

Parameter Description

expander_id

(Optional) Identifies the specific SAS expander

-h

(Optional) Display help for using the command.

oakcli show ismaster

Use the oakcli show ismaster command to determine which node is the master node.

File Path

$ORACLE_HOME/opt/oracle/oak/bin/oakcli

Syntax

 oakcli show ismaster [-h]

Parameters

Parameter Description

-h

(Optional) Display help for using the command.

Example 15-27 Determining Which Node is the Master Node

# oakcli show ismaster

oakcli show fs

Use the oakcli show fs command to display all database and cloudfs file systems created on ASM Cluster File System (ACFS) in addition to the local file systems on the Oracle Database Appliance node.

Syntax

oakcli show fs [-h]

Parameter

(Optional) -h displays help for using the command.

oakcli show memory

Use the oakcli show memory command to display information about memory modules.

Syntax

oakcli show memory [-h]

Parameter

(Optional) -h displays help for using the command.

oakcli show network

Use the oakcli show network command to display information about the network subsystem.

Syntax

oakcli show network

Parameter

(Optional) -h displays help for using the command.

oakcli show power

Use the oakcli show power command to display information about the power supply subsystem.

Syntax

oakcli show power [-h]

Parameter

(Optional) -h displays help for using the command.

Example 15-28 Displaying Power Supply Information

Display the power supply information of the node where the command is executed:

# oakcli show power

NAME            HEALTH HEALTH_DETAILS PART_NO. SERIAL_NO.         LOCATION INPUT_POWER OUTPUT_POWER INLET_TEMP      EXHAUST_TEMP 
Power_Supply_0  OK      -             7047410  476856F+1242CE0020 PS0      Present     113 watts    33.250 degree C 36.688 degree C
Power_Supply_1  OK      -             7047410  476856F+1242CE004J PS1      Present     89 watts     37.000 degree C 39.438 degree C

oakcli show processor

Use the oakcli show processor command to display information about CPU processors.

Syntax

oakcli show processor [-h]

Parameter

(Optional) -h displays help for using the command.

Displaying CPU Processor Information

Display the CPU processor information of the node where the command is executed:

oakcli show processor
        NAME  HEALTH HEALTH_DETAILS PART_NO. LOCATION
MODEL                         MAX_CLK_SPEED TOTAL_CORES ENABLED_CORES
 
        CPU_0 OK     -              060D     P0 (CPU 0)
Intel(R) Xeon(R) CPU E5-2690  2.900 GHZ         8           8
        CPU_1 OK     -              060D     P1 (CPU 1)
Intel(R) Xeon(R) CPU E5-2690  2.900 GHZ     8           8

oakcli show raidsyncstatus

Use the oakcli show raidsyncstatus command to display the status of the RAID rebuild after a failed local disk is replaced.

Note:

The show raidsyncstatus command is only supported on a bare metal platform; it is not supported on the virtualized platform. For general RAID information, use the oakcli show iraid command.

Syntax

oakcli show raidsyncstatus [-h]

Parameter

(Optional) -h displays help for using the command.

oakcli show repo

Use the oakcli show repo command to display information about virtual machine repositories.

Syntax

oakcli show repo [reponame -node 0|1] [-h]

Parameters

Parameter Description

reponame

[Optional] Identifies a specific repository name

-node

[Optional] Identifies the node number 0 or 1

-h

[Optional] Display help for using the command.

To see all repositories, omit the repository name and node number. To see a specific shared repository, include the repository name and node.

Examples

Here are examples of how to use the oakcli show repo command.

Example 15-29 Displaying the Available Virtual Machine Repositories

Display the virtual machine repositories on Oracle Database Appliance Virtualized Platform nodes:

oakcli show repo
        NAME      REPOTYPE  NODENUM
        odarepo1  local     0
        odarepo2  local     1
        repo1     shared    0
        repo1     shared    1

Example 15-30 Displaying Details About a Specific Shared Repository

Display information about the repository named repo1 on Node 1:

oakcli show repo repo1 -node 1
 
Resource: repo1_1
        AutoStart       :       restore       
        DG              :       DATA          
        Device          :       /dev/asm/repo1-286
        ExpectedState   :       Online        
        MountPoint      :       /u01/app/repo1
        Name            :       repo1_0       
        Node            :       all           
        RepoType        :       shared        
        Size            :       102400        
        State           :       Online

oakcli show server

Use the oakcli show server command to display information about the server subsystem.

Syntax

oakcli show server [-h]

Parameter

(Optional) -h displays help for using the command.

oakcli show storage

Use the oakcli show storage command to display information about the storage for controllers, expanders, and disks.

Syntax

oakcli show storage -errors [-h]

Parameters

Parameter Description

-errors

Display detailed information about reported errors.

-h

(Optional) Display help for using the command.

oakcli show validation storage

Use the oakcli show validation storage command to show whether validation storage is enabled or disabled.

Syntax

oakcli show validation storage [-h]

Parameter

(Optional) -h displays help for using the command.

Example 15-31 Determining if Storage Validation is Enabled

# oakcli show validation storage
Enabled

oakcli show validation storage errors

Use the oakcli show validation storage errors command to show hard storage errors.

Hard errors include having the wrong type of disk inserted into a particular slot, an invalid disk model, or an incorrect disk size.

Syntax

oakcli show validation storage errors [-h]

Parameter

(Optional) -h displays help for using the command.

oakcli show validation storage failures

Use the oakcli show validation storage failures command to show soft validation errors. A typical soft disk error would be an invalid version of the disk firmware.

Syntax

oakcli show validation storage failures [-h]

Parameter

(Optional) -h displays help for using the command.

oakcli show version

Use the oakcli show version command to display the applied patch versions for Oracle Database Appliance software and firmware.

Syntax

oakcli show version [-detail] [-h]
Parameter Description

-detail

(Optional) Display detailed version information.

-h

(Optional) Display help for using the command.

Usage Notes

When you apply the patch and then run the command oakcli show version -detail, the output shows the installed version and that the supported versions are Up-to-date for each component. If you unpack the patch bundle (oakcli unpack -pack) and then run the command oakcli show version -detail before applying the patch, the output shows No-update in the Supported Version column.

Note:

After unpacking the patch bundle, but before applying the patch, use the oakcli update -patch version --verify command to verify the contents of the patch instead of issuing oakcli show version -detail.

Displaying the Oracle Database Appliance Version

This is an example of how to determine if all of the components are successfully updated after applying the 12.1.2.10.0 patch. You can also view the applied patch version information for the software and firmware on Oracle Database Appliance. All components are successfully updated when Up-to-date appears in the Supported Version column.

# oakcli show version -detail 

Mon Feb 13 03:31:48 PST 2017 
Reading the metadata. It takes a while... 
System Version   Component Name             Installed Version            Supported Version 
--------------   ---------------           ------------------           ----------------- 
12.1.2.10.0                                                                    
              
                Controller_INT            4.230.40-3739             Up-to-date
              
                Controller_EXT            09.00.00.00               Up-to-date
              
                Expander                  0291                      Up-to-date
              
                SSD_SHARED {                                                  
              
                [ c2d20,c2d21,c2d22,      A29A                      Up-to-date
              
                c2d23 ]                                                      
              
                [ c2d0,c2d1,c2d2,c2d      A29A                      Up-to-date
              
                3,c2d4,c2d5,c2d6,c2d                                          
              
                7,c2d8,c2d9,c2d10,c2                                          
              
                d11,c2d12,c2d13,c2d1                                          
              
                4,c2d15,c2d16,c2d17,                                          
              
                c2d18,c2d19 ]                                                
              
                             }                                                
              
                SSD_LOCAL                 0R3Q                      Up-to-date
              
                ILOM                      3.2.8.24 r114611          Up-to-date
              
                BIOS                      38070000                  Up-to-date
              
                IPMI                      1.8.12.4                  Up-to-date
              
                HMP                       2.3.5.2.8                 Up-to-date
              
                OAK                       12.1.2.10.0               Up-to-date
              
                OL                        6.8                       Up-to-date
              
                GI_HOME                   12.1.0.2.170117(2473      Up-to-date
              
                                                2082,24828633)                             
              
                DB_HOME                   12.1.0.2.170117(2473      Up-to-date
              
                                          2082,24828633)                      

Related Topics

oakcli start commands

Use the oakcli start commands to start a virtual machine, to start a shared repository on a node, or to start ODA_BASE on the local node.

oakcli start oda_base

Use the oakcli start oda_base command to start ODA_BASE on the local node.

Syntax

oakcli start oda_base [-h]

Parameter

(Optional) -h displays help for using the command.

Example 15-32 Starting ODA_BASE on the Local Node

Connect to Dom0 on the desired node and enter the following command to start ODA_BASE on that node:

oakcli start oda_base

oakcli start repo

Use the oakcli start repo command to start a shared repository on a node.

Syntax

oakcli start repo repo_name [-node node_number] [-h]

Parameters

Parameter Description

repo_name

repo_name is the name of the shared repository to be started.

-node node_number

Specifies the node on which to start the shared repository. node_number is the number of the node where it is to be started, either 0 or 1. If -node is not specified, the shared repository is started on both nodes.

-h

(Optional) Displays help for using the command.

Example 15-33 Starting a Shared Repository on Node 0

Start the shared repository named repo1 on Node 0:

oakcli start repo repo1 -node 0

oakcli stop command

Use the oakcli stop command to stop a virtual machine, to stop a shared repository on a node, or to stop ODA_BASE on the local node.

Syntax

oakcli stop [vm vm_name [-force] | repo repo_name [-node node_number] | oda_base ] [-h]

Parameters

Parameter Description

vm vm_name

vm_name is the name of the virtual machine to be stopped.

-force

(Optional) forces the virtual machine to stop.

repo repo_name

repo_name is the name of the shared repository to be stopped.

-node node_number

node_number is the number of the node where the shared repository is to be stopped, either 0 or 1. The -node parameter is only valid when stopping a virtual machine on a shared repository. If -node is not specified, the shared repository is stopped on both nodes.

oda_base

Stops ODA_BASE on the local node

-h

(Optional) Displays help for using the command.

Examples

Here are examples of how to use the oakcli stop command.

Example 15-34 Forcing a Virtual Machine to Stop

Force the virtual machine named vm1_odarepo1 to stop:

oakcli stop vm vm_odarepo1 -force

Example 15-35 Stopping a Shared Repository

Stop the shared repository named repo1 on Node 0:

oakcli stop repo repo1 -node 0

Example 15-36 Stopping the Local ODA_Base

Connect to Dom0 on the desired node and enter the following command to stop ODA_BASE on that node:

oakcli stop oda_base

oakcli stordiag

Use the oakcli stordiag command to run diagnostic tests on a disk in the storage shelf or storage expansion shelf.

The tool produces a list of 14 disk checks for each node.

Syntax

oakcli stordiag resource_type [n| [-h] 

Parameters

Parameter Description

resource_type

Prefix that depends on the configuration. See "Usage Notes."

n

(Optional) Disk number (starting with 0 and increasing to one less than the number of disks)

-h

(Optional) Display help for using the command.

Usage Notes

Select the value for resource_type based from one of the following options:

  • On Oracle Database Appliance Version 1, use d.

  • On Oracle Database Appliance with a single storage shelf, use pd_.

  • On Oracle Database Appliance with an expansion storage shelf, use e0_pd_ for a disk in the storage shelf and use e1_pd_ for a disk in the expansion storage shelf.

For Oracle Database Appliance systems that have internal storage, use the format d_[..] to identify the disk to be diagnosed. For Oracle Database Appliance systems that have connected a storage shelf (and optional storage expansion shelf), use the format e[0..1] pd_[0..23] to identify the disk to be diagnosed.

Example 15-37 Running Diagnostic Tests on a Disk in the Expansion Storage Shelf

Runs the diagnostic tests on disk 3 in the expansion storage shelf:

# oakcli stordiag e1_pd_3
 Node Name : hr0
 Test : Diagnostic Test Description
 
   1  : OAK Check
        NAME          PATH          TYPE          STATE         STATE_DETAILS
        pd_03         /dev/sdw      HDD           ONLINE        Good    
 
   2  : ASM Check  
. . .
<output truncated>

oakcli test asr

Use the oakcli test asr command to send a test trap to determine if Oracle Auto Service Request (Oracle ASR) is configured and working correctly.

The command returns a success message if Oracle ASR is functioning properly.

Syntax

oakcli test asr [-h]

Parameter

(Optional) -h displays help for using the command.

Usage Notes

Run the command on both nodes. The Oracle ASR logs are always on the node where the ASR Manager is installed, which is the master node.

oakcli unpack

Use the oakcli unpack command to unpack packages into the Oracle Appliance Manager repository.

Syntax

oakcli unpack -package absolute_package_name

Parameters

Parameters Description

absolute_package_name

Identifies the package to be unpacked using the package's full absolute path and file name

-h

(Optional) Display help for using the command.

Example 15-38 Unpacking Packages into the Oracle Appliance Manager Repository

Unpack the p13982331_23000_Linux-86-62.zip package, which was previously copied to /tmp on the current node, into the node's Oracle Appliance Manager command-line interface repository:

oakcli unpack -package /tmp/p13982331_23000_Linux-86-62.zip

oakcli update

Use the oakcli update command to apply Oracle Database Appliance patches.

You can apply patches using the patch bundle and use the --local patching option to patch components one node at a time without impacting the other node. This reduces the downtime when applying the patch.

Note:

If you want to update only the Oracle Database software, use the oakcli upgrade command.

Syntax

oakcli update -patch version [--server | --storage | --database] [--local} [--noreboot] | [--clean] | [--verify][-h]

Parameters

Parameter Description

- patch version

Patch version that you want to install. For example: 12.2.1.4.0.

--server

Contains the patches previously obtained in earlier releases from the Infrastructure (infra) and Grid Infrastructure (gi) patch updates.

--storage

Contains only patches for shared storage components.

--database

(Optional) Patches Oracle database homes.

--local

Patches the component only on the local node on bare metal deployments. By default, this is set to false.

--noreboot

(Optional) Node is not rebooted after patching.

--clean

(Optional) Cleans up all temporary files on the local node.

--verify

(Optional) Lists the patchable components on the node.

-h

(Optional) Display help for using the command.

Usage Notes

After unpacking the patch bundle, but before applying the patch, verify the contents of the patch for the release.

Note:

When patching a virtualized platform, the --local option is not supported.

Example 15-39 Verify the Contents of a Patch Bundle

Display the installed version and the version available in the 12.2.1.4.0 release patch bundle for each of the components on the node. When the latest supported version is installed, Up-to-date appears in the Proposed column.

# oakcli update -patch 12.2.1.4.0 --verify

INFO: 2017-02-13 14:20:37: Reading the metadata file now...

Patch Version         Component Name        Installed Version      Proposed
---------------       ------------------    -----------------     ----------
                     Controller_INT            4.230.40-3739        Up-to-date              
                     Controller_EXT            09.00.00.00          10.00.00.00              
                      Expander                  0291                Up-to-date  
           
                    SSD_SHARED {                                                  
              
                [ c2d20,c2d21,c2d22,            A29A                Up-to-date              
                c2d23 ]                                                      
              
                [ c2d0,c2d1,c2d2,c2d            A29A                Up-to-date              
                3,c2d4,c2d5,c2d6,c2d                                          
              
                7,c2d8,c2d9,c2d10,c2                                          
              
                d11,c2d12,c2d13,c2d1                                          
              
                4,c2d15,c2d16,c2d17,                                          
              
                c2d18,c2d19 ]                                                
              
                             }                                                
              
                SSD_LOCAL                 0R3Q                      Up-to-date              
                ILOM                      3.2.7.26.a r112632        3.2.8.24 r114611        
                BIOS                      38050100                  38070000  
              
                IPMI                      1.8.12.4                  Up-to-date              
                HMP                       2.3.5.2.5                 2.3.5.2.8
              
                OAK                       12.2.1.3                12.2.1.4.0              
                OL                        6.8                       Up-to-date              
                GI_HOME                   12.1.0.2.161018(2400      12.1.0.2.170117(2473    
                                          6101,23854735)            2082,24828633)          
                DB_HOME                   12.1.0.2.160719(2305      12.1.0.2.170117(2473    
                                          4246,23054327)            2082,24828633)          
                ASR                       5.5.1                     Up-to-date              

oakcli update -patch Command Examples

Update the appliance with the 12.2.1.4.0 patch:

oakcli update -patch 12.2.1.4.0

Patch the server on the current node with the 12.2.1.4.0 patch:

oakcli update -patch 12.2.1.4.0 --server --local

Patch the grid home only on the local node:

oakcli update -patch 12.2.1.4.0 --storage --local

Patch the Oracle Database homes on both nodes:

oakcli update -patch 12.2.1.4.0 --database

oakcli update-cpucore

Use the oakcli update-cpucore command to enable a specified number of licensed CPU cores for Oracle Database Appliance.

Prerequisites

If all cores are not enabled, you can enable multiples of 2 licensed CPU cores up to the maximum number of cores.

File Path

$ORACLE_HOME/opt/oracle/oak/bin/oakcli

Syntax

 oakcli update-cpucore  -cores number of cores per server [-h]

Parameters

Parameter Description

-cores

Defines the number of cores to enable per server, in multiples of 2. To enable all available cores, specify All instead of the number of cores.

-h

(Optional) Display help for using the command.

Usage Notes

  • This command applies only to bare metal deployments. It is not available on an Oracle Database Appliance Virtualized Platform.

  • The number of licensed cores you enable must be a multiple of 2, up to the maximum number of cores.

  • After the initial configuration, you cannot reduce the number of cores. You can purchase additional cores and increase the number of cores, up to the maximum number of cores for the hardware model.

Example 15-40 Enabling 12 CPU Cores for Oracle Database Appliance

The following command enables 12 CPU cores on an Oracle Database Appliance system.

oakcli update-cpucore -cores 12

Please enter the 'root' password: 
Please re-enter the 'root' password: 
Setting up SSH ..............Completed
INFO   : Running as root: /usr/bin/ssh -l root 192.0.2.1 /etc/rc.d/rc3.d/S90cpu-core
INFO   : Running as root: /usr/bin/ssh -l root 192.0.2.1 /etc/rc.d/rc3.d/S90cpu-core

Example 15-41 Enabling All CPU Cores for Oracle Database Appliance

The following command enables all cores on an Oracle Database Appliance system.

oakcli update-cpucore -cores All

Please enter the 'root' password: 
Please re-enter the 'root' password: 
Setting up SSH ..............Completed
INFO   : Running as root: /usr/bin/ssh -l root 192.0.2.1 /etc/rc.d/rc3.d/S90cpu-core
INFO   : Running as root: /usr/bin/ssh -l root 192.0.2.1 /etc/rc.d/rc3.d/S90cpu-core

oakcli upgrade

Use the oakcli upgrade command to upgrade the Oracle Database software on Oracle Database Appliance.

For patching Oracle Database Appliance itself, use the oakcli update command.

Syntax

oakcli upgrade database [-db db_names | -from source_home] -to destination_home

Parameters

Parameter Description

-db db_names

Specifies the name or names (in a comma-delimited list) of the database or databases you want to upgrade

-from source_home

Specifies the current Oracle Database home of the databases you are upgrading

-to destination_home

Specifies the Oracle Database home containing the version to which you want to upgrade the databases

-h

(Optional) Display help for using the command.

Usage Notes

  • You must include either a -db parameter or a -from parameter.

  • Running the command with a -db parameter upgrades only the named databases, regardless of their current Oracle Database homes. If you include a -from parameter in addition to a -db parameter, then the command ignores the -from parameter. That is, the command upgrades named databases from other homes and ignores the databases in the named home if they are not listed in the -db parameter.

  • Running the command without a -db parameter will upgrade all of the databases in the named Oracle Database home.

  • You must always provide a -to parameter that names an existing Oracle Database home.

Example

Upgrade an Oracle 11.2.0.3.1 database named tpcc from Oracle Database 11.2.0.3.1 to Oracle Database 12.1.0.2 using the Oracle Database home directory OraDb12102_home1:

oakcli upgrade database -db tpcc -to OraDb12102_home1

oakcli validate

Validates the state of an Oracle Database Appliance or the viability of an operating system patch.

Syntax

oakcli validate [[-V | -l | -h]] | [[-v][-f output_file] [-a | -d | -c checklist][-ver patch_version]]

Parameters

Parameter Description

-V

Display the version of oakValidation.

-l

List the items that can be checked (and their descriptions).

-h

(Optional) Display help for using the command.

-v

Show verbose output (must be used with a parameter that generates a validation report).

-f output_file

Send output to a file with a fully qualified file name, output_file, instead of to the screen (stdout).

-a

Run all system checks, including DiskCalibration. Oracle recommends that you use this command to validate system readiness before deployment. Do not run oakcli validate with this option on a busy production system, because the DiskCalibration system check can cause performance issues.

-d

Run only the default checks. The default checks are NetworkComponents, OSDiskStorage, SharedStorage, and SystemComponents.

The NetworkComponents validation check is not available on Oracle Database Appliance V1.

-c checklist

Run the validation checks for the items identified in checklist, a comma-delimited list. Use this parameter to check either a single item or subset of items.

-c ospatch

Run the validation checks for the patch version identified in -ver patch_version.

-ver patch_version

Report any reasons for not being able to patch Oracle Database Appliance with the patch named in patch_version.

Listing All Checks and Their Descriptions

oakcli validate -l

         Checkname -- Description
         =========    ===========
         *SystemComponents -- Validate system components based on ilom sensor data
         readings
         *OSDiskStorage -- Validate OS disks and filesystem information
         *SharedStorage -- Validate Shared storage and multipathing information
         DiskCalibration -- Check disk performance with orion
         *NetworkComponents -- Validate public and private network components
         *StorageTopology -- Validate external JBOD connectivity
         asr -- Validate asr components based on asr config file and ilom sensor
         data readings

* -- These checks are also performed as part of default checks

Running All Checks

Enter the following command to run all checks:

oakcli validate -a

Validating Storage Cable Connections

Check the cable connections between the system controllers and the storage shelf, as well as the cable connection to the storage expansion shelf (if one is installed):

oakcli validate -c storagetopology

Oracle recommends that you run the oakcli validate -c StorageTopology command before deploying the system. This will avoid and prevent problems during deployment due to wrong or missing cable connections. The output shown in the following example reports a successful configuration. If the cabling is not correct, you will see errors in your output.
# oakcli validate -c storagetopology
 It may take a while. Please wait...
 INFO : ODA Topology Verification
 INFO : Running on Node0
 INFO : Check hardware type
 SUCCESS : Type of hardware found : X4-2
 INFO : Check for Environment(Bare Metal or Virtual Machine)
 SUCCESS : Type of environment found : Virtual Machine(ODA BASE)
 SUCCESS : Number of External LSI SAS controller found : 2
 INFO : Check for Controllers correct PCIe slot address
 SUCCESS : External LSI SAS controller 0 : 00:15.0
 SUCCESS : External LSI SAS controller 1 : 00:16.0
 INFO : Check if  powered on
 SUCCESS : 1 : Powered-on
 INFO : Check for correct number of EBODS(2 or 4)
 SUCCESS : EBOD found : 2
 INFO : Check for External Controller 0
 SUCCESS : Controller connected to correct ebod number
 SUCCESS : Controller port connected to correct ebod port
 SUCCESS : Overall Cable check for controller 0
 INFO : Check for External Controller 1
 SUCCESS : Controller connected to correct ebod number
 SUCCESS : Controller port connected to correct ebod port
 SUCCESS : Overall Cable check for controller 1
 INFO : Check for overall status of cable validation on Node0
 SUCCESS : Overall Cable Validation on Node0
 INFO : Check Node Identification status
 SUCCESS : Node Identification
 SUCCESS : Node name based on cable configuration found : NODE0
 INFO : Check  Nickname
 SUCCESS :  Nickname set correctly : Oracle Database Appliance - E0
 INFO : The details for Storage Topology Validation can also be found in log file=/opt/oracle/oak/log/<hostname>/storagetopology/StorageTopology-2014-07-03-08:57:31_7661_15914.log

Validating Oracle ASR

Enter the following syntax to validate your Oracle ASR configuration:

# oakcli validate -c asr
INFO: oak Asr information and Validations
RESULT: /opt/oracle/oak/conf/asr.conf exist
RESULT: ASR Manager ip:10.139.154.17
RESULT: ASR Manager port:1162
SUCCESS: ASR configuration file validation successfully completed
RESULT: /etc/hosts has entry 141.146.156.46 transport.oracle.com
RESULT: ilom alertmgmt level is set to minor
RESULT: ilom alertmgmt type is set to snmptrap
RESULT: alertmgmt snmp_version is set to 2c
RESULT: alertmgmt community_or_username is set to public
RESULT: alertmgmt destination is set to 10.139.154.17
RESULT: alertmgmt destination_port is set to 1162
SUCCESS: Ilom snmp confguration for asr set correctly
RESULT: notification trap configured to ip:10.139.154.17
RESULT: notification trap configured to port:1162
SUCCESS: Asr notification trap set correctly
INFO: IP_ADDRESS HOST_NAME SERIAL_NUMBER ASR PROTOCOL SOURCE PRODUCT_NAME
INFO: --------------- ------------------------------ ------------------------------ -------- --------- -------------- ------------------------------
10.170.79.98 oda-02-c 1130FMW00D Enabled SNMP ILOM SUN FIRE X4370 M2 SERVER
10.170.79.97 oda-01-c 1130FMW00D Enabled SNMP ILOM SUN FIRE X4370 M2 SERVER
INFO: Please use My Oracle Support 'http://support.oracle.com' to view the activation status.
SUCCESS: asr log level is already set to Fine.
RESULT: Registered with ASR backend.
RESULT: test connection successfully completed.
RESULT: submitted test event for asset:10.139.154.17
RESULT: bundle com.sun.svc.asr.sw is in active state
RESULT: bundle com.sun.svc.asr.sw-frag is in resolved state
RESULT: bundle com.sun.svc.asr.sw-rulesdefinitions is in resolved state
RESULT: bundle com.sun.svc.ServiceActivation is in active state
SUCCESS: ASR diag successfully completed

Checking the Viability of a Patch

Use the oakcli validate ospatch -ver patch_version command to report any reasons for not being able to patch Oracle Database Appliance with the patch named in patch_version. Run this command before you attempt to patch Oracle Database Appliance to determine if it will succeed or if you need to make changes before applying the patch.

# oakcli validate -c ospatch -ver 12.1.2.5.0
INFO: Validating the OS patch for the version 12.1.2.5.0
WARNING: 2015-10-10 06:30:32: Patching sub directory /opt/oracle/oak/pkgrepos/orapkgs/OEL/5.10/Patches/5.10.1 is not existing
INFO: 2015-10-10 06:30:32: May need to unpack the Infra patch bundle for the version: 12.1.2.5.0
ERROR: 2015-10-10 06:30:32: No OS patch directory found in the repository

Validating Hardware System and Network Components

The following command runs system checks to validate hardware system components and Oracle Database Appliance network components:

# oakcli validate -c SystemComponents,NetworkComponents

oakcli Virtual Disk Commands

Use the oakcli virtual disk (vdisk) commands to manage virtual disks on Oracle Database Appliance X7-2-HA virtualized platform.

oakcli create vdisk

Use the oakcli create vdisk command to create a new virtual disk in a shared repository on Oracle Database Appliance Virtualized Platform.

Syntax

oakcli create vdisk vdisk_name -repo repository_name -size size -type shared|local -sparse [-h]

Parameters

Parameter Description

vdisk_name

Name assigned to the virtual disk that is unique within the name repository

-repo repository_name

Name of the shared repository where the virtual disk will be created and from which it will acquire its storage

-size size

Amount of storage to be assigned from the shared repository to the shared disk. The default unit is G (for gigabytes) and the minimum size is 500 M (for megabytes)

-type shared | local

Sets the option of allowing the virtual disk to be shared by more than one virtual machine (shared) or used by only one virtual machine (local)

-sparse

Creates a sparse vdisk

-h

(Optional) Display help for using the command.

Example

Create a virtual disk named t2g in the shared repository named repoprod1 for use by only one virtual machine at a time in that repository. Assign the t2g virtual disk 2 GB in the repoprod1 shared repository.

oakcli create vdisk t2g -repo repoprod1 -type local -size 2G

oakcli clone vdisk

Use the oakcli clone vdisk command to create clones of virtual disks.

Syntax

oakcli clone vdisk new_vdisk_name -repo repo_name -src source_vdisk_name [-h]

Parameters

Parameter Description

new_vdisk_name

Name given to the clone virtual disk

repo_name

Name of the repository source for the virtual disk being cloned

source_vdisk_name

Name of the virtual disk being cloned

-h

(Optional) Display help for using the command.

Usage

The virtual disk and vm.cfg files are stored in the following directories:

  • Dom0/Repositories/vm_repo_name/.ACFS/snaps/vm_name/VirtualMachines/vm_name

  • ODA_BASE/app/sharedrepo/vm_repo_name/.ACFS/snaps/vm_name/VirtualMachines/vm_name

Example 15-42 Cloning a Virtual Disk

Clone a virtual disk named my_vdisk2 from an existing virtual disk named vdisk1 that is stored in the repository named vrepo1:

oakcli clone vdisk my_vdisk2 -repo vrepo1 -src vdisk1

oakcli delete vdisk

Use the oakcli delete vdisk command to delete a virtual disk from a shared repository on Oracle Database Appliance Virtualized Platform.

Syntax

oakcli delete vdisk vdisk_name -repo repository_name [-h]

Parameters

Parameter Description

vdisk_name

Name assigned to the virtual disk

-repo repository_name

Name of the shared repository where the virtual disk was created

-h

(Optional) Display help for using the command.

Example

Remove a virtual disk named t2g from the shared repository named repoprod1:

oakcli delete vdisk t2g -repo repoprod1

oakcli show vdisk

Use the oakcli show vdisk command to display information about virtual disks on Oracle Database Appliance Virtualized Platform.

Syntax

oakcli show vdisk [vdisk_name -repo repository_name] [-h]

Parameters

Parameter Description

vdisk_name

(Optional) Display information for just one virtual disk.

-repo repository_name

Required parameter if a virtual disk is specified in the command

-h

(Optional) Display help for using the command.

Examples

Here are examples of how to use the oakcli show vdisk command.

Example 15-43 Displaying Information for All Virtual Disks

Display information about all virtual disks on Oracle Database Appliance Virtualized Platform:

# oakcli show vdisk

    NAME                         SIZE     TYPE    REPOSITORY
    myvdisk                      10G      local   vdiskrepo
    newv                         1G       local   vdiskrepo

Example 15-44 Displaying Information for a Single Virtual Disk

Display information for the virtual disk named myvdisk1:

# oakcli show vdisk myvdisk1
Resource: myvdisk_vdiskrepo
        Name         :     myvdisk_vdiskrepo
        RepoName     :     vdiskrepo
        Size         :     10G
        Type         :     local
        VmAttached   :     0

oakcli Virtual Machine Commands

Use the oakcli virtual machine commands to list and manage virtual machines (VMs).

oakcli clone vm

Use the oakcli clone vm command to create clones and snap clones of virtual machines.

Syntax

To create a virtual machine from a template:

   oakcli clone vm vm_name -vmtemplate template_name -repo repo_name [-node 0|1] [-driverdomain]   

To create a snapshot clone of an existing virtual machine:

oakcli clone vm vm_name -vm src_vm_name -snap [-force] [-driverdomain]

To create a virtual machine snapshot from a template:

oakcli clone vm <vm_name> -vmtemplate src_vmtempl_name -snap [-driverdomain]

Parameters

Parameter Description

-vmvm_name

Identifies the name given to the new cloned virtual machine.

-vmtemplate template_name

Identifies the name of the template containing the virtual machine that you want to clone.

-repo repo_name

Identifies the name of the repository that contains the template being cloned.

-node 0 | 1

Identifies the Oracle Database Appliance node that contains the shared repository from which the virtual machine is to be cloned.

-vm src_name

Identifies the name of the virtual machine that is to be cloned.

-snap

(Optional) Creates a snapshot of the source virtual machine or virtual machine template.

-driverdomain

(Optional) Creates the virtual machine with the driver domain option.

The driver domain option improves performance by enabling guest virtual machines to use ODA_BASE instead of Dom0 to access virtual disks. Newly created virtual disks are mounted directly from ODA_BASE to a guest virtual machine.

-force

(Optional) When cloning a source virtual machine, the -force option enables you to make a change from the source virtual machine. For example, if the source file does not use a driver domain, you can use -force -driverdomain to create a clone virtual machine that does use the driver domain.

-h

(Optional) Displays help for using the command.

Usage Notes

  • The -node parameter must be used when you clone from a shared repository. The -node parameter is invalid for non-shared repositories.

  • The virtual disk and vm.cfg files are stored in the following directories:

    • Dom0/Repositories/vm_repo_name/.ACFS/snaps/vm_name/VirtualMachines/vm_name

    • ODA_BASE/app/sharedrepo/vm_repo_name/.ACFS/snaps/vm_name/VirtualMachines/vm_name

  • Live migration of driver domain virtual machines is not supported.

  • The driver domain option is supported with the following guest operating systems:
    • Oracle Linux with the latest Unbreakable Enterprise Kernel 2 (UEK2), Unbreakable Enterprise Kernel 3 (UEK3), or Unbreakable Enterprise Kernel Release 4 (UEK R4).

    • Microsoft Windows with Oracle VM Windows PV Driver 3.4.1. Oracle VM Windows PV Driver 3.4.1 release is available for download on My Oracle Support as patch number 23346086.

    • Oracle Solaris 11.3 or higher x86.

  • The driver domain only works when you add virtual disks to a guest virtual machine. When -driverdomain is specified, the cloned virtual machine is in driver domain mode. The corresponding virtual machine configuration file, vm.cfg, has the following disk entries:

     When -driverdomain is specified, the cloned virtual machine is in driver domain mode. The corresponding virtual machine configuration file, vm.cfg, has the following disk entries:

    disk = [u'file:/OVS/Repositories/repo5/.ACFS/snaps/vm10/VirtualMachines/

    vm10/System.img,xvda,w',

    u'file:/u01/app/sharedrepo/repo5/.ACFS/snaps/

    vm10/VirtualMachines/vm10/u01.img,xvdb,w,oakDom1']

    All disks, with the exception of the xvda boot disk, have the path from oakDom1, that is odabase.

  • The driver domain functionality applies to non-system disks. Once a virtual machine is created in driver domain mode, any new vDisks are added in driver domain mode.

  • To determine if a virtual machine is configured in driver domain mode, use the oakcli show vm vmname command. When the virtual machine is in driver mode, the output for the DriverDomain attribute is TRUE.

Example 15-45 Creating a Virtual Machine Image

Create a virtual machine image named myol6u_test from the virtual machine template named myol6u_15gb1, which is stored in the shared repository named repo2 on Node 0:

oakcli clone vm myol6u_test -vmtemplate myol6u_15gb1 -repo repo2 -node 0

Example 15-46 Creating a Virtual Machine Image in Driver Domain Mode

Create a virtual machine image named myol6u_test from the virtual machine template named myol6u_15gb1, which is stored in the shared repository named repo2 on Node 0 in driver domain mode:

oakcli clone vm myol6u_test -vmtemplate myol6u_15gb1 -repo repo2 -node 0 -driverdomain

oakcli configure vm

Use the oakcli configure vm command to configure a virtual machine on Oracle Database Appliance Virtualized Platform and to increase or decrease resource allocation to user domains.

You must restart the domain for the resource allocation change to take effect.

Syntax

oakcli configure vm name [-vcpu cpucount -maxvcpu maxcpu -cpuprio priority 
-cpucap cap -memory memsize -maxmemory max_memsize -os sys -keyboard lang -mouse 
mouse_type -domain dom -network netlist -autostart astart -disk disks -bootoption
bootstrap -cpupool pool -prefnode 0|1 -failover true|false][-h]

Parameters

Parameter Description

name

The name assigned to the virtual machine.

-vcpu cpucount

Number of nodes assigned to the virtual machine. The range is 1 to 72. This number depends on your Oracle Database Appliance configuration

-maxvcpu maxcpu

Maximum number of CPUs that the virtual machine can consume. The range is 1 to 72. This number depends on your Oracle Database Appliance configuration.

-cpuprio priority

Priority for CPU usage, where larger values have higher priority. The range is 1 to 65535.

-cpucap cap

Percentage of a CPU the virtual machine can receive. The range is 10 to 100.

-memory memsize

Amount of memory given to the virtual machine: (1 to 248)G to (1to 760G) or (1 to 253952)M to (1 to 778240)M, based on RAM. The default is M.

-maxmemory max_memsize

Maximum amount of memory allowed for the virtual machine: (1 to 248)G to (1 to 760)G or (1-253952)M to (1-778240)M, based on RAM. The default is M.

-os sys

Operating system used by the virtual machine (WIN_2003, WIN_2008, WIN_7, WIN_VISTA, OTHER_WIN, OL_4, OL_5, OL_6, RHL_4, RHL_5, RHL_6, LINUX_RECOVERY, OTHER_LINUX, SOLARIS_10, SOLARIS_11, OTHER_SOLARIS, or NONE)

-keyboard lang

Keyboard used by virtual machine (en-us, ar, da, de, de-ch, en-gb, es, et, fi, fo, fr, fr-be, fr-ca, hr, hu, is, it, ja, lt, lv, mk, nl, n--be, no, pl, pt, pt-br, ru, sl, sv, th, or tr)

-mouse mouse_type

Mouse type used by the virtual machine (OS_DEFAULT, PS2_MOUSE, USB_MOUSE, or USB_TABLET)

-domain dom

Domain type from the following options:

  • Hardware virtualized guest (XEN_HVM)

    - The kernel or operating system is not virtualization-aware and can run unmodified.

    - Device drivers are emulated.

  • Para virtualized guest (XEN_PVM)

    - The guest is virtualization-aware and is optimized for a virtualized environment.

    - PV guests use generic, idealized device drivers.

  • Hardware virtualized guest (XEN_HVM_PV_DRIVERS)

    The PV drivers are hypervisor-aware and significantly reduce the overhead of emulated device input/output.

  • Hardware virtualized guest (UNKNOWN)

-network netlist

MAC address and list of networks used by the virtual machine

-autostart astart

Startup option for virtual machine (always, restore, or never)

-disk disks

List of disks (slot, disktype, and content) used by virtual machine

-bootoption bootstrap

Boot option used to bootstrap the virtual machine (PXE, DISK, or CDROM)

-cpupool pool

Named CPU pool assigned to the virtual machine

-prefnode 0|1

Preferred node on which the virtual machine will attempt to start (Node 0 or Node 1). This parameter is only valid for virtual machines created in shared repositories.

-failover true|false

Allow (use the keyword "true") or disallow (use the keyword "false") the virtual machine to start or restart on a node other than the node defined by the -prefnode parameter. This parameter is only valid for virtual machines created in shared repositories.

-h

(Optional) Display help for using the command.

Usage Notes

  • All of the parameters, except for name, are optional.

  • You must include at least one optional parameter for the command to work.

  • When you create a virtual machine, select the Processor Cap as a percentage, between 10 and 100%. The default is 100%. This value is then converted to a CPU utilization limit in the vm.cfg file for the virtual machine. The value set in the vm.cfg file limits the amount of CPU a guest is allowed to consume. If the Processor Cap is set at 100% in Oracle VM, then the value set in vm.cfg is 0, which means there is no limit to CPU utilization.

See Also:

Oracle VM release 3.1 documentation contains more information about the options in the preceding table. Access the library at the following URL:

http://docs.oracle.com/cd/E27300_01

For example, refer to 2.8. Virtual Machines for information about the the -domain dom options:

http://docs.oracle.com/cd/E27300_01/E27309/html/vmusg-ovm-vms.html

Changing the Number of Virtual CPUs

This command example changes the number of virtual CPUs to 3, and changes the virtual memory size to 4 GB in a virtual machine named odarep01:

oakcli configure vm odarep01 -vcpu 3 -memory 4196 

oakcli delete vm

Use the oakcli delete vm command to delete a virtual machine.

Syntax

oakcli delete vm vm_name [-server node_number] [-h]

Parameters

Parameter Description

vm vm_name

(Optional) Name of the virtual machine to be deleted

-server node_number

(Optional) Oracle Database Appliance node from which you want to remove the virtual machine. If this optional parameter is not included, then the virtual machine is removed from both nodes.

-h

(Optional) Display help for using the command.

Example

Delete the ovu22 virtual machine from Node 1:

oakcli delete vm ovu22 -server 1

oakcli migrate vm

Use the oakcli migrate vm command to migrate a currently running virtual machine to another node.

Syntax

oakcli migrate vm vmname [-h]

Parameters

Parameter Description

vmname

Name of the virtual machine to be migrated

-h

(Optional) Display help for using the command.

oakcli modify vm

Use the oakcli modify vm command to modify an existing virtual machine.

Syntax

oakcli modify vm vmname [-attachvdisk|-deletenetworkvlanname] [-s key1:value1;key2:value2;...] [-addnetwork|-deletenetworkvlanname] [-h] 

Parameters

Parameter Description

-attachvdiskvdisk_name

(Optional) Attaches the named VDisk (virtual disk) to the named virtual machine.

-detachvdiskvdisk_name

(Optional) Detaches the named VDisk disk from the named virtual machine.

-s key1:value1;key2:value2;...

(Optional) Identifies a message consisting of one or more semicolon separated key:value pairs to send to the ovmd utility. Each key and value is separated by a colon (:) and each key/value pair is separated from the next key/value pair by quotation marks.

-addnetworkvlanname

(Optional) Adds a VLAN network to the named virtual machine.

-deletenetworkvlanname

(Optional) Removes a VLAN network from the named virtual machine.

-h

(Optional) Displays help for using the command.

Usage Notes

  • Do not use the -attachvdisk or the -detachvdisk option with the -addnetwork, -deletenetwork, or -s parameters.

  • Include only one of the -addnetwork, -deletenetwork, or -s parameters when you use this command.

Example 15-47 Sending a Message to a Running Virtual Machine

Update the root user password for the gc_11g virtual machine:

oakcli modify vm gc_11g -s "com.oracle.linux.root-password:password"

oakcli show vm

Use the oakcli show vm command to display information about virtual machines.

Syntax

oakcli show vm [vm_name | -h]

Parameters

Parameter Description

vm_name

(Optional) The name of the virtual machine for which details should be displayed. If you do not specify this parameter, then information for all the virtual machines is displayed.

-h

(Optional) Display help for using the command.

Usage Notes

When a virtual machine is configured in driver domain mode, the output of the oakcli show vm vmname command displays TRUE for the DriverDomain attribute.

Examples

Here are examples of how to use the oakcli show vm command.

Example 15-48 Displaying Details for All Virtual Machines

Display the virtual machine names, memory and vCPU allocations, status, virtual disks, and repository name for all virtual machines:

# oakcli show vm

NAME                    MEMORY          VCPU         STATE           REPOSITORY
 
sample5_odarepo1          2048             2         OFFLINE         odarepo1      
sample6_odarepo1          2048             2         OFFLINE         odarepo2      
test1_odarepo1            2048             2         OFFLINE         odarepo1      
test2_odarepo2            2048             2         OFFLINE         odarepo2      
vm1_odarepo1              4096             4         ONLINE          odarepo1      
vm2_odarepo2              2048             2         OFFLINE         odarepo2      
win_vm1                   1500             1         ONLINE          odarepo1

Example 15-49 Displaying Information for a Single Virtual Machine

Display information about the vm1_odarepo1 virtual machine:

oakcli show vm vm1_odarepo1
Resource: vm1_odarepo1
        AutoStart       :       restore       
        CPUPriority     :       100           
        Disks           :       |file:/OVS/Repositories/odarepo1/Vi
                                rtualMachines/vm1_odarepo1/System.i
                                mg,xvda,w||file:/OVS/Repositories/o
                                darepo1/VirtualMachines/vm1_odarepo
                                1/u01.img,xvdb,w|
        Domain          :       XEN_PVM       
        ExpectedState   :       online       
        FailOver        :       false
        IsSharedRepo    :       false
        Keyboard        :       en-us         
        MaxMemory       :       3000           
        MaxVcpu         :       4             
        Memory          :       4096          
        Mouse           :       OS_DEFAULT    
        Name            :       vm1_odarepo1  
        Networks        :       |mac=00:21:F6:00:00:E4|         
        NodeNum         :       0             
        NodeNumStart    :       
        OS              :       OL_5          
        PrivateIP       :       None          
        ProcessorCap    :       100           
        RepoName        :       odarepo1      
        State           :       Online        
        TemplateName    :       otml_sample1_odarepo1
        Vcpu            :       4             
        cpupool         :       twocpu        
        vncport         :       5901              

oakcli show vmconsole

Use the oakcli show vmconsole command to open a GUI virtual machine console to manage a specific virtual machine.

Syntax

oakcli show vmconsole vm_name [-h]

Parameters

Parameter Description

vm_name

Name of the virtual machine for which you want to open a console.

-h

(Optional) Display help for using the command.

Example 15-50 Opening a Virtual Machine Console

Open a console for the virtual machine named vm1_odarepo1:

oakcli show vmconsole vm1_odarepo1

oakcli start vm

Use the oakcli start vm command to start a virtual machine on a node.

Syntax

oakcli start vm vm_name [-node node_number] [-d] [-h]

Parameters

Parameter Description

vm_name

vm_name is the name of the virtual machine to be started.

-node node_number

Specifies the node on which to start the virtual machine. node_number is the number of the node where it is to be started, either 0 or 1. If -node is not specified, a virtual machine is started on both nodes.

-d

Provides details about the virtual machine starting procedure

-h

(Optional) Display help for using the command.

Example 15-51 Starting a Virtual Machine on Node 0

Start the virtual machine named vm1_odarepo1 on Node 0.

oakcli start vm vm_odarepo1 -node 0

oakcli Virtual Machine Template Commands

Use the oakcli Virtual Machine template commands to list and manage virtual machine (VM) templates.

oakcli configure vmtemplate

Use the oakcli configure vmtemplate command to configure a virtual machine template on Oracle Database Appliance Virtualized Platform.

Syntax

oakcli configure vmtemplate name [-vcpu cpucount -maxvcpu maxcpu -cpuprio priority -cpucap cap -memory memsize -maxmemory max_memsize -os sys -keyboard
 lang -mouse mouse_type -domain dom -network netlist -disk disks][h]

Parameters

Parameter Description

name

Name assigned to the virtual machine template

-vcpu cpucount

Number of nodes assigned to virtual machines cloned from the template.

-maxvcpu maxcpu

Maximum number of CPUs that virtual machines cloned from the template can consume.

-cpuprio priority

Priority for CPU usage, where larger values have higher priority (1 to 256).

-cpucap cap

Percentage of a CPU that virtual machines cloned from the template can receive (1 to 100).

-memory memsize

Amount of memory given to virtual machines cloned from the template (1G to 88 G or 1M to 90112M)

-maxmemory max_memsize

Maximum amount of memory allowed for virtual machines cloned from the template

-os sys

Operating system used by virtual machines cloned from the template (WIN_2003, WIN_2008, WIN_7, WIN_VISTA, OTHER_WIN, OL_4, OL_5, OL_6, RHL_4, RHL_5, RHL_6, LINUX_RECOVERY, OTHER_LINUX, SOLARIS_10, SOLARIS_11, OTHER_SOLARIS, or NONE)

-keyboard lang

Keyboard used by virtual machines cloned from the template (en-us, ar, da, de, de-ch, en-gb, es, et, fi, fo, fr, fr-be, fr-ca, hr, hu, is, it, ja, lt, lv, mk, nl, n--be, no, pl, pt, pt-br, ru, sl, sv, th, or tr)

-mouse mouse_type

Mouse type used by virtual machines cloned from the template (OS_DEFAULT, PS2_MOUSE, USB_MOUSE, or USB_TABLET)

-domain dom

Domain type from the following options:

  • Hardware virtualized guest (XEN_HVM)

    - The kernel or operating system is not virtualization-aware and can run unmodified.

    - Device drivers are emulated.

  • Para virtualized guest (XEN_PVM)

    - The guest is virtualization-aware and is optimized for a virtualized environment.

    - PV guests use generic, idealized device drivers.

  • Hardware virtualized guest (XEN_HVM_PV_DRIVERS)

    The PV drivers are hypervisor-aware and significantly reduce the overhead of emulated device input/output.

-network netlist

MAC address and list of networks used by virtual machines cloned from the template

-disk disks

List of disks (slot, disktype, and content) used by virtual machines cloned from the template

-h

(Optional) Display help for using the command.

Usage Notes

  • All of the parameters, except for name, are optional.

  • You must include at least one optional parameter for the command to work.

See Also::

Oracle VM Release 3.1 documentation, which is available at the following URL:

http://docs.oracle.com/cd/E27300_01 for more information about the options in the preceding table.

For example, see 2.8. Virtual Machines for details about the option -domain dom

http://docs.oracle.com/cd/E27300_01/E27309/html/vmusg-ovm-vms.html

Setting Values for a Virtual Machine

Set values for the following configuration values in the virtual machine template named myol5u7_10gb:

oakcli configure vmtemplate myol5u7_10gb
-vcpu 2 -maxvcpu 4 -cpucap 40 -memory 1536M -maxmemory 2G
-network "['type=netfront,bridge=net1']" -os OTHER_LINUX
  • -vcpu 2 = Two CPUs will assigned when the virtual machine starts up

  • -maxvcpu 4 = The maximum number of CPUs that can be assigned to the virtual machine is 4.

  • -cucap 40 = The maximum percentage of a CPU's capacity that will be assigned to the virtual machine is 40%.

  • -memory 1536M = The amount of memory assigned when the virtual machine starts up is 1536 MB.

  • -maxmemory 2G = The maximum amount of memory that can be assigned to the virtual machine is 2 GB.

  • -network type=netfront,bridge=net1 = This is the list of networks used by virtual machines cloned from the template.

  • -os = The operating system used by the virtual machine is OTHER_LINUX.

oakcli delete vmtemplate

Use the oakcli delete vmtemplate command to delete a virtual machine template.

Syntax

oakcli delete vmtemplate template_name [-server=node_number][-h]

Parameters

Parameter Description

template_name

Name of the virtual machine template to be removed

-server node_number

(Optional) Oracle Database Appliancenode from which you want to remove the virtual machine template. If this optional parameter is not included, then the virtual machine template is removed from both nodes.

-h

(Optional) Display help for using the command.

Example

Delete the ovu22 virtual machine template from both nodes:

oakcli delete vmtemplate ovu22

oakcli import vmtemplate

Use the oakcli import vmtemplate command to import virtual machine templates.

Syntax

oakcli import vmtemplate vmtemplatename -files image_files | -assembly assembly_file -repo repo_name [- node 0 | 1 ][-h]

Parameters

Parameter Description

vmtemplatename

Name that you want to assign to the template

-files

Use the -files option when importing one or more files that comprise a template.

image_files

image_files is one of the following:

  • A single template file name

  • A comma-separated list of files that comprise a single template

  • A URL enclosed in single quotation marks that links to a template file

-assembly

Use the -assembly option when importing an assembly file.

assembly_file

An assembly file, or a URL enclosed in single quotation marks, that links to an assembly file

repo_name

Name of the repository to store the template or templates that you are importing

-node

When you are importing to a shared repository, use the -node option with a value of 0 or 1 to identify the node.

-h

(Optional) Display help for using the command.

Usage Notes

  • Include only one of the options, -files or -assembly, each time you run this command. You cannot include both of these options in the same statement.

  • If the command imports more than one template from an assembly, then each template will automatically be given a unique name. These template names will include the name given in the vmtemplate vmtemplatename clause followed by a sequence number, such as vmtemplatename1, vmtemplatename2, and vmtemplatename3.

  • When importing into a shared repository, you must include the -node option with a valid node number, 0 or 1. Using the -node option for imports into non-shared repositories will cause the command to fail.

Examples

Here are examples of how to use the oakcli import vmtemplate command.

Example 15-52 Importing a Virtual Machine Template from Dom0

Import the required template (OVM_OL5U7_X86_64_PVM_10GB.tgz) from the /OVS directory in Dom0 into the odarepo1 repository and name the template file OL5U7:

oakcli import vmtemplate OL5U7 -files /OVS/OVM_OL5U7_X86_64_PVM_10GB.tgz -repo odarepo1

Example 15-53 Importing a Virtual Machine Template from a Remote Server

Import a template from a remote server using a URL to identify the server and the template file:

oakcli import vmtemplate OL5U6 -files 'http://example.com/vm-template/OEL-5/OVM_OL5U6_X86_64_PVM_10GB.tgz' -repo odarepo2

Example 15-54 Importing Virtual Machine Templates from an Assembly on a Remote Server

Import the templates contained in the assembly file stored on a remote server at the URL provided into the odarepo1 repository:

oakcli import vmtemplate OL6U1 -assembly 'http://example.com/assemblies/OEL6/OVM_OL6U1_x86_PVHVM.ova' -repo odarepo1

Example 15-55 Importing Virtual Machine Templates Into a Shared Repository From an Assembly on a Remote Server

Import the templates contained in the assembly file stored on a remote server at the URL provided into a shared repository named repo4 on Node 1:

oakcli import vmtemplate OL6U1 -assembly 'http://example.com/assemblies/OEL6/OVM_OL6U1_x86_PVHVM.ova' -repo repo4 -node 1

oakcli modify vmtemplate

Use the oakcli modify vmtemplate command to add networks to or delete networks from an existing virtual machine template.

Syntax

oakcli modify vmtemplate vmtemplatename [-addnetwork|-deletenetworkvlanname] [-h] 

Parameters

Parameter Description

-addnetworkvlanname

(Optional) Adds a VLAN network to the named virtual machine template

-deketenetworkvlanname

(Optional) Deletes a VLAN network from the named virtual machine template

-h

(Optional) Displays help for using the command.

Example 15-56 Modifying the Network Defined in a Virtual Machine Template

Replace the network assigned to the gc_11g virtual machine template with the net1 network:

oakcli modify vmtemplate gc_11g -addnetwork net1

oakcli show vmtemplate

Use the oakcli show vmtemplate command to display information about virtual machine templates.

Syntax

oakcli show vmtemplate [vmtemplate_name | -h]

Parameters

Parameter Description

vmtemplate_name

(Optional) The name of the virtual template for which details should be displayed. If you do not specify this parameter, then information for all of the virtual templates is displayed.

-h

(Optional) Display help for using the command.

Example 15-57 Display Information About a Virtual Template

Display information about the sample1_odarepo1 virtual template:

oakcli show vmtemplate sample_odarepo1
Resource: sample1_odarepo1
        CPUPriority     :       100           
        Disks           :       |file:/OVS/Repositories/odarepo1/Te
                                mplates/otml_sample1_odarepo1/Syste
                                m.img,xvda,w||file:/OVS/Repositorie
                                s/odarepo1/Templates/otml_sample1_o
                                darepo1/u01.img,xvdb,w|
        Domain          :       XEN_PVM       
        Keyboard        :       en-us         
        MaxMemory       :       2048          
        MaxVcpu         :       2             
        Memory          :       2048          
        Mouse           :       OS_DEFAULT    
        Name            :       sample1_odarepo1
        Networks        :       |bridge=priv1||bridge=net1||bridge=
                                net2|         
        NodeNum         :       0             
        OS              :       OL_5          
        ProcessorCap    :       100           
        RepoName        :       odarepo1      
        Vcpu            :       2 

oakcli VLAN Management Commands for Virtual Platform

Use the oakcli VLAN commands to list and manage virtual local area networks (VLANs) on an Oracle Database Appliance virtualized platform.

oakcli create vlan

Use the oakcli create vlan command to create a new virtual local area network (VLAN) on an Oracle Database Appliance Virtualized Platform node.

Syntax

oakcli create vlan vlan_name -vlanid tag_id -if interface_name -node 0|1 [-h]

Parameters

Parameter Description

vlan_name

Name assigned to the VLAN.

-vlanid tag_id

Tag number, used for packet routing, from 2 to 4096 inclusive. It uniquely identifies the VLAN on a node. You assign the ID and you can use the same tag number on both nodes.

-if interface_name

Name of the interface on which the VLAN network is created

-node 0 | 1

Node on which the VLAN is created, either Node0 or Node1.

-h

(Optional) Display help for using the command.

Usage Notes

  • You can assign VLANs to ODA_BASE during the deployment.

  • The VLAN for the ODA_BASE is created from DOM-0.

  • Only execute the VLAN created in Dom-0 from Node0.

  • VLAN creation in dom0 should be executed only from Node 0.

Examples

Here are examples of how to use the oakcli create vlan command.

Creating a New VLAN

Create a VLAN named sample10 on Node 1 using the bond1 interface and a tag with the number 10:

oakcli create vlan sample10 -vlanid 10 -if bond1 -node 1

Duplicating a VLAN on the Second Node

Create a VLAN named sample10 on Node 0:

oakcli create vlan sample10 -vlanid 10 -if bond1 -node 0

oakcli delete vlan

Use the oakcli delete vlan command to delete a virtual local area network.

Syntax

oakcli delete vlan vlan_name -node node_number [-h]

Parameters

Parameter Description

vlan vlan_name

Name of the virtual local area network to be deleted

-node node_number

Oracle Database Appliance node from which you want to remove the virtual local area network

-h

(Optional) Display help for using the command.

Example

Delete the sample1 virtual local area network from Node 1:

oakcli delete vlan sample1 -node 1

oakcli show vlan

Use the oakcli show vlan command to display information about virtual local area networks (VLANs) configured on Oracle Database Appliance.

Syntax

oakcli show vlan [-h]

Parameter

(Optional) -h displays help for using the command.

Example 15-58 Displaying Details of Available Virtual Area Networks (VLANs)

Display the names, tag ID numbers, networks, and node assignments for the available virtual local area networks:

oakcli show vlan
                    NAME                     ID    INTERFACE   NODENUM
 
        net1                     1     bond1       0
        net1                     1     bond1       1
        net2                     1     bond2       0
        net2                     1     bond2       1
        net3                     1     bond3       0
        net3                     1     bond3       1
        net4                     1     xbond0      0
        net4                     1     xbond0      1
        priv1                    1     bond0       0
        priv1                    1     bond0       1