Changing the Hostname of an oVirt Manager/Engine

Assalamualaikum,

Prepare relevant DNS and/or /etc/hosts records for the new name.
If using DHCP, update the DHCP server’s configuration.
Change the hostname. This is usually done by editing /etc/hostname and rebooting. There are other options and details which are not in the scope of this document.
Run the script ovirt-engine-rename:

# /usr/share/ovirt-engine/setup/bin/ovirt-engine-rename

It’s otopi-based. This means, among other things, that it looks similar engine-setup/cleanup, and provides similar logging, options, etc.

wassalam..

Advertisements
Posted in Uncategorized

How to Check RAM/Memory by Percentage

Assalamualaikum,

Using the the free command:

This will report the percentage of memory in use
% free | grep Mem | awk '{print $3/$2 * 100.0}'
23.8171

This will report the percentage of memory that’s free
% free | grep Mem | awk '{print $4/$2 * 100.0}'
76.5013

You could create an alias for this command or put this into a tiny shell script. The specific output could be tailored to your needs using formatting commands for the print statement along these lines:
free | grep Mem | awk '{ printf("free: %.4f %\n", $4/$2 * 100.0) }'

wassalam..

Posted in Linux | Tagged , , , ,

RHEV/oVirt Environment is Non Responsive with Errors as: Received fatal alert: certificate_expired

Assalamualaikum.

Issue
1. Certificates have expired and all hosts are non responsive
2. Getting error as below in the engine logs:
ERROR [org.ovirt.engine.core.vdsbroker.irsbroker.UploadStreamVDSCommand] (DefaultQuartzScheduler_Worker-64) [6d32f092]
Command 'UploadStreamVDSCommand(HostName = xyz, UploadStreamVDSCommandParameters:{runAsync='true', hostId='12345dbe-1db1-11e1-ade1-00215e97f418'})' execution failed: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_expired

ERROR [org.ovirt.engine.core.bll.UploadStreamCommand] (DefaultQuartzScheduler_Worker-64) [6d32f092] Command'org.ovirt.engine.core.bll.UploadStreamCommand' failed: EngineException:org.ovirt.engine.core.vdsbroker.vdsbroker.VDSNetworkException: javax.net.ssl.SSLHandshakeException:
Received fatal alert: certificate_expired (Failed with error VDS_NETWORK_ERROR and code 5022)

Resolution
Starting with RHEV 3.5.4 and beyond, the engine-setup utility updates all the certificates automatically.

For details please see the following solution.
1. Take backup of RHEVM database
2. Then run the # engine-setup to renew the certificates.

Example, below will be asked when the engine setup is run, provide the input as `Yes` to renew the certificates

--== PKI CONFIGURATION ==--

One or more of the certificates should be renewed, because they expire soon or include an invalid expiry date, which is rejected by recent browsers.
If you choose "No", you will be asked again the next time you run Setup.
See https://access.redhat.com/solutions/1572983 for more details.
Renew certificates? (Yes, No) [No]: Yes

3. It will also upgrade to the latest minor version available for RHEV
4. If the hosts certificates are expired then one by one put the host in Maintenance mode, then remove it and re-add the same so the new certificates are generated.

Root Cause
1. PKI certificates expired since initial RHEV installation and should be renewed.
2. RHEV-M upgrade asks to renew certificate. What does it mean?

Diagnostic Steps
1. Collect the following information from affected environment to check the issue further:
2. On the RHEV-M machine:
# cd /etc/pki/ovirt-engine; ls -lh database.txt database.txt.attr serial.txt cacert.conf cert.conf
# openssl x509 -in /etc/pki/ovirt-engine/ca.pem -noout -text
# openssl x509 -in /etc/pki/ovirt-engine/apache-ca.pem -noout -text
# openssl x509 -in /etc/pki/ovirt-engine/engine.cer -noout -text

3. SSH into the affected host:
# ls -al /etc/pki/vdsm/certs/
# openssl x509 -in /etc/pki/vdsm/certs/vdsmcert.pem -noout -text

wassalam..

Posted in Linux, oVirt, RedHat, RHEV, RHV, Virtualization | Tagged , , , ,

How to Install oVirt Guest Agent in Fedora/CentOS/RHEL


Assalamualaikum.

The oVirt Guest Agent provides information, notifications, and actions between the oVirt web interface and the guest. The agent provides the Machine Name, Operating System, IP Addresses, Installed Applications, Network and RAM usage and others details to the web interface.

The agent also provides Single Sign On so a authenticated user to the web interface does not need to authenticate again when connected to a VM.

First, install epel:
sudo yum -y install epel-release

Install oVirt Guest Tools using yum:
sudo yum install ovirt-guest-agent-common

Enter the following command to start the service:
sudo systemctl enable ovirt-guest-agent.service && sudo systemctl start ovirt-guest-agent.service

The web admin interface may take some time to start displaying the memory usage and other types of information. If you find that after some time this information has not been populated, restart the VM by performing a shut down or power off, power on, and verify that the service is started by running.

wassalam..

Posted in oVirt | Tagged , ,

How to Identify the File System Type in Linux/Solaris

heroes

Salam..

There are few methods how to determine your linux file system. Below are commands that I usually use.

Linux

$ df -Th
$ df -Th | grep "^/dev" 
$ fsck -N /dev/sd*
$ lsblk -f
$ mount | grep "^/dev"
$ cat /etc/fstab

Solaris

$ df -n 
$ mount -p
$ zfs list
$ fstyp /dev/rdsk/c*d*s*

wassalam..

Posted in freeBSD, Linux, Solaris, UNIX | Tagged ,

Happy New Year 2018!

..

Last login: Tue Jan 2 12:11:49 2018 from 104.223.123.98
[hanief@master ~]$ mv 2017 /archive
[hanief@master ~]$ sudo mkdir 2018
[hanief@master ~]$ cd 2018
[hanief@master ~]$ vi goals.sh
[hanief@master ~]$ chmod +x goals.sh
[hanief@master ~]$ nohup ./goals.sh &
[hanief@master ~]$ exit

..

Posted in Linux, UNIX | Tagged ,

CentOS-7 “Minimal Desktop” installation (GNOME)

zombie-gnomes-of-the-apocalypse-revenant-fx-15_edit

Assalamualaikum..

For some reasons you need to install GUI on your CentOS server. In my case, I having a bad time to install Oracle Database 12c in my CentOS using CLI. I don’t have plenty of times struggling with CLI environment. I have to finish my work as soon as possible so then I can enjoy my coffee. I just need a very minimal GUI to achieve my goal.

Follow the steps below;

  1. Install CentOS-7 – Minimal (of course)
  2. yum groupinstall “X Window System”
  3. yum install gnome-classic-session gnome-terminal nautilus-open-terminal control-center liberation-mono-fonts
  4. unlink /etc/systemd/system/default.target
  5. ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target
  6. reboot

Now you have a CentOS-7 Minimal Desktop installation LIKE CentOS-6 Minimal Desktop

Enjoy!

wassalam..

Posted in Install, Linux, UNIX | Tagged , , , , , , , ,