X
  • Monday, April 30, 2018

Easily Deploy a KVM Host Environment Using Oracle Linux on Oracle Cloud Infrastructure

By: Julie Wong | Product Management Director

KVM is built into the Unbreakable Enterprise Kernel (UEK) for Oracle Linux by default, and it enables you to use the UEK as a hypervisor. Deploying the Oracle Linux KVM host environment on Oracle Cloud Infrastructure gives you full control and flexibility to configure and manage your virtual machines (VMs) within a bare metal instance.

We’ve now made it easy to deploy an Oracle Linux KVM host and guest VMs on Oracle Cloud Infrastructure. Tools packaged in the new Oracle Linux KVM image for Oracle Cloud Infrastructure automate the guest VM creation process, and make it simple to create and delete VMs, and to allocate Oracle Cloud Infrastructure resources such as block storage devices and VNICs.

This post tells you how to get started. For detailed information and instructions, see Getting Started: Oracle Linux KVM Image for Oracle Cloud Infrastructure.

Deploy an Oracle Linux KVM Host

To use the Oracle Linux KVM image, you deploy it on an Oracle Cloud Infrastructure Compute instance.

First you use the custom Image Import feature in the Oracle Cloud Infrastructure Console to import the image.

Then you launch the Oracle Linux KVM instance on one of the following supported Oracle Cloud Infrastructure Compute bare metal shapes:

  • BM.Standard1.36
  • BM.Standard2.52

To create your guest VM, you need to configure a dedicated block storage device and VNIC for your KVM instance in the Oracle Cloud Infrastructure Console. You can use the oci-iscsi-config --show utility to display the details for all of the storage devices attached to your KVM instance.

Create a VM

The oci-kvm tool provided with the Oracle Linux KVM image uses the virt-install command-line tool to create new KVM guests by using the libvirt hypervisor management library. It allows you to create and configure KVM guests on Compute instances that use Oracle Cloud Infrastructure resources such as block storage volumes and VNICs. 

Following is an example invocation using oci-kvm to create a guest VM:

# oci-kvm create -D my_guest -V --vcpus 4 --memory 8192 --boot cdrom,hd --location /mnt/OracleLinux-R7-U4-Server-x86_64-dvd.iso --nographics --console pty,target_type=serial --console pty,target_type=virtio --noautoconsole --os-variant=rhel7 --extra-args "console=tty0 console=ttyS0,115200n8 serial"

This example creates an Oracle Linux 7.4 guest, and is configured to use a serial console for console output. 

If you want to use a particular block storage device, specify -d/--disk with the path to the device. If you want to use a particular VNIC, specify -n/--net with its private IP address. You can also pass arguments directly to virt-install by using the –V option.

Delete a VM

The oci-kvm tool can also remove and unconfigure all the system resources assigned to the guest VM and make them available for reuse.

Following is an example of how to delete a guest VM:

# oci-kvm destroy -D my_guest

For detailed information, see the following resources:

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha