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

No comments:

Post a Comment

Exacs database creation using dbaascli

  Intro OCI (Oracle Cloud Infrastructure) provides robust automation capabilities for routine maintenance tasks such as patching, ...