19 Oracle Database Appliance Command-Line Interface for KVM

Use odacli commands to manage Oracle Linux Kernel-based Virtual Machine (KVM) on Oracle Database Appliance.

Note:

If you have enabled multi-user access, then you can run all supported ODACLI commands on KVM and DB systems, after logging in as odaadmin.

About Command-Line Interface for Kernel-Based Virtual Machine (KVM)

The odacli commands are the primary method for performing database and system administration on Oracle Database Appliance Kernel-Based Virtual Machine (KVM).

You can perform the following tasks with ODACLI commands on Kernel-Based Virtual Machine (KVM):
  • Manage VM instances

  • Manage VM storage

  • Manage virtual disks

  • Manage virtual network

  • Manage CPU pools

ODACLI Command Location and Path Configuration

The odacli command-line interface is in the following directory:

/opt/oracle/dcs/bin/odacli

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

ODACLI Syntax

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

An odacli command uses the following command syntax:

odacli 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 odacli command performs the operation. For example, you issue a command to create or configure a virtual disk, or a network, or perform other system or software administration. You can also use object abbreviations.

  • options are optional parts of the odacli command. Options can consist of one or more options that extend the use of the odacli 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 odacli commands available for your Oracle Database Appliance:

odacli -h

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

odacli command -h

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

odacli command object -h

About ODACLI Commands Supported on Oracle KVM Database System

Understand the odacli commands supported on Oracle Database Appliance Kernel-Based Virtual Machine (KVM) Database System in this release.

This release of Oracle Database Appliance supports the provisioning of Oracle KVM database system through odacli create-dbsystem or the Browser User Interface. The following ODACLI commands are supported on Oracle KVM Database System on Oracle Database Appliance:
  • odacli ping-agent

  • odacli delete-agentconfig-parameters

  • odacli list-agentconfig-parameters

  • odacli update-agentconfig-parameters

  • odacli restore-archivelog

  • odacli create-auto-logclean-policy

  • odacli delete-auto-logclean-policy

  • odacli list-auto-logclean-policy

  • odacli list-availablepatches

  • odacli create-backup

  • odacli delete-backup

  • odacli create-backupconfig

  • odacli delete-backupconfig

  • odacli describe-backupconfig

  • odacli list-backupconfigs

  • odacli update-backupconfig

  • odacli describe-backupreport

  • odacli describe-component

  • odacli set-credential

  • odacli create-database

  • odacli delete-database

  • odacli describe-database

  • odacli irestore-database

  • odacli list-databases

  • odacli modify-database

  • odacli recover-database

  • odacli register-database

  • odacli configure-dataguard

  • odacli deconfigure-dataguard

  • odacli failover-dataguard

  • odacli reinstate-dataguard

  • odacli switchover-dataguard

  • odacli describe-dataguardstatus

  • odacli list-dataguardstatus

  • odacli create-dbhome

  • odacli delete-dbhome

  • odacli describe-dbhome

  • odacli list-dbhomes

  • odacli create-dbstorage

  • odacli delete-dbstorage

  • odacli describe-dbstorage

  • odacli list-dbstorages

  • odacli describe-job

  • odacli list-jobs

  • odacli create-jobdata-retention-policy

  • odacli delete-jobdata-retention-policy

  • odacli list-jobdata-retention-policy

  • odacli describe-latestpatch

  • odacli create-logcleanjob

  • odacli describe-logcleanjob

  • odacli list-logcleanjobs

  • odacli list-logspaceusage

  • odacli describe-network

  • odacli list-networks

  • odacli describe-networkinterface

  • odacli list-networkinterfaces

  • odacli list-nodes

  • odacli create-objectstoreswift

  • odacli delete-objectstoreswift

  • odacli describe-objectstoreswift

  • odacli list-objectstoreswifts

  • odacli update-objectstoreswift

  • odacli list-osconfigurations

  • odacli update-osconfigurations

  • odacli list-pendingjobs

  • odacli create-prepatchreport

  • odacli delete-prepatchreport

  • odacli describe-prepatchreport

  • odacli list-prepatchreports

  • odacli create-purge-jobdata-job

  • odacli list-purge-jobdata-jobs

  • odacli describe-schedule

  • odacli list-schedules

  • odacli update-schedule

  • odacli list-scheduled-executions

  • odacli describe-systemcomponent

  • odacli list-tdebackupreports

  • odacli restore-tdewallet

Note:

No other ODACLI commands than the ones above are supported on Oracle Database Appliance KVM Database System, in this release.

odacli Database System Commands for KVM

Use the odacli database system commands to manage databases on Oracle Database Appliance for Oracle KVM.

odacli create-dbsystem

Use the odacli create-dbsystem command to create a new database system on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

 odacli create-dbsystem -p json_payload_path [-j] [-h]

Parameters

Parameter Description

--params, -p

(Mandatory) Input parameters file path for DB system creation.

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Example

Create a KVM database system using a JSON file for input parameters.
# odacli create-dbsystem -p example_system.json

Job details
----------------------------------------------------------------
                     ID:  fcfe305c-3e75-4af4-8702-992aa15619d0
            Description:  DB System example_system creation
                 Status:  Created
                Created:  January 5, 2021 9:28:03 AM CST
                Message:

Task Name                                Start Time                          End Time                            Status
---------------------------------------- ----------------------------------- ----------------------------------- ----------

odacli modify-dbsystem

Use the odacli modify-dbsystem command to modify a database system on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

 odacli modify-dbsystem -n name [-cp cpu_pool_name] [-no-cp] [-avn v_network] [-dvn v_networks_to_detach] [-en] [-gw gateway] [-ip ip_address] [-nm netmask] [-sip scan_ip_address] [-sn scan_name] [-s shape]  [-vips vip_address] [-vt v_network_type] [-j] [-h]

Parameters

Parameter Description

--name, -n

(Mandatory) Describes the name of the DB system.

--attach-vnetwork, -avn

(Optional) Specifies the name of the vnetwork to attach.

--cpupool, -cp

(Optional) Specifies the shared DB System CPU Pool name.

--detach-vnetwork, -dvn

(Optional) Specifies the name of the vnetworks to detach.

--enable-numa, -en

(Optional) Enables NUMA configuration for the DB System.

--gateway, -gw

(Optional) Specifies the network gateway.

--ip, -ip

(Optional) Specifies the network IP address.

--netmask, -nm

(Optional) Specifies the netmask of the network.

--no-cpupool, -no-cp

(Optional) Specifies to dissociate the current DB System CPU Pool name.

--scan-ips, -sip

(Optional) Specifies the SCAN IP of the network.

--scan-name, -sn

(Optional) Specifies the SCAN of the network.

--shape, -s

(Optional) Specifies the new shape. You can specify a higher or lower value than the current shape.

--vips, -vips

(Optional) Specifies the virtual IP of the network in the format vip_name_0:0:vip_ip_0,vip_name_1:1:vip_ip_1.

--vnetwork-type, -vt

(Optional) Specifies the vnetwork type to attach.

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Usage Notes

  • The odacli modify-dbsystem command supports the following use cases:
    • attach or detach the shared dbsystem cpupools.
      Attaching a CPU pool:
      odacli modify-dbsystem --name dbsystem_name -cp cpupool
      Detaching a CPU pool:
      odacli modify-dbsystem --name dbsystem_name --no-cp
    • Change database shape, that is, scale up (increase) or scale down (decrease):
      odacli modify-dbsystem -n dbsystem name -s new_shape
    • Enable NUMA for the existing dbsystem. NUMA is enabled on Oracle Database Appliance release 19.12. For existing dbsytems created before release 19.12, use the odacli modify-dbsystem --enable_numa command to enable the NUMA for the dbsystem. This command includes enabling the NUMA for the VM configuration, operation system, and the database inside the dbsystem.
      odacli modify-dbsystem --name dbsystem name --enable_numa
    • Attach or detach new network to the dbsystem. Before attaching a vnetwork, ensure that the vnetwork exists. You must specify the IP address and netmask to configure the new network interface inside the dbsystem. If the network type is database or dataguard, specify the VIPs, SCAN name, and SCAN IPs.
      odacli modify-dbsystem -n dbsystem1 -avn vnet2 -t Dataguard -ip 192.168.10.119,192.168.10.120 -nm 255.255.240.0 -gw 192.168.10.1 -sn scan1 -sip 192.168.10.30,192.168.10.31 -vips vip1:0:192.168.15.57,vip2:1:192.168.15.58
      To detach a network from dbsystem:
      odacli modify-dbsystem -n dbsystem1 -dvn vnet2

Example

Modify a KVM database system:
# odacli modify-dbsystem -n example_system1 -cp example_pool -s new_shape

odacli modify-dbfileattributes

Use the odacli modify-dbfileattributes command to properly set the file attributes (permissions and ownership) of files on Oracle ASM disk group on a bare metal host to support a dbsystem. Only run this command if prompted by the odacli create-dbsystem command.

Syntax

 odacli modify-dbfileattributes [-in db_name] [-j] [-h]

Parameters

Parameter Description

--dbname, -in

(Optional) Describes the name of the database for which you want to modify the file attributes.

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Usage Notes

  • To create the database system, access control must be enabled in Oracle ASM running on bare metal system. When the bare metal system is newly provisioned or patched to Oracle Database Appliance release 19.13, access control is already enabled. This helps you set appropriate file ownerships for all the files created in DB systems and on bare metal.
  • Before you create the database system, the files on Oracle ASM disk groups that do not have file ownership must be set up with ownership. The creation of dbsystem fails, and you are prompted to run the odacli modify-dbfileattributes command to set up the file ownership and permission. Since there can be many files on Oracle ASM disk group, the user can run this step at their own convenience. Use the odacli modify-dbfileattributes command to set up the file ownerships.
  • This command sets the file attributes (permissions and ownership) of all files on Oracle ASM disk group. The files include database files and also Oracle Clusterware files such as OCR (Oracle Clusterware Registry). This command sets up appropriate file ownership and permissions for all the files. Before creating the first DB system, set up attributes for files owned by both Oracle Grid Infrastructure and Oracle Database by running the odacli modify-dbfileattributes command with no arguments.
  • If the overall operation was successful for many files, but failed for some files, then you can run the command again by specifying the database names.

Example

Modify the file attributes of the databases.
# odacli modify-dbfileattributes -in example_db_name

odacli list-dbsystems

Use the odacli list-dbsystems command to view the database systems on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

 odacli list-dbsystems [-j] [-h]

Parameters

Parameter Description

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Example

List the KVM database systems.
# odacli list-dbsystems
Name                  Shape       Cores  Memory    Status     Created                  Updated
--------------------  ----------  -----  --------- –------    -----------------------  -----------------------
dbsystem1             odb4        4      32.00 GB  CONFIGURED  2020-12-08 17:39:00 CST  2020-12-08 17:39:00 CST
dbsystem2             odb2        2      16.00 GB  CREATING    2020-12-16 09:28:03 CST  2020-12-16 09:28:03 CST

odacli describe-dbsystem

Use the odacli describe-dbsystem command to describe a database system on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

 odacli describe-dbsystem -n db_system_name [-j] [-h]

Parameters

Parameter Description

--name, -n

(Mandatory) Describes the name of the DB system.

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Example

View details of a KVM database system on a single-node system.
# odacli describe-dbsystem -n example_system1

DB System details                                                               
--------------------------------------------------------------------------------
                       ID:  0656fe7b-111a-4bd3-b1f0-b3832812d328
                     Name:  scaoda8m018c4
                    Shape:  odb2
                   Memory:  16.00 GB
                   Status:  CONFIGURED
                  Created:  2021-01-19 00:07:20 UTC
                  Updated:  2021-01-19 00:39:16 UTC

 CPU Pool                 
--------------------------
                     Name:  cpu_pool1
          Number of cores:  2
                     Node:  node1
        Effective CPU set:  14-15,46-47
              Online CPUs:  14, 15, 46, 47
             Offline CPUs:  NONE


 VM Storage               
--------------------------
               Disk group:  DATA
              Volume name:  SC0E8DB73A
            Volume device:  /dev/asm/sc0e8db73a-250
                     Size:  200.00 GB
              Mount Point:  /u05/app/sharedrepo/example_system
 

 VMs                      
--------------------------
                     Host:  host_name
                  VM Name:  vm_name
             VM Host Name:  vm_host_name
             Target State:  ONLINE
            Current State:  ONLINE
 

 VNetworks                
--------------------------
                     Host:  vm_host_name
                  VM Name:  vm_name
                   Public:  xxx.xxx.xxx.xxx   / xxx.xxx.xxx.xxx  / ens3 / BRIDGE(pubnet) 
                      ASM:  xxx.xxx.xxx.xxx  / xxx.xxx.xxxx.xxx / ens4 / BRIDGE(privasm) VLAN(priv0.100)

Databases
--------------------------
                     Name:  c1kdb
              Resource ID:  a98ea0d7-ec75-4dd7-a6b3-f72e0b644e3f
              Unique name:  c1kdb
              Database ID:  1053377603
              Domain name:  domain_name
               DB Home ID:  5ea6c0a1-d2ae-4b7f-96e9-109a569cd09b
                    Shape:  odb1
                  Version:  19.10.0.0.210119
                  Edition:  EE
                     Type:  SI
                     Role:  PRIMARY
                    Class:  OLTP
                  Storage:  ASM
               Redundancy:
         Target node name:
            Character set:  AL32UTF8
        NLS character set:
                 Language:  AMERICAN
                Territory:  AMERICA
          Console enabled:  false
             SEHA enabled:  false
      Associated networks:  NONE
         Backup config ID:
       Level 0 Backup Day:  sunday
       Autobackup enabled:  true
              TDE enabled:  true
                 CDB type:  true
                 PDB name:  pdb1
           PDB admin user:  pdbadmin
View details of a KVM database system on a High Availability system, without InfiniBand.
# odacli describe-dbsystem -n example_system2

DB System details
--------------------------------------------------------------------------------
                       ID:  04f718f8-ddc9-4b45-8e8e-07d14165eb9c
                     Name:  example_system2
                    Shape:  odb2
                   Memory:  16.00 GB
                   Status:  CONFIGURED
                  Created:  2021-01-19 10:00:08 UTC
                  Updated:  2021-01-19 10:04:02 UTC

CPU Pool
--------------------------
                     Name:  c4bfa26faa
          Number of cores:  2
                     Node:  n1
        Effective CPU set:  0-1,20-21
              Online CPUs:  0, 1, 20, 21
             Offline CPUs:  NONE


                     Node:  n2
        Effective CPU set:  0-1,20-21
              Online CPUs:  0, 1, 20, 21
             Offline CPUs:  NONE
 

 VM Storage
--------------------------
               Disk group:  DATA
              Volume name:  S4BFA26FAA
            Volume device:  /dev/asm/s4bfa26faa-497
                     Size:  400.00 GB
              Mount Point:  /u05/app/sharedrepo/example_system

 VMs
--------------------------
                     Host:  host1
                  VM Name:  x4bfa26faa
             VM Host Name:  example_domain1
             Target State:  ONLINE
            Current State:  ONLINE
 

                     Host:  host2
                  VM Name:  y4bfa26faa
             VM Host Name:  example_domain2
             Target State:  ONLINE
            Current State:  ONLINE
 
 VNetworks
--------------------------
                     Host:  example_domain1
                  VM Name:  x4bfa26faa
                   Public:  xxx.xxx.xxx.xxx   / xxx.xxx.xxx.xxx  / ens3 / BRIDGE(pubnet)
                      ASM:  xxx.xxx.xxx.xxx  / xxx.xxx.xxx.xxx / ens4 / BRIDGE(privasm) VLAN(icbond0.100)
             Interconnect:  xxx.xxx.xxx.xxx  / xxx.xxx.xxx.xxx / ens5 /
 

                     Host:  example_domain2
                  VM Name:  y4bfa26faa
                   Public:  xxx.xxx.xxx.xxx    / xxx.xxx.xxx.xxx  / ens3 / BRIDGE(pubnet)
                      ASM:  xxx.xxx.xxx.xxx    / xxx.xxx.xxx.xxx / ens4 / BRIDGE(privasm) VLAN(icbond0.100)
             Interconnect:  xxx.xxx.xxx.xxx  / xxx.xxx.xxx.xxx / ens5 /

Databases
--------------------------
                     Name:  flashvm
              Resource ID:  350b72f7-2351-49e7-ada3-4051af9594f0
              Unique name:  flashvmU
              Database ID:
              Domain name:  domain_name
               DB Home ID:  617664f6-0a16-4922-8346-9eeb3d7256ee
                    Shape:  odb2
                  Version:  19.0.0.0
                  Edition:  EE
                     Type:  SI
                     Role:  PRIMARY
                    Class:  OLTP
                  Storage:  ASM
               Redundancy:
         Target node name:
            Character set:  AL32UTF8
        NLS character set:
                 Language:  AMERICAN
                Territory:  AMERICA
          Console enabled:  false
             SEHA enabled:  false
      Associated networks:  NONE
         Backup config ID:
       Level 0 Backup Day:  sunday
       Autobackup enabled:  true
              TDE enabled:  true
                 CDB type:  false
                 PDB name:
           PDB admin user:
View details of a KVM database system on a High Availability system, with InfiniBand.
# odacli describe-dbsystem -n example_system3
DDB System details
--------------------------------------------------------------------------------
                       ID:  0c5280a1-3ee1-438e-ad11-1cee23de17fd
                     Name:  example_system3
                    Shape:  odb2
                   Status:  CONFIGURED
                   Memory:  16.00 GB
                 Created:  2020-12-10 02:11:11 UTC
                  Updated:  2020-12-10 02:11:11 UTC

 CPU Pool
--------------------------
                     Name:  ce2ab55255
          Number of cores:  2
                     Node:  node1
        Effective CPU set:  4-5,24-25
              Online CPUs:  4, 5, 24, 25
             Offline CPUs:  NONE


                     Node:  node2
        Effective CPU set:  4-5,24-25
              Online CPUs:  4, 5, 24, 25
             Offline CPUs:  NONE

 VM Storage
--------------------------
               Disk group:  DATA
              Volume name:  SE2AB55255
            Volume device:  /dev/asm/se2ab55255-187
                     Size:  400.00 GB
              Mount Point:  /u05/app/sharedrepo/example_system

 VMs
--------------------------
                     Host:  host1
                  VM Name:  xe2ab55255
             VM Host Name:  host_name1
             Target State:  ONLINE
            Current State:  ONLINE
 

                     Host:  host2
                  VM Name:  ye2ab55255
             VM Host Name:  host_name2
             Target State:  ONLINE
            Current State:  ONLINE
 

 VNetworks
--------------------------
                     Host:  node1
                  VM Name:  xe2ab55255                
                   Public:  xxx.xxx.xxx.xxx    /xxx.xxx.xxx.xxx   / ens3 / BRIDGE(pubnet)
                      ASM:  xxx.xxx.xxx.xxx    / xxx.xxx.xxx.xxx   / ibbond0 / VF(90:03.5)
             Interconnect:  xxx.xxx.xxx.xxx  / xxx.xxx.xxx.xxx / ibbond1 / VF(90:01.7)
 
                     Host:  node2
                  VM Name:  ye2ab55255
                   Public:  xxx.xxx.xxx.xxx    / xxx.xxx.xxx.xxx   / ens3 / BRIDGE(pubnet)
                      ASM:  xxx.xxx.xxx.xxx    / xxx.xxx.xxx.xxx   / ibbond0 / VF(90:01.0)
             Interconnect:  xxx.xxx.xxx.xxx  / xxx.xxx.xxx.xxx / ibbond1 / VF(90:01.6)

Databases
--------------------------
                     Name:  datavm
              Resource ID:  6aac341a-3c73-46eb-af2a-1eada9b57661
              Unique name:  datavmU
              Database ID:  3806144946
              Domain name:  domain_name
               DB Home ID:  dcc928f1-5eb3-477b-875d-050640b7f68c
                    Shape:  odb2
                  Version:  19.10.0.0.210119
                  Edition:  EE
                     Type:  RAC
                     Role:  PRIMARY
                    Class:  OLTP
                  Storage:  ASM
               Redundancy:
         Target node name:
            Character set:  AL32UTF8
        NLS character set:
                 Language:  AMERICAN
                Territory:  AMERICA
          Console enabled:  false
             SEHA enabled:  false
      Associated networks:  NONE
         Backup config ID:
       Level 0 Backup Day:  sunday
       Autobackup enabled:  true
              TDE enabled:  true
                 CDB type:  false
                 PDB name:
           PDB admin user:

odacli describe-dbsystem-image

Use the odacli describe-dbsystem-image command to view the supported Oracle Grid Infrastructure and Oracle Database versions and the availability of the clone files and Database System KVM image in the Oracle Database Appliance system.

Syntax

 odacli describe-dbsystem-image [-j] [-h]

