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.

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

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 {-bm|-vm} -nn node_name [-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.

--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.
  • 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.

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

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,..."

--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 [-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

--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

--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

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 -b boot_option -cfg -avd attach_vdisks -avn attach_vnetworks -d description -dvd detach-vdisk -dvn detach-vnetworks -mm max-memory -mvc max-vcpuc -m memory -no-cp -pn preferred-node -vc vcpu -di disk-increment [-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

--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.
  • --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.

Example

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

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

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