Instances created using Oracle-Provided Images based on Oracle Linux include a pre-installed set of utilities that are designed to make it easier to work with Oracle Linux images. These utilities consist of a service component and related command line tools that can help with managing block volumes (attach, remove, and automatic discovery), secondary VNIC configuration, discovering the public IP address of an instance, and retrieving instance metadata.
The following table summarizes the components that are included in the OCI utilities.
||The service component of
||Expands the root filesystem of the instance to its configured size.|
||Lists or configures iSCSI devices attached to a compute instance. If no command line options are specified, lists devices that need attention.|
||Displays metadata for the compute instance. If no command line options are specified, lists all available metadata. Metadata includes the instance OCID, display name, compartment, shape, region, availability domain, creation date, state, image, and any custom metadata that you provide, such as an SSH public key.|
||Lists or configures virtual network interface cards (VNICs) attached to the Compute instance. When a secondary VNIC is provisioned in the cloud, it must be explicitly configured on the instance using this script or similar commands.|
||Displays a detailed report for a given compartment or network.|
||Sends a message to a Oracle Cloud Infrastructure Notifications service topic.|
||Displays the public IP address of the current system in either human-readable or JSON format.|
Installing the OCI Utilities
The OCI utilities (
oci-utils) are automatically included with instances
launched with Oracle Linux 7 and later images. They are not currently available on other
oci-utilscan no longer be used with Python 2 in favor of Python 3.
To install the Oracle Cloud
Infrastructure SDK and CLI using
yum, install the required packages corresponding to the image used
by the instance.
sudo yum install python36-oci-sdk python36-oci-cli
sudo yum install python3-oci-sdk python3-oci-cli
For configuration information, see the Oracle Cloud Infrastructure SDK for Python documentation and the documentation for configuring the Oracle Cloud Infrastructure CLI.
Updating the OCI Utilities
To update to the latest version of
sudo yum update oci-utils
Using the OCI Utilities
To use the OCI utilities, you first need to start the
sudo systemctl start ocid.service
Redirecting to /bin/systemctl start ocid.service