Parameters

Parameter Description

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Example

View details of a KVM database system image

# odacli describe-dbsystem-image
DB System Image details
--------------------------------------------------------------------------------
Component Name Supported Versions Available Versions
-------------------- -------------------- --------------------
DBVM            19.10.0.0.0        19.10.0.0.0
GI              19.10.0.0.210119   19.10.0.0.210119
DB              19.10.0.0.210119   19.10.0.0.210119

View details of a system where KVM database system image is not available

# odacli describe-dbsystem-image
DB System Image details
--------------------------------------------------------------------------------
Component Name Supported Versions Available Versions
-------------------- -------------------- --------------------
DBVM            19.10.0.0.0        not-available
GI              19.10.0.0.210119   19.10.0.0.210119
DB              19.10.0.0.210119   19.10.0.0.210119

The output shows that the KVM Database System image is not yet available on the system. Download the image and run the odacli update-repository to import the image to the repository. The output shows that the Oracle Grid Infrastructure and Oracle Database clones are already available on the system.

odacli start-dbsystem

Use the odacli start-dbsystem command to start a database system on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

 odacli start-dbsystem -n dbsystem_name [-nn node_name] [-j] [-h]

Parameters

Parameter Description

--name, -n

(Mandatory) Describes the name of the DB system.

--node-name, -nn

(Optional) Specifies the bare metal system node name on which to start the DB system VM.

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Example

Start a KVM database system.
# odacli start-dbsystem -n example_system

Job details
----------------------------------------------------------------
                     ID:  68044afa-d3cc-4024-9dc8-50fcf847642c
            Description:  DB System scaoda8s008c4 start
                 Status:  Success
                Created:  December 16, 2020 9:12:51 AM UTC
                Message:
Task Name                                Start Time                          End Time                            Status
---------------------------------------- ----------------------------------- ----------------------------------- ----------
Start DB System                          December 16, 2020 9:12:51 AM UTC    December 16, 2020 9:12:52 AM UTC    Success

odacli stop-dbsystem

Use the odacli stop-dbsystem command to stop a database system on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

 odacli stop-dbsystem -n dbsystem_name [-nn node_name] [-f] [-j] [-h]

Parameters

Parameter Description

--name, -n

(Mandatory) Describes the name of the DB system.

--force, -f

(Optional) Forces the operation to stop the DB system.

--node-name, -nn

(Optional) Specifies the bare metal system node name on which to stop the DB system VM.

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Example

Stop a KVM database system.
# odacli stop-dbsystem -n example_system

Job details
----------------------------------------------------------------
                     ID:  68044afa-d3cc-4024-9dc8-50fcf847642c
            Description:  DB System scaoda8s008c4 start
                 Status:  Success
                Created:  December 16, 2020 9:12:51 AM UTC
                Message:
Task Name                                Start Time                          End Time                            Status
---------------------------------------- ----------------------------------- ----------------------------------- ----------
Stop DB System                          December 16, 2020 9:12:51 AM UTC    December 16, 2020 9:12:52 AM UTC    Success

odacli delete-dbsystem

Use the odacli delete-dbsystem command to delete a database system on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

 odacli delete-dbsystem -n dbsystem_name [-f] [-j] [-h]

Parameters

Parameter Description

--name, -n

(Mandatory) Describes the name of the DB system.

--force, -f

(Optional) If specified, then the operation deletes the database system, Oracle Clusterware files, and the database files.

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Usage Notes

  • If you do not specify the -f option, then the operation deletes the database system and Oracle Clusterware files, and retains the database files. With the -f option, the operation deletes the database system, Oracle Clusterware files, and the database files.

Example

Delete a KVM database system.
# odacli delete-dbsystem -n example_system
WARNING: Use --force option to delete the database and datafiles. 
Do you confirm delete DB System 'example_system'? (Options: y/n, default: n):

Job details
----------------------------------------------------------------
                    ID:  4d70e75d-1bc0-4917-a50a-63cd6a108d1e
            Description:  DB System example_system deletion
                 Status:  Success
                Created:  January 16, 2021 9:19:54 AM UTC
                Message:
 
Task Name                                Start Time                          End Time                            Status
---------------------------------------- ----------------------------------- ----------------------------------- ----------

# odacli describe-job -i 4d70e75d-1bc0-4917-a50a-63cd6a108d1e

Job details
----------------------------------------------------------------
                     ID:  4d70e75d-1bc0-4917-a50a-63cd6a108d1e
            Description:  DB System example_system deletion
                 Status:  Success
                Created:  January 16, 2021 9:19:54 AM UTC
                Message:

Task Name                                Start Time                          End Time                            Status
---------------------------------------- ----------------------------------- ----------------------------------- ----------
Remove DB System from Clusterware        January 16, 2021 9:19:54 AM UTC    January 16, 2021 9:19:54 AM UTC    Success
Deprovision DB System VM(s)              January 16, 2021 9:19:54 AM UTC    January 16, 2021 9:19:54 AM UTC    Success
Delete DB System ACFS filesystem         January 16, 2021 9:19:54 AM UTC    January 16, 2021 9:20:04 AM UTC    Success
Delete DB System ASM volume              January 16, 2021 9:20:04 AM UTC    January 16, 2021 9:20:11 AM UTC    Success
Delete DB System VNetworks               January 16, 2021 9:20:04 AM UTC    January 16, 2021 9:20:11 AM UTC    Success
Delete DB System metadata                January 16, 2021 9:20:11 AM UTC    January 16, 2021 9:20:11 AM UTC    Success

odacli VM Storage Commands for KVM

Use the odacli virtual machine storage commands to manage storage on Oracle Database Appliance for Oracle KVM.

odacli create-vmstorage

Use the odacli create-vmstorage command to create a new VM storage on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

 odacli create-vmstorage -n name -s size -dg disk_group [-j] [-h]

Parameters

Parameter Description

--name, -n

Name assigned to the VM storage.

--size, -s

Specifies the storage size. Format is K|M|G|T. Minimum Size is 1024M (1G)

--diskgroup, -dg

(Optional) Defines the ASM disk group of the VM storage (Default: DATA).

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Example

Create a VM storage named share1 of 8 GB.
# odacli create-vmstorage -n share1 -s 8G

odacli list-vmstorages

Use the odacli list-vmstorages command to list all VM storages on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

 odacli list-vmstorages [-j] [-h]

Parameters

Parameter Description

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Example

# odacli list-vmstorages

odacli describe-vmstorage

Use the odacli describe-vmstorage command to describe VM storage on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

 odacli describe-vmstorage -n name [-j] [-h]

Parameters

Parameter Description

--name, -n

Specifies the name of the VM storage.

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Example: Describing a VM Storage named share1

# odacli describe-vmstorage -n share1

odacli modify-vmstorage

Use the odacli modify-vmstorage command to modify VM storage configuration on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

 odacli modify-vmstorage -n name -i increment [-j] [-h]

Parameters

Parameter Description

--name, -n

Specifies the virtual disk name

--increment, -i

Incremental storage size to be modified. Format is K|M|G|T

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Example

Increase the size of a VM storage named share1 by 10 gigabytes.

# odacli modify-vmstorage -n share1 -i 10G

odacli delete-vmstorage

Use the odacli delete-vmstorage command to delete a vmstorage configuration on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

 odacli delete-vmstorage -n name [-f] [-j] [-h]

Parameters

Parameter Description

--name, -n

Specifies the vmstorage name to be deleted

--force, -f

(Optional) Specifies the force option

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Example

Delete a VM storage named share1.

odacli delete-vmstorage -n share1

odacli Virtual Disk Commands for Oracle KVM

Use the odacli virtual disk commands to manage virtual disks on Oracle Database Appliance for Oracle KVM.

odacli create-vdisk

Use the odacli create-vdisk command to create a new virtual disk in a VM storage on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

 odacli create-vdisk -n name -vms vmstorage_name -s size -sh -sp [-j] [-h]

Parameters

Parameter Description

--name, -n

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

--vmstorage, -vms

Name of the VM storage where the virtual disk will be created

--size, -s

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). Format is K|M|G|T

--shareable, -sh

(Optional) Sets the option of allowing the virtual disk to be shared by more than one virtual machine (shared)

--sparse, -sp

(Optional) Creates a sparse vdisk

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Example

Create a 2 GB non-sparse and shareable Virtual Disk named vdisk1 inside the VM storage vms1.

odacli create-vdisk -n vdisk1 -vms vms1 -s 2G -sh

odacli list-vdisks

Use the odacli list-vdisks command to list all virtual disks on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

 odacli list-vdisks [-j] [-h]

Parameters

Parameter Description

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Example

odacli list-vdisks

odacli describe-vdisk

Use the odacli describe-vdisk command to describe a virtual disk on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

 odacli describe-vdisk -n name [-j] [-h]

Parameters

Parameter Description

--name, -n

Specifies the name of the virtual disk.

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Example: Describing a Virtual Disk named vdisk1

odacli describe-vdisk -n vdisk1

odacli modify-vdisk

Use the odacli modify-vdisk command to modify a virtual disk on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

 odacli modify-vdisk -n name -i [-no-s|-s] [-j] [-h]

Parameters

Parameter Description

--name, -n

Specifies the virtual disk name

--increment, -i

Defines the size to increase the virtual disk. Format is value units, units are K|M|G|T

-no-shareable, --no-s

(Optional) Set the Virtual Disk as non-shareable

--shareable, -s

(Optional) Set the Virtual Disk as shareable

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Example

Increase the size of a virtual disk named vdisk1 by 4 gigabytes.

# odacli modify-vdisk -n vdisk1 -i 4G

odacli clone-vdisk

Use the odacli clone-vdisk command to clone a virtual disk on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

 odacli clone-vdisk -n name -cn clone_name [-j] [-h]

Parameters

Parameter Description

--name, -n

Specifies the virtual disk name to be cloned

--clone-name, -cn

Specifies the name of the cloned virtual disk

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Example

Create a clone of a virtual disk named vdisk1, with the name vdisk1_clone. The cloned disk is created on the same storage as vdisk1.

# odacli clone-vdisk -n vdisk1 -cn vdisk1_clone

odacli delete-vdisk

Use the odacli delete-vdisk command to delete a virtual disk on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

 odacli delete-vdisk -n name [-f] [-j] [-h]

Parameters

Parameter Description

--name, -n

Specifies the virtual disk name to be deleted

--force, -f

(Optional) Specifies the force option

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Example

Delete a virtual disk named vdisk1.

# odacli delete-vdisk -n vdisk1

odacli CPU Pool Commands for Bare Metal and KVM

Use odacli commands to manage resource allocations on Oracle Database Appliance for bare metal and KVM deployments.

CPU pools enable management of CPU resources in both bare metal and KVM environments. There are two types of CPU pools, that is, BM and VM.

Use the BM CPU pool to ensure that the database on a bare metal host runs exclusively on the CPUs specified in the CPU pool.

Use the VM CPU pools to cage and manage CPU resource allocations to workloads for virtual machines. Workloads are isolated by creating CPU pools and assigning or pinning virtual machines to a specific CPU pool. When you pin a virtual machine to a CPU pool, you ensure that the virtual machine uses CPUs in only that CPU pool.

Resources in CPU pools cannot overlap, that is, CPU pools cannot share CPUs.

odacli create-cpupool

Use the odacli create-cpupool command to create a new CPU pool on Oracle Database Appliance Bare Metal or Kernel-based Virtual Machine (KVM) deployment.

Syntax

 odacli create-cpupool -n name -c number_of_cores {-bm|-vm} -nn node_name -s socket -dbs [-j] [-h]

Parameters

Parameter Description

--name, -n

Specifies the CPU Pool name.

--cores, -c

Specifies the CPU Pool cores.

--bm, -bm

Specifies the CPU Pool as Bare Metal.

--vm, -vm

Specifies the CPU Pool as Virtual Machine.

--dbsystem, -dbs

Specifies the CPU Pool type as DB System.

--socket, -s

Specifies the socket to use. If not specified, then use all available sockets.

--node-name, -nn

(Optional) Specifies the node where the CPU Pool will be created. On High-Availability deployment, if this option is not specified, then the CPU pool is created on both nodes.

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Usage Notes

  • Attach the BM CPU pool to databases. Bare metal CPU pools can be assigned to multiple databases.
  • Attach VM CPU pool VM guest machines. VM CPU pools can be assigned to multiple VMs.
  • Attach dbsystem CPU pool to dbsystems. dbsystem CPU pool can be assigned to multiple dbsystems. After you create a dbsystem CPU pool, you can create a new dbsystem with this CPU pool by adding the new CPU pool parameter in the create-dbsystem json file, or modify-dbsystem to attach CPU pool to an existing dbsystem.
  • Resources in CPU pools cannot overlap, that is, CPU pools cannot share CPUs.
  • After you create a BM CPU pool, you can associate this CPU pool to a database using the create-database or modify-database command.
  • After you create a VM CPU pool, you can associate this CPU pool to a VM using the create-vm or modify-vm command.
  • Number of cores mustbe an even number between 2 and the total number of available cores on the system.
  • By default, a CPU in the CPU pool is allocated across two sockets in release 19.12 and later. Optionally, you can choose to allocate the CPU based on the socket number (0 or 1). This is especially useful to support Standard Edition licensing. It is recommended that you use the default allocation and do not mix two types of allocation.

Example

Create a BM CPU pool named cpupool1 with 6 cores associated to it.
# odacli create-cpupool -n cpupool1 -c 6 -bm
Create a VM CPU pool named cpupool2 with 6 cores associated to it.
# odacli create-cpupool -n cpupool2 -c 6 -vm
Create a DB System CPU pool named cpupool3 with 6 cores associated to it.
# odacli create-cpupool -n cpupool3 -c 6 -dbs
Create a DB System CPU pool named cpupool4 with 4 cores of CPUs allocated from socket 0.
# odacli create-cpupool -n cpupool4 -dbs -s 0 -c 4

odacli remap-cpupools

