In the previous article, we explained the “Oracle license concept” and “Partitioning Policy” for virtual server environments. You should now know that there are many things to be careful about when using Oracle products in a virtual server environment.
We also explained that Oracle Linux KVM’s Hard Partitioning feature allows you to optimize the licensing cost for Oracle products. However, you can’t limit the number of licenses just by using Oracle Linux, you need to assign a specific CPU core to the virtual machine in the form of pinning.
This is also written in the “Hard Partitioning with Oracle Linux KVM” section introduced last time, but the reality is that it is quite difficult to actually build it.
Therefore, in this article, we will focus on the points to note when configuring. However, this article is for the purpose of operation verification, so it is different from the actual operating environment. There are many things to consider, especially in the production environment, such as availability and security, but in this article, we will ignore these factors.
In addition, knowledge of KVM is required to build the environment, but it is not the main issue, so we will only mention it briefly. For more information on Linux and KVM, see the Oracle Linux and Red Hat Enterprise Linux manuals at the end of the article.
Requirements for hard partitioning
After reading the whitepaper “Hard Partitioning with Oracle Linux KVM” about Oracle Linux Hard Partitioning, perhaps you think that it is easy to carry out hard partitioning using the olvm-vmcontrol command?
The reality is completely different. In addition to using Oracle Linux KVM as a hypervisor, you also need the management tool Oracle Linux Virtualization Manager. And these are quite difficult to set up. In the previous generation of virtualization products, Oracle VM Server, you could set up hard partitioning with just a small rewrite of the configuration file. The current situation is very different.
Therefore, we will explain the prerequisite requirements.
Oracle Linux KVM and Oracle Linux Virtualization Manager
First, let’s review the basic components.
Oracle Linux KVM
Oracle Linux KVM is a hypervisor that utilizes KVM built into the Oracle Linux kernel. You can use the kernel with both RHCK and UEK. As a guest OS, it supports Ubuntu, SUSE Linux, and Microsoft Windows as well as RHEL-based Linux. Note that, there is no product called Oracle Linux KVM, and it is realized by incorporating virtualization packages into Oracle Linux 7, Oracle Linux 8, and Oracle Linux 9.
Oracle Linux Virtualization Manager
Oracle Linux Virtualization Manager (OLVM) is a virtual environment management tool equivalent to VMware’s vCenter. You can do tasks as needed for your operations, such as managing Oracle Linux KVM hosts and virtual machines. Below, it is sometimes abbreviated as OLVM.
Oracle Linux Virtualization Manager is based on the open source oVirt, and the same oVirt-based management tools are used in Red Hat Virtualization (RHV). To be precise, the open source implementation of Red Hat Virtualization is oVirt. Each has a relationship as shown in the following table.
Vendor | KVM Management Tool | Infrastructure Configuration Management Tool |
---|---|---|
Red Hat | Red Hat Virtualization | Red Hat Satellite |
Open Source Implementation | oVirt | Spacewalk |
Oracle | Oracle Linux Virtualization Manager | Oracle Linux Manager |
Oracle Linux Virtualization Manager is required
To pin the CPU for hard partitioning, the target Oracle Linux KVM must be managed by the Oracle Linux Virtualization Manager.
This is very important. Oracle Linux Virtualization Manager is not required to manage Oracle Linux KVM. However, it is necessary for hard partitioning. The problem is that depending on whether Oracle Linux Virtualization Manager is used or not, the way it is built and operated is completely different.
In Linux KVM, you can manage with the GUI tool virt-manager or the CLI virsh. You can also use Cockpit, a web-based management tool. However, if you migrate to Oracle Linux Virtualization Manager, you will not be able to use any of these tools. The base is the web-based Oracle Linux Virtualization Manager, followed by the REST interface.
If you migrate to Oracle Linux Virtualization Manager, you will no longer be able to manage it with virt-manager or virsh.
The following is a summary of the requirements for hard partitioning.
- The Oracle Linux KVM host is managed by Oracle Linux Virtualization Manager
- olvm-vmcontrol is set up in Oracle Linux Virtualization Manager
Oracle Linux Virtualization Manager Architecture
The key to using Oracle Linux Virtualization Manager is to understand the architecture. In both Oracle Linux Virtualization Manager and Red Hat Virtualization, the manual describing the architecture is written at the top of the documentation list. This section describes the main components and how to configure them.
Key components of Oracle Linux Virtualization Manager
Oracle Linux Virtualization Manager consists of two main components:
o-Virt Engine
The main component of Oracle Linux Virtualization Manager, which provides services for GUI and REST API to manage resources. It is written in Java and runs on WildFly (formerly JBoss), a built-in Java EE container. It uses PostgreSQL for data management.
VDSM (Virtual Desktop Server Manager)
The agent for the o-Virt Engine to be installed on the managed KVM host.
Two configuration methods
There are the following two ways to configure your system with Oracle Linux Virtualization Manager. In order to build correctly, you need to understand the characteristics of each. For details, please refer to the manual, and we will explain it briefly here.
- Self-Hosted Engine
- Stand Alone Manager
Self-Hosted Engine
The most common way is to run Oracle Linux Virtualization Manager on a virtual machine on an Oracle Linux KVM host. The diagram shows a two-host configuration, but a one-host configuration can be used when availability is not required.
Advantages
- oVirt Engine runs on a virtual machine, so one fewer physical server is required
- Redundancy can easily be added to the oVirt Engine
Disadvantages
- The oVirt Engine runs on the KVM host, reducing the CPU and memory available to the KVM host
Stand Alone Manager
With this method, the oVirt Engine runs on a host other than the managed Oracle Linux KVM host. A physical server or a virtual machine that is hosted in a different virtual environment is used.
Advantages
- The oVirt Engine is independent of the managed host, so there is no load on the host
Disadvantages
- To make the oVirt Engine redundant, a cluster configuration using HA cluster software or similar is required.
Unsupported method
Installing Oracle Linux Virtualization Manager on a managed Oracle Linux KVM host as shown below is not supported.
Differences in terminology between Oracle and third-party manuals
When reading the Oracle Linux Virtualization Manager manual, the translation of terms and the organization of the manual are confusing. The following table compares these.
Source | Virtual machine method on KVM | Hosted separately from KVM |
---|---|---|
oVirt/RHV English manual | Self-Hosted Engine | Stand Alone Manager(*1) |
RHV Japanese manual | Self-Hosted Engine | Stand Alone Manager |
OLVM English manual | Self-Hosted Engine | Engine(*2) |
OLVM Japanese manual | Jiko Host Engine (Self-Hosted Engine) | Engine (*2) |
*2 Stand Alone Manager is also used in a few places, but there is no description that clearly distinguishes the configurations. It is also sometimes referred to as Engine
Although it is based on machine translation, the Japanese version of “Self-Hosted Engine” is not a good translation. In addition, it is confusing because there is no name that clearly indicates the “Stand Alone Manager” method in the start guide.
Planning for building Oracle Linux Virtualization Manager
To build Oracle Linux Virtualization Manager, you need to understand the Oracle Linux Virtualization Manager architecture and the system requirements.
Choosing a Self-Hosted Engine and Standalone Manager
When building Oracle Linux Virtualization Manager for the first time, we recommend the Stand Alone Manager method shown below. In the production environment, we recommend the Self-Hosted Engine method, but the Stand Alone Manager method is easier to build. When there are few servers available, please use a Self-Hosted Engine system. You will also need a DNS server that you can manage yourself.
Oracle Linux KVM host and Oracle Linux Virtualization Manager host
This will be described as an organization of terms. The server on which Oracle Linux Virtualization Manager is installed is called the Oracle Linux Virtualization Manager host (OLVM host) or the engine host. The Oracle Linux KVM server managed by Oracle Linux Virtualization Manager is called the Oracle Linux KVM host or KVM host. In the official manual, there are places that simply refer to the Oracle Linux Virtualization Manager host as a host, so please judge from the context.
Can you build a validation environment with VirtualBox?
When we tried to build with VirtualBox, we were able to install Oracle Linux Virtualization Manager and add a KVM host. However, the error “host CPU type is not supported in this cluster compatibility” occurred and no further operations could be performed. It may be possible with other PCs or virtual environments.
In order to give it a try, perhaps you should use the following services on Oracle Cloud Infrastructure.
- Oracle Linux Virtualization Manager: Compute virtual machine
- Oracle Linux KVM host: Compute bare metal instance
System requirements
The system requirements for the Oracle Linux Virtualization Manager host and the Oracle Linux KVM host are as follows.
Oracle Linux Virtualization Manager host requirements
- Oracle Linux 8.5 or later for oVirt 4.4
- CPU:2 cores,MEM:4GB,DISK:25GB (All minimum requirements)
Oracle Linux KVM host requirements
- Oracle Linux 7.6 or later or Oracle Linux 8.5 or later for oVirt 4.4
- CPU:2 cores,MEM:2GB,DISK:60GB (All minimum requirements)
What is important here is that the supported OLVM host and KVM host requirements differ depending on the Oracle Linux Virtualization Manager version. Please check “Requirements and Scalability Limitations” in “Architecture and Planning” of the “Oracle Linux Virtualization Manager Manual” for the version to be used.
Tips for building Oracle Linux Virtualization Manager
Because of the complexity of the procedure and the difficulty of the manual, building the Oracle Linux Virtualization Manager environment is confusing even if you have some experience with Linux and KVM. In this section, we will introduce tips for building a validation environment.
Also, at least for now, the Red Hat Virtualization documentation is more complete. The commands you run during installation are different, but the overall flow and limitations are the same. It is recommended to have a look through it once.
Procedure to build Oracle Linux Virtualization Manager
The following diagram shows the steps to build Oracle Linux Virtualization Manager to achieve hard partitioning. There are different procedures for Stand Alone Manager and Self-Hosted Engine.
Notes on building an Oracle Linux server
This section describes notes on building an Oracle Linux server before installing Oracle Linux Virtualization Manager. The Oracle Linux Virtualization Manager host is the same as the Oracle Linux KVM host.
Installation type to select
Oracle Linux is installed with “minimal installation”. However, since the commands required for operation validation may not be installed, it is better toinstall at least the following commands:
dnf install bind-utils nc tmux tree -y
Other requirements
Other requirements include the following. Please note that there are some things that are not written in the manual.
- It is possible to resolve the name with both forward and reverse DNS. In other words, you need another server to run DNS besides Oracle Linux Virtualization Manager or Oracle Linux host
- The firewall must be enabled. Opening of the required ports is automatically set by the setup tool
- SELinux should be enabled
- The locale of the Oracle Linux Virtualization Manager host must be en_US.utf8
The locale of the Oracle Linux Virtualization Manager host must be en_US.utf8. If it looks like this, there is no problem.
# localectl
System Locale: LANG=en_US.utf8
VC Keymap: jp
X11 Layout: jp
If the locale is other than en_US.utf8, such as en_US.UTF-8, perform the following to change it:
# dnf install glibc-langpack-en -y
# localectl set-locale LANG=en_US.utf8
Select repository to use
The Oracle Linux Virtualization Manager Start Guide describes the following two types of hosts as pre-installation settings.
- For ULN registered hosts
- For Oracle Linux Yum server hosts
The former is the procedure when you have signed up for Oracle Linux Premier Support and are using a ULN-registered host. The latter is a host procedure that refers to the public Yum repository (https://yum.oracle.com) with or without a Premier Support contract. The procedure is slightly different, so please select the appropriate one. This procedure is the same for Oracle Linux KVM hosts.
How to add a public key when adding a KVM host
When you add a KVM host in Oracle Linux Virtualization Manager, you can choose a password method or an SSH public key method. We recommend the SSH public key method. At this time, the public key generated by the management portal will be added to the KVM host side.
# mkdir -p /root/.ssh
# vi /root/.ssh/authorized_keys ←When adding manually
# cat kvmhost.pub >> /root/.ssh/authorized_keys←When adding from a saved file
# chmod 600 /root/.ssh/authorized_keys
Access Oracle Linux Virtualization Manager with a different FQDN
The Oracle Linux Virtualization Manager management portal is accessed with an FQDN, such as https://olvm.sample.com/ovirt-engine. However, if you access with a different hostname for some reason, such as port forwarding, the login screen will not be displayed. At that time, define an alternate hostname on the Oracle Linux Virtualization Manager host.
We will create a definition file.
vi /etc/ovirt-engine/engine.conf.d/99-custom-sso-setup.conf
The content to add is as follows. Separate multiple hosts with spaces.
SSO_ALTERNATE_ENGINE_FQDNS="localhost hostname1 hostname2"
Reboot the service.
systemctl restart ovirt-engine
Can you use virsh?
We wrote that the virsh command is not available in Oracle Linux Virtualization Manager. However, read-only mode can be used. Add -r or –readonly as follows.
# virsh -r list --all
Id Name State
----------------------------------
0 o19v1 running
1 o19v2 running
# virsh -r vcpuinfo o19vm1 --pretty
VCPU: 0
CPU: 0
State: running
CPU time: 5.4s
CPU Affinity: 0-1 (out of 12)
VCPU: 1
CPU: 1
State: running
CPU time: 2.9s
CPU Affinity: 0-1 (out of 12)
In case of a problem
If you can’t set it up properly, in addition to searching online, check the following information:
- Oracle Linux Virtualization Manager “Events” in Admin Portal
- Logfile:
/var/log/ovirt-engine/engine.log
- My Oracle Support
Conclusion
Once you have configured your Oracle Linux Virtualization Manager, follow the instructions in the white paper Hard Partitioning with Oracle Linux KVM to configure hard partitioning.
There is one last thing to keep in mind. It is the availability of a virtual machine with hard partitioning configured. For clusters configured with multiple Oracle Linux KVM hosts, virtual machines can be live migrated. However, virtual machines with fixed CPUs in hard partitioning are not eligible for live migration. If you need some level of availability, you should consider a recovery plan that also takes into account the license.
References
Oracle
- Oracle Linux Virtualization Manager Documentation
- Hard Partitioning with Oracle Linux KVM
- Oracle Linux 8 documentation
- Oracle Linux KVM User Guide
- Oracle Linux Virtualization Manager training,
Red Hat
- Red Hat Virtualization Manual
- Red Hat Enterprise Linux 8 documentation
- Configuring and Managing Red Hat Enterprise Linux 8 Virtualization
Others