Tuesday, September 6, 2022

Configure KVM Hypervisor with OLVM (Oracle Linux Virtual Manager) - Part 2/5


 

                                  


Intro

acronym:

OLVM - Oracle Linux Virtual Manager
KVM   - Kernel-based Virtual Machine
OVM   - Oracle Virtual Manager
ODA    - Oracle Data Appliance 

OLVM (Oracle Linux Virtual Manager) elevated the KVM (kernel-based virtual Machine management processes and reduced administration overhead.  As Oracle is moving out of OVM (Oracle Virtual Manager), customers who are using OVM as their virtualized platform need to plan the OLVM journey. Many small-medium scale businesses are still using virtualized ODA and hosted the VMS on top of ODA.  

I think now is the right time to move out of OVM to Oracle KVM.  KVM hypervisors are much more stable than OVM. Oracle's future plans are combined with open-source virtualization. Also, there are many more features than the OVM. The below-mentioned table demonstrates the enhancements OLVM has over the old OVM platform.


Virtualization technology still has a high demand for managing on-prem databases on top of Oracle KVM.   Also, I have listed down some of the key features of OLVM.

Key features of OLVM
  • Live VM migration between hosts
  • Oracle Enterprise Manager Integration (OEM)
  • CPU Pinning Capabilities
  • VM High Availability
  • Virtual Appliances & Templates (ovf/ova support)
  • Snapshotting of existing VMs. This is an additional feature from OVM
  • Role-based User access
  • Web-based User Interface (UI)
  • Representation State Transfer (REST)
  • Application Programming Interface (API)

Integrate KVM with OLVM

In this article, I will cover how to add pre-existing KVM hypervisor to the OLVM engine. I have shared the oracle note explaining how to prepare the KVM.

https://docs.oracle.com/en/virtualization/oracle-linux-virtualization-manager/getstart/getstarted-manager-install.html#manager-prep-kvm

OL8 server needs to enable the ol8 repo to integrate KVM with OLVM.  Make sure you can have internet access on these hosts to access the repo. Once you configure the KVM then can remove the internet connection from KVM hypervisors.



dnf config-manager --enable ol8_baseos_latest

dnf install oracle-ovirt-release-el8

[root@kvm01 ~]# dnf install oracle-ovirt-release-el8
Last metadata expiration check: 0:02:04 ago on Fri 22 Jul 2022 12:08:59 AM EDT.
Dependencies resolved.
===============================================================================================================================================================================================================
 Package                                                    Architecture                             Version                                         Repository                                           Size
===============================================================================================================================================================================================================
Installing:
 oracle-ovirt-release-el8                                   x86_64                                   1.0-1.0.3.el8                                   ol8_baseos_latest                                    23 k

Transaction Summary
===============================================================================================================================================================================================================
Install  1 Package

Total download size: 23 k
Installed size: 35 k
Is this ok [y/N]: y
Downloading Packages:
oracle-ovirt-release-el8-1.0-1.0.3.el8.x86_64.rpm                                                                                                                              9.0 kB/s |  23 kB     00:02
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                          9.0 kB/s |  23 kB     00:02
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                       1/1
  Running scriptlet: oracle-ovirt-release-el8-1.0-1.0.3.el8.x86_64                                                                                                                                         1/1
  Installing       : oracle-ovirt-release-el8-1.0-1.0.3.el8.x86_64                                                                                                                                         1/1
  Running scriptlet: oracle-ovirt-release-el8-1.0-1.0.3.el8.x86_64                                                                                                                                         1/1
Enabling OLVM 4.4 required Yum Channels...
Enabling ol8_baseos_latest Yum Channel...
Enabling ol8_UEKR6 Yum Channel...
Enabling ol8_gluster_appstream Yum Channel...
Enabling ol8_kvm_appstream Yum Channel...
Disabling yum module virt:ol
Enabling yum module virt:kvm_utils2
Enabling module pki-deps
Enabling module postgresql:13
Required oVirt 4.4 Yum Channels enabled.
Done.

  Verifying        : oracle-ovirt-release-el8-1.0-1.0.3.el8.x86_64                                                                                                                                         1/1

Installed:
  oracle-ovirt-release-el8-1.0-1.0.3.el8.x86_64

Complete!
[root@kvm02 ~]#

This will list down the new repositories



[root@kvm01 ~]# dnf repolist
repo id                                                                      repo name
ol8_UEKR6                                                                    Latest Unbreakable Enterprise Kernel Release 6 for Oracle Linux 8 (x86_64)
ol8_appstream                                                                Oracle Linux 8 Application Stream (x86_64)
ol8_baseos_latest                                                            Oracle Linux 8 BaseOS Latest (x86_64)
ol8_gluster_appstream                                                        Oracle Linux 8 Gluster Appstream (x86_64)
ol8_kvm_appstream                                                            Oracle Linux 8 KVM Application Stream (x86_64)
ovirt-4.4                                                                    Latest oVirt 4.4 Release (x86_64)
ovirt-4.4-extra                                                              oVirt 4.4 Extra (x86_64)
[root@kvm01 ~]#



There are two ways to add KVM to OLVM

  1. Add KVM using the root password.
  2. Add KVM using OLVM (public key) - recommended approach

This below mention figure shows how to add a KVM to OLVM. OLVM stored the log file under "/var/log/ovirt-engine/host-deploy/". KVM adding process is fully automated via ansible.




This is how it looks after integrating kvm01 with OLVM.  All the KVM events can be viewed from the events tab. 




This figure illustrates the KVM events.



Conclusion

OLVM is a far better product than OVM. There are many features introduced in the latest updates. As this is combined with the open-source world products will be more mature in the coming years. As of 31 March 2021, Premier Support for OVM will end and the product goes into lifetime sustaining support. OVM will still get the maintenance update 3.4.6.3 but further development on the product and new features has stopped. If oragnization using OVM as virtulized platform needs to plan their new journey with OLVM.

 

Friday, September 2, 2022

OLVM (Oracle Linux Virtualization Manager) - Change hostname

 



Intro

OLVM (Oracle Linux Virtual Manager) is the single point of GUI (web console) that enables system engineers to manage multiple KVMs, Vms, Storage domains and etc ... .  Also note that Oracle Linux KVM is the same hypervisor used in the Oracle Cloud. To get more insight about OCI cloud infrastructure virtualization I shared the below mention pdf to get more understanding about the KVM used in Oracle Cloud: https://www.oracle.com/a/ocom/docs/olvm-datasheet-nov2019.pdf .  Oracle OVM era is over, an alternative to OVM is KVM, offered under Oracle Linux Virtualization Manager (OLVM).

I have shared the oracle documentation link which has all the details related to virtualization.

Oracle Linux Virtualization Manager - Books

Also, Oracle KVM and OLVM come up with many benefits. A few advantages are mentioned below.

  • Complete server virtualization and management solution with zero license cost.
  • Single software distribution for Oracle Linux OS or Oracle Linux KVM.
  • Speeds application deployment with Oracle Virtual Appliances.
  • Hard Partitioning support enables efficient Oracle application software licensing.
  • Full Stack Management with Oracle Enterprise Manager.
  • Path to Oracle Cloud Infrastructure with a common hypervisor

In this article, I will cover how to change the hostname of the OLVM server. This may be required if you need to move OLVM to a different data center with new hostname.

Change hostname in OLVM and KVM.


I have shared the oracle meta link note to change the hostname.

OLVM: How to Change IP Address or Hostname of Engine/KVM Host (Doc ID 2793023.1)

To change the hostname we can use /usr/share/ovirt-engine/setup/bin/ovirt-engine-rename command.


[root@kvm02 ~]# /usr/share/ovirt-engine/setup/bin/ovirt-engine-rename
[ INFO  ] Stage: Initializing

          Welcome to the ovirt-engine-rename utility

          More details about the operation and possible implications
          of running this utility can be found here:
          http://www.ovirt.org/documentation/how-to/networking/changing-engine-hostname/

[ INFO  ] Stage: Environment setup
          Configuration files: /etc/ovirt-engine-setup.conf.d/10-packaging-jboss.conf, /etc/ovirt-engine-setup.conf.d/10-packaging.conf, /etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf
          Log file: /var/log/ovirt-engine/setup/ovirt-engine-rename-20220722113739-h40mav.log
          Version: otopi-1.9.5 (otopi-1.9.5-1.el8)
[ INFO  ] Stage: Environment packages setup
[ INFO  ] Stage: Programs detection
[ INFO  ] Stage: Environment setup (late)
[ INFO  ] Stage: Environment customization
[WARNING] Host name kvm02 has no domain suffix
          New fully qualified server name:  []: kvm02.oracle.com
[WARNING] Failed to resolve kvm02.oracle.com using DNS, it can be resolved only locally

          --== PRODUCT OPTIONS ==--

[ INFO  ] Stage: Setup validation
          During execution engine service will be stopped (OK, Cancel) [OK]:
[ INFO  ] The following files will be updated:

          /etc/grafana/grafana.ini
          /etc/ovirt-engine/engine.conf.d/10-setup-grafana-access.conf
          /etc/ovirt-engine/engine.conf.d/10-setup-protocols.conf
          /etc/ovirt-engine/logcollector.conf.d/10-engine-setup.conf
          /etc/ovirt-engine/ovirt-vmconsole-proxy-helper.conf.d/10-setup.conf
          /etc/ovirt-provider-ovn/conf.d/10-setup-ovirt-provider-ovn.conf
          /etc/pki/ovirt-engine/cert.conf
          /etc/pki/ovirt-engine/cert.template
          /etc/pki/ovirt-engine/certs/apache.cer
          /etc/pki/ovirt-engine/certs/ovirt-provider-ovn.cer
          /etc/pki/ovirt-engine/certs/websocket-proxy.cer
          /etc/pki/ovirt-engine/keys/apache.key.nopass
          /etc/pki/ovirt-engine/keys/apache.p12
          /etc/pki/ovirt-engine/keys/ovirt-provider-ovn.key.nopass
          /etc/pki/ovirt-engine/keys/ovirt-provider-ovn.p12
          /etc/pki/ovirt-engine/keys/websocket-proxy.key.nopass
          /etc/pki/ovirt-engine/keys/websocket-proxy.p12
          /etc/pki/ovirt-engine/qemu-cert.template

[ INFO  ] Stage: Transaction setup
[ INFO  ] Stopping engine service
[ INFO  ] Stopping websocket-proxy service
[ INFO  ] Stopping ovirt-provider-ovn
[ INFO  ] Stopping service: ovirt-engine-dwhd
[ INFO  ] Stopping service: grafana-server
[ INFO  ] Stage: Misc configuration (early)
[ INFO  ] Stage: Package installation
[ INFO  ] Stage: Misc configuration
[ INFO  ] Update OVN provider
[ INFO  ] Update WebSocketProxy option
[ INFO  ] Generating post install configuration file '/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf'
[ INFO  ] Stage: Transaction commit
[ INFO  ] Stage: Closing up

          --== SUMMARY ==--

[ INFO  ] Starting service: ovirt-engine-dwhd
[ INFO  ] Starting service: grafana-server
[ INFO  ] Starting engine service
[ INFO  ] Starting ovirt-provider-ovn
[ INFO  ] Starting ovirt-websocket-proxy
[ INFO  ] Restarting httpd
          Rename completed successfully

          --== END OF SUMMARY ==--

[ INFO  ] Stage: Clean up
          Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-rename-20220722113739-h40mav.log
[ INFO  ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20220722113959-rename.conf'
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination
[ INFO  ] Execution of rename completed successfully
[root@kvm02 ~]#

Conclusion

There is risk involved in this hostname change activity, I would recommend backing up the ovirt-engine settings. If this is performed under DNS it's a must to perform below mention task. 

The IP address or hostname of the KVM host is stored in the OLVM database and used for the security certificate. So changing IP address or hostname of the KVM host needs re-registration of the Host onto OLVM Engine. 

  • Shutdown/migrate all running VMs on the KVM host and put the host into maintenance mode. 
  • Remove the KVM host from OLVM Engine.
  • Re-install OS onto the KVM host with configuring a new IP address/hostname.
  • Re-add the KVM host to OLVM Engine

Unified Auditing Housekeeping

  Intro  Data is the new currency. It is one of the most valuable organizational assets, however, if that data is not well...