Use the odacli remap-cpupools command to remap CPU pools to NUMA allocation on Oracle Database Appliance Bare Metal or Kernel-based Virtual Machine (KVM) deployment.

Syntax

 odacli remap-cpupools -f -urc [-j] [-h]

Parameters

Parameter Description

--force, -f

(Optional) Specifies to force the operation.

--use-reserved-cores, -j

(Optional) Specifies to use reserved CPU cores.

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Usage Notes

If the odacli remap-cpupools command fails with the error DCS-10001:Internal error encountered: Not enough physical CPUs available for CPU Pool 'cpupool_name' on node 'node_name', run the odacli remap-cpupools command again with the --use_reserved-cores option.

Use the --force option to remap CPU pools even if the CPU pool is marked as NUMA-enabled. You must odacli remap-cpupools command, after updating the bare metal CPU cores with the command odacli update-cpucores for CPU core number changes.

By default, the first core of the socket is reserved and cannot be used by the VM and DB system CPU pools for optimal performance. Use the --use-reserved-cores option to enable use of the first core of socket for VM and DB system CPU pools.

Example

# odacli remap-cpupools

odacli list-cpupools

Use the odacli list-cpupools command to list all CPU Pools on Oracle Database Appliance Bare Metal or Kernel-based Virtual Machine (KVM) deployment.

Syntax

 odacli list-cpupools [-j] [-h]

Parameters

Parameter Description

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Example

# odacli list-cpupools

odacli describe-cpupool

Use the odacli describe-cpupool command to describe CPU Pools on Oracle Database Appliance Bare Metal or Kernel-based Virtual Machine (KVM) deployment.

Syntax

 odacli describe-cpupool -n name [-j] [-h]

Parameters

Parameter Description

--name, -n

Specifies the name of the CPU Pool.

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Example: Describing a CPU pool named cpupool1

# odacli describe-cpupool -n cpupool1

odacli modify-cpupool

Use the odacli modify-cpupool command to modify a CPU Pool configuration on Oracle Database Appliance Bare Metal or Kernel-based Virtual Machine (KVM) deployment.

Syntax

 odacli modify-cpupool -n name -c cores -f -l [-j] [-h]

Parameters

Parameter Description

--name, -n

Specifies the CPU Pool name

--cores, -c

Specifies the new number of CPU cores

--force, -f

(Optional) Forces the operation

--live, -l

(Optional) Applies the changes to running VMs

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Usage Notes

For VM CPU pool, if --live is not specified, then the changes are applied to the VM configuration file and will be activated next time the VM is started. If --live is specified, then the changes will be applied to both VM configuration file and to the running VM.

Example

Set the size of a CPU Pool cpupool1 to 10. If --live is not specified, the change is applied to the VM configuration file and will be activated next time the VM is started.

# odacli modify-cpupool -n cpupool1 -c 10

odacli delete-cpupool

Use the odacli delete-cpupool command to delete a CPU Pool configuration on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

 odacli delete-cpupool -n name -f [-j] [-h]

Parameters

Parameter Description

--name, -n

Specifies the CPU Pool name to be deleted

--force, -f

(Optional) Forces deletion.

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Example

Delete a CPU pool named cpupool1.

# odacli delete-cpupool -n cpupool1

odacli list-auditrecords

Use the odacli list-auditrecords command to list the audit records for a CPU Pool on Oracle Database Appliance Bare Metal or Kernel-based Virtual Machine (KVM) deployment.

Syntax

 odacli list-auditrecords -du dcs-username -f from_date-range -l latest -n node_ID -ot operation_type -ou OS_username -rn resource_name -rt resource_type -t to_date-range [-j] [-h]

Parameters

Parameter Description

--dcs-user, -du

(Optional) Specifies the DCS user name.

--from, -f

(Optional) Specfies the from date in the date range for the CPU pool audit records.

--latest, -l

(Optional) Specifies the latest number of CPU pool audit records.

--node-id, -n

(Optional) Specifies the node ID.

--op-type, -ot

(Optional) Specifies the type of operation.

--os-user, -ou

(Optional) Specifies the operating system user.

--rsc-name, -rn

(Optional) Specifies the resource name.

--rsc-type, -rt

(Optional) Specifies the resource type.

--to, -t

(Optional) Specfies the to date in the date range for the CPU pool audit records.

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Example

# odacli list-auditrecords
ID                                    Resource type         Resource name         Operation type   DCS username     OS username      Timestamp              
------------------------------------  --------------------  --------------------  ---------------  ---------------  ---------------  -----------------------
41295d99-f263-4284-b6d9-2aff1ae0f850  BM_CPU_POOL           testbmpool            CREATE           oda-admin        root             2020-10-08 13:27:05 UTC
0f07a013-5bb4-4cd8-bd49-04dc61fcd454  BM_CPU_POOL           pool_9f74a8e9-        DELETE           oda-admin        root             2020-10-08 12:26:30 UTC
d858269b-6c28-4bc2-af71-79004f3561e6  BM_CPU_POOL           pool_9f74a8e9-        CREATE           oda-admin        root             2020-10-08 12:24:36 UTC
9d7852c1-93fb-410e-9e0c-8c0a95ed3f0c  VM_CPU_POOL           pool_d48e81e4-        DELETE           oda-admin        root             2020-10-08 12:06:45 UTC
0235cc84-9345-40bc-ac4f-7de3f63202e2  VM_CPU_POOL           pool_4fe0b4f4-        DELETE           oda-admin        root             2020-10-08 12:06:45 UTC
762f7263-7bd9-4b12-b891-48305165bf36  VM_CPU_POOL           pool_4fe0b4f4-        MODIFY           oda-admin        root             2020-10-08 12:06:22 UTC
0bd2a25d-2327-4918-bd47-8c00f7406f92  VM_CPU_POOL           pool_4fe0b4f4-        MODIFY           

odacli describe-auditrecord

Use the odacli describe-auditrecord command to describe the audit record for a CPU Pool on Oracle Database Appliance Bare Metal or Kernel-based Virtual Machine (KVM) deployment.

Syntax

 odacli describe-auditrecord -i [-j] [-h]

Parameters

Parameter Description

--id, -i

Describes the ID of the audit record.

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Example

# odacli describe-auditrecord -i 41295d99-f263-4284-b6d9-2aff1ae0f850
Audit Record details                                                            
--------------------------------------------------------------------------------
 Event details            
--------------------------
                Record ID:  41295d99-f263-4284-b6d9-2aff1ae0f850
         Record timestamp:  2020-10-08 13:27:05 UTC
             DCS username:  oda-admin
              OS username:  root
               Cluster ID:  test_cluster-c
                  Node ID:  test_cluster

 Resource/Operation       
--------------------------
            Resource type:  BM_CPU_POOL
              Resource ID:  b17cb623-bf79-491f-86d8-d8502987e26c
            Resource name:  testbmpool
           Operation type:  CREATE
    Operation description:  Created with '2' cores and allocation 'test_cluster:1-2,17-18'

odacli VM Network Commands for KVM

Use the odacli virtual machine network commands to manage network on Oracle Database Appliance for Oracle KVM.

