Skip to Main Content

Infrastructure Software


For appeals, questions and feedback about Oracle Forums, please email Please ask technical questions in the appropriate category. Thank you!

Jump-start a KVM deployment with Oracle Linux in OCI

Oracle Cloud Infrastructure (OCI) offers secure and elastic virtual machine (VM) compute capacity in the cloud for workloads ranging from small development projects to large-scale, global applications. In some use cases, you might prefer to set up your own KVM deployment in OCI to access VM resources, allowing the extension and migration of existing on-premises KVM environments into the cloud. This configuration also allows you to install legacy operating systems and prepackaged VMs to use within your OCI environment. It also gives you flexibility to deploy highly customized VMs with specifications that suit your business needs in OCI.
Oracle Linux KVM is included with Oracle Linux and provides a set of modules that enable you to use the Unbreakable Enterprise Kernel (UEK) for Oracle Linux as a hypervisor. Deploying and managing a hypervisor environment in the cloud is easier than ever with the Oracle Linux KVM image for OCI. The Oracle Linux KVM image helps simplify the deployment and configuration of a KVM host and guests in OCI.
The Oracle Linux KVM image includes the following features:
The base Oracle Linux and KVM environment
Tools to configure an OCI instance as a KVM host for deploying and managing VMs
Utilities to manage the host, guests, storage, and networking configurations required for the environment in OCI
A screenshot of the Oracle Linux KVM image in the Oracle Cloud Marketplace.Quick and easy deployment
The Oracle Linux KVM image is optimized and integrated with native OCI services, making it easy to deploy a hypervisor host within minutes. You can deploy it from the Oracle Cloud Marketplace or you can deploy an Oracle Linux KVM intance from the Oracle Images catalog directly from the Oracle Cloud Console. With a few clicks, you can quickly and easily get your Oracle Linux KVM instances up and running.
An Oracle Linux KVM image based on Oracle Autonomous Linux is also available for application owners and developers who want to virtually eliminate complexity and human error and enables higher security, availability, and operational efficiency when hosting their own hypervisor environment in OCI. This KVM image uses Oracle Ksplice technology to automatically apply zero-downtime security updates for the kernel and key user space libraries (glibc and openssl). For more information on the Oracle Linux KVM image based on the Autonomous Linux release, refer to the blog and documentation.
KVM configuration made easy
The Oracle Linux KVM image includes OCI and OCI-KVM CLI utilities that help simply the KVM deployment and configuration in OCI.
OCI utilities (oci-utils) are a preinstalled set of scripted tools that are designed to make it easier to work with Oracle Linux images in OCI. 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 virtual network interface cards (VNIC) configuration, discovering the public IP address of an instance, and retrieving instance metadata.
You can use oci-utils to set up your KVM image in the following ways:
After deploying the image in OCI, you can SSH to your instance and use the OCI utility oci-iscsi-config command to create and attach a block volume to the KVM instance:

sudo oci-iscsi-config create --attach-volume --volume-name VOLUME_NAME --size SIZE

Optionally, you can create a storage pool using the oci-kvm utility using the following command:

sudo oci-kvm create-pool --disk DEVICE_PATH --name POOL_NAME

You can create and attach multiple VNICs on an instance using the oci-network-config command. To create and attach a VNIC, use the following command:

sudo oci-network-config attach-vnic --vnic-name VNIC_NAME

For more usage details, see the OCI utilities documentation.
Using the OCI-KVM utilities
The OCI KVM (oci-kvm) utilities allow you to create and configure KVM guests on OCI instances. The following utilities are available with the KVM image:
oci-kvm create: Performs all actions required to create a KVM guest that uses OCI block storage and VNICs for both the root disk and network interface.

oci-kvm create [-h] [-D | --domain vm_name] [-d | --disk device_path] [-p | --pool pool_name] [-s | --disk-size disk_size] [-n | --net ip_vnic] [-v | --virtual-network virtual_network_name] [-V | --virt opt_args]

oci-kvm destroy: Permanently deletes a KVM guest and optionally deletes the associated storage pool-based disks.

oci-kvm destroy [-D | --domain vm_name][--destroy-disks]

oci-kvm create-pool: Creates a storage pool for hosting guest virtual disks. Pools can be created on block devices or OCI File Storage service systems. Use either of the following options:

oci-kvm create-pool [-n | --name pool_name][-d | --disk device_path]

oci-kvm create-pool [-n | --name pool_name][-N | --netfshost ip_nfs][-p | --path path_netfs]

oci-kvm list-pool: Lists the storage pools associated with the instance.

oci-kvm list-pool --output-mode text

oci-kvm create-network: Creates a virtual (libvirt) network that uses an OCI VNIC. The created libvirt network offers an IP range that is usable by other KVM guests.

oci-kvm create-network [-n | --net ip_vnic] [-N | --network-name network_name] [-B | --ip-bridge ip_bridge] [-S | --ip-start ip_start] [-E | --ip-end ip_end] [-P | --ip-prefix ip_prefix]

oci-kvm delete-network: Deletes a libvirt network previously created with the oci-kvm create-network command.

oci-kvm delete-network [-N | --network-name network_name]

For usage details, see the documentation or use the -h | --help command to display options for the command.
Premier level support included
Oracle Linux Support is included with an OCI subscription at no extra cost. So, you can enjoy the features and highest-level support for Oracle Linux and Oracle Linux KVM, including around-the-clock expert telephone and online support and access to enhancements and updates.
Getting started
To discover more about Oracle Linux KVM on OCI, refer to the Oracle Linux KVM documentation. Start by signing up for an OCI account today and deploying the Oracle Linux KVM image directly from the Oracle Cloud Marketplace.
For more information, see the following resources:
Oracle Linux KVM Image (Oracle Cloud Marketplace)
Getting Started: Oracle Linux KVM Image for Oracle Cloud Infrastructure (documentation)
Oracle Linux KVM user guide (documentation)
Oracle Virtualization (web page)
Linux on OCI (Oracle Learning Library)

Post Details
Added on Jul 1 2022