odacli create-vnetwork

Use the odacli create-vnetwork command to create a new network on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

 odacli create-vnetwork -n name -if interface-name -t type -br bridge -g gateway -ip IP-address -nm netmask -u uniform -vlan VLAN-network ID [-j] [-h]

Parameters

Parameter Description

--name, -n

Specifies the virtual network name.

--interface-name, -if

Specifies the the network interface on the host. This can be physical interface or bonded interface.

--type, -t

Specifies the virtual network type. Values are bridged or bridged-vlan.

--bridge, -br

(Optional) Specifies the name of the bridge.

--gateway, -gw

(Optional) Specifies the virtual network gateway

--ip, -ip

(Optional) Specifies the virtual network addresses. For more than one address, use the format "node0_ip,node1_ip,..."

--netmask, -nm

(Optional) Specifies the virtual network netmask

--uniform, -u

(Optional) Specifies whether the virtual network is created on both nodes in a high-availability deployment

--vlan-id, -vlan

(Optional) Specifies the VLAN network ID

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Usage Notes

If you did not specify the IP address, or netmask, or gateway during vnetwork creation, then you can add them later using the odacli modify-vnetwork command.

Example

Create a VM network of type bridged using the interface btbond2.
# odacli create-vnetwork -n vnet1 -if btbond2 -type bridged

odacli list-vnetworks

Use the odacli list-vnetworks command to list all virtual networks on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

 odacli list-vnetworks [-j] [-h]

Parameters

Parameter Description

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Example

# odacli list-vnetworks

odacli describe-vnetwork

Use the odacli describe-vnetwork command to describe virtual networks on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

 odacli describe-vnetwork -n [-j] [-h]

Parameters

Parameter Description

--name, -n

Specifies the name of the virtual network.

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Example: Describing a VM Network named vnet1

# odacli describe-vnetwork -n vnet1

odacli start-vnetwork

Use the odacli start-vnetwork command to start a virtual network on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

 odacli start-vnetwork -n name [-j] [-h]

Parameters

Parameter Description

--name, -n

Specifies the virtual machine name to be stopped

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Example

Start a virtual network named vnet1.

# odacli start-vnetwork -n vnet1

odacli stop-vnetwork

Use the odacli stop-vnetwork command to stop a virtual network on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

 odacli stop-vnetwork -n name [-j] [-h]

Parameters

Parameter Description

--name, -n

Specifies the virtual network to be stopped

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Example

Stop a virtual network named vnet1.

# odacli stop-vnetwork -n vnet1

odacli modify-vnetwork

Use the odacli modify-vnetwork command to modify a network on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

 odacli modify-vnetwork -n name -if -t -br -gw -ip -nm -u -vlan [-j] [-h]

Parameters

Parameter Description

--name, -n

Specifies the virtual network name.

--gateway, -gw

(Optional) Specifies the virtual network gateway

--ip, -ip

(Optional) Specifies the virtual network addresses. For more than one address, use the format "node0_ip,node1_ip,...". Specify the value as none to remove the IP address.

--netmask, -nm

(Optional) Specifies the virtual network netmask

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Example

Modify a VM network to specify the gateway.
# odacli modify-vnetwork -n vnet1 -g 10.11.44.41

odacli delete-vnetwork

Use the odacli delete-vnetwork command to delete a virtual network configuration on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

 odacli delete-vnetwork -n name [-j] [-h]

Parameters

Parameter Description

--name, -n

Specifies the vnetwork name to be deleted

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Example

Delete a VM network named vnet1.

# odacli delete-vnetwork -n vnet1

odacli Virtual Machine Commands for Oracle KVM

Use the odacli virtual machine commands to manage virtual machines on Oracle Database Appliance for Oracle KVM.

odacli create-vm

Use the odacli create-vm command to create a new virtual machine on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

 odacli create-vm -n name -m memory -src source -vc vcpus -vms vmstorage -cp cpupool -d description -g graphics
-mm max-mem-size -mvc max-vcpu-count -ost os-type -osv os_variant -pn preferred_node -s disk_size -vd vdisks
-vn virtual_networks -esrc extra_srcs [-j] [-h]

Parameters

Parameter Description

--name, -n

Specifies the VM name

--memory, -st

Specifies the size of the VM memory. The format is "value_unit". Unit is M|G.

--source, -src

Specifies the source installation. If local, it can be an ISO or a bootable disk image. If remote, it can be an URI pointing to an install tree hosted remotely over HTTP, HTTPS, FTP or NFS.

--vcpus, -vc

Specifies the number of vCPUs to use.

--vmstorage, -vms

Specifies the VM storage name

--cpupool, -cp

(Optional) Specifies the CPU pool name

--extra-srcs, -esrc

(Optional) Specifies the extra sources for the guest VM that are mounted as CDROM devices

--description, -d

(Optional) Specifies the VM description

--extra-args, -ea

(Optional) Specifies the extra arguments for the VM installer.

--graphics, -g

(Optional) Specifies the graphics settings for the VM

--max-memory, -mm

(Optional) Specifies the maximum size of the VM memory. The format is "value_unit". Unit is M|G.

--max-vcpus, -mvc

(Optional) Specifies the maximum number of VCPUs

--os-type, -ost

(Optional) Specifies the operating system type

--os-variant, -osv

(Optional) Specifies the operating system variant. Use the command osinfo-query os to get the list of the accepted OS variants.

--pref-node, -pn

(Optional) Specifies the preferred node to run the VM

--size, -s

(Optional) Specifies the size of the VM. The format is "value_unit". Unit is K|M|G|T.

--vdisks, -vd

(Optional) Specifies the names of the vdisks to use

--vnetworks, -vn

(Optional) Specifies the names of the virtual networks to use

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Usage Notes

  • Use the --extra-args parameter to add kickstart configuration file, kernel parameters for example, serial console. For example: --extra-args "console=tty0 console=ttyS0,115200 ks=http://192.168.122.100:80/ks.txt"

Example

Create a VM named vm1 with 8 vcpus and 8 GB memory. The VM is stored in the VM Storage vms1. The source used for the installation is located on /u01/OL7.iso.

# odacli create-vm -n vm1 -vc 8 -m 8G -vms vs1 -src /u01/OL7.iso

Example

If the installation source is located through network, the network configuration of the VM must be provided by --extra-args so that the network can be setup at the bootstrap of the VM, to reach the installation source over the network. For example, to create a VM from source https://example.com/iso/OracleLinux/OL7/u9/x86_64/OracleLinux-R7-U9-Server-x86_64-dvd/:

# odacli create-vm -vn pubnet -m 4G -vc 8 -src https://example.com/iso/OracleLinux/OL7/u9/x86_64/OracleLinux-R7-U9-Server-x86_64-dvd/ -vd vmstorage_vdisk2 -vms vmstore -g vnc,listen=0.0.0.0,port=5949 -n vm1 -s 20G --extra-args "dns=<dns_server_ip_addr> ip=<vm1_ip_addr>::<gateway_ip>:<netmask>:<vm1_hostname>:ens3:none"

odacli list-vms

Use the odacli list-vms command to list all virtual machines on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

 odacli list-vms [-j] [-h]

Parameters

Parameter Description

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Example

# odacli list-vms

odacli describe-vm

Use the odacli describe-vm command to describe a virtual machine on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

 odacli describe-vm -n name [-j] [-h]

Parameters

Parameter Description

--name, -n

Specifies the name of the virtual machine.

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Example: Describing a Virtual Machine named vm1

# odacli describe-vm -n vm1

odacli modify-vm

Use the odacli modify-vm command to modify a virtual machine on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

 odacli modify-vm -n name -as -en -bo boot_option -cfg -avd attach_vdisks -avn attach_vnetworks -d description -dn -dvd detach-vdisk -dvn detach-vnetworks -mm max-memory -mvc max-vcpuc -m memory -no-cp -pn preferred-node -vc vcpu_count -di disk-increment -en -fo -g graphics -l -no-as  [-j] [-h]

Parameters

Parameter Description

--name, -n

Specifies the VM name

--autostart, -as

(Optional) Specifies if the auto-start option must be set for the VM

--no-autostart, -no-as

(Optional) Disables the auto-start option for the VM

--boot-option, -bo

(Optional) Specifies the the boot option to use

--config, -cfg

(Optional) Specifies whether the changes persist.

--live, -l

(Optional) Indicates whether the specified changes take place live (true) or after the next boot (false). Default is false

--enable-numa, -en

(Optional) Enables NUMA configuration for the VM.

--cpu-pool, -cp

(Optional) Specifies the CPU pool name

--description, -d

(Optional) Specifies the VM description

--failover, -fo

(Optional) Specifies the configuration for the failover

--no-failover, -no-fo

(Optional) Specifies the configuration for the failover

--vcpus, -vc

(Optional) Specifies the number of vCPUs.

--memory, -m

(Optional) Specifies the memory size of the VM. The format is "value_unit". Unit is M|G.

--max-memory, -mm

(Optional) Specifies the maximum memory size of the VM. The format is "value_unit". Unit is M|G.

--max-vcpus, -mvc

(Optional) Specifies the maximum number of vCPUs.

--no-cpupool, -no-cp

(Optional) Dissasociates the associated CPU Pool

--detach-vdisk, -dvd

(Optional) Specifies the names of the virtual disks to detach

--detach-vnetworks, -dvn

(Optional) Specifies the names of the virtual networks to detach

--pref-node, -pn

(Optional) Specifies the preferred node to run the VM

--disk-increment, -di

Specifies the change in size of the VM. The format is "value_unit". Unit is K|M|G|T.

--attach-vdisks, -avd

(Optional) Specifies the names of the vdisks to attach

--attach-vnetworks, -avn

(Optional) Specifies the names of the virtual networks to attach

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Usage Tips

  • --live: The change is applied to the running VM instance, but does not persist after the VM stops.
  • --enable-numa: Use this option to enable NUMA for an existing VM.
  • --config: The change persists in the configuration of VM instance and takes effect on subsequent reboots.
  • If neither --live or --config is specified, then the default behavior is --config.
  • You can specify both the --live or --config options if you want the modification to take effect immediately and on subsequent boots.
  • When an application VM is created, a default network interface is created by default in the VM. This interface is attached to the default kvm bridge (virbr0) at the host. This interface is intended for convenient communication between the host and VM. This interface does not attach to any physical network interface at the host. Do not configure this interface to use for any external communication.
  • You must create a vnetwork using the command odacli create-vnetwork and attach the vnetwork (odacli modify-vm -avn) to the VM. This creates a second interface in the VM. Configure this network interface for your network requirement.
  • The network interface name in the VM depends on the operating system.

Modifying CPU Count and Memory for a VM

Update the configuration of a VM named vm1, setting the CPU count to 6 and the maximum memory to 6 gigabytes on both the running VM and subsequent boots.

# odacli modify-vm -n vm1 -vc 6 -mm 6G --live --config

Enabling NUMA

Use --enable-numa to enable NUMA for the VM configuration. The command odacli modify-dbsystem --enable-numa is only supported on application VMs with even number of CPU cores so that CPU cores can be evenly distributed to NUMA nodes. In Oracle Database Appliance, one CPUcore is equal to 2 vCPU. For more information, see About Enabling NUMA on Oracle Database Appliance.
# odacli modify-vm --name name --enable-numa

Modifying a VM to attach a vnetwork

Modify a VM to attach a vnetwork:
# odacli modify-vm -n vm_name -avn vnetwork_name

odacli start-vm

Use the odacli start-vm command to start a virtual machine on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

 odacli start-vm -n name -nn [-j] [-h]

Parameters

Parameter Description

--name, -n

Specifies the virtual machine name to be stopped

--node-name, -nn

(Optional) Specifies the node name where the virtual machine will be started

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Usage Notes

  • If pref-node is defined for the VM, then the VM starts on the pref-node. If pref-node is not defined for the VM, then the VM can start on any node, in a high-availability deployment.
  • If you specify the node name -n, then the VM starts on the specified node, even if the preferred node is defined.

Example

Start a virtual machine named vm1.

# odacli start-vm -n vm1

odacli stop-vm

Use the odacli stop-vm command to stop a virtual machine on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

 odacli stop-vm -n name [-f] [-j] [-h]

Parameters

Parameter Description

--name, -n

Specifies the virtual machine name to be stopped

--force, -f

(Optional) Specifies the force option

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Example

Stop a virtual machine named vm1.

# odacli stop-vm -n vm1

odacli migrate-vm

Use the odacli migrate-vm command to migrate a virtual machine on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

 odacli migrate-vm -n name -to node [-j] [-h]

Parameters

Parameter Description

--name, -n

Specifies the virtual machine name to be migrated

--target-node, -to

Specifies the destination node

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Example

Migrate a virtual machine named vm1 to node n1.

odacli migrate-vm -n vm1 -to n1

odacli clone-vm

Use the odacli clone-vm command to clone a virtual machine configuration on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

# odacli clone-vm -n name_of_vm_to_clone_from -cn clone_name [-j] [-h]

Parameters

Parameter Description

--name, -n

Specifies the virtual machine name to be cloned

--clone-name, -cn

Specifies the name of the cloned virtual machine

--description, -d

(Optional) Specifies the description of the virtual machine

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Example

Create a clone of a virtual machine named vm1, with the name vm1_clone. The cloned VM is created on the same storage as vm1.

# odacli clone-vm -n vm1 -cn vm1_clone

odacli delete-vm

Use the odacli delete-vm command to delete a virtual machine configuration on Oracle Database Appliance Kernel-based Virtual Machine (KVM).

Syntax

 odacli delete-vm -n name [-f] [-j] [-h]

Parameters

Parameter Description

--name, -n

Specifies the virtual machine name to be deleted

--force, -f

(Optional) Specifies the force option

--json, -j

(Optional) Displays output in JSON format.

--help, -h

(Optional) Displays help for using the command.

Example

Delete a virtual machine named vm1.

odacli delete-vm -n vm1