Posted on Leave a comment

SAP HANA for RedHat 8.4 – Bypass installer compatibility

Red hat provides a playbook that can be used for SAP HANA configuration on RHEL. This ansible script sets environment variables and kernel values in order to optimize the environment for SAP workloads.

https://www.redhat.com/en/blog/getting-started-your-sap-hana-journey-rhel-8-sap-solutions

However you may encounter errors during the installation procedure. This article explains how to bypass them in order to run it on a RHEL 8.4 environment.

The first error you will notice is the sap_domain. This occurs if you have not set a value for this variable on vars.

In order to resolve this issue run the playbook using sap_domain variable.

ansible-playbook site.yml --extra-vars sap_domain=yourdomain

The second issue you will notice is that RHEL 8.4 does not belong to the supported distributions.

The compatibility is stored on the ansible collection vars section and you should edit that.

vi /usr/share/ansible/roles/sap-hana-preconfigure/vars/RedHat_8.yml

Add 8.3 or 8.4 version and save the file.

The last error you may notice would be about required packages.

Add the below repositories:

subscription-manager repos --enable=rhel-8-for-x86_64-appstream-rpms \
--enable=rhel-8-for-x86_64-baseos-rpms \
--enable=rhel-8-for-x86_64-sap-solutions-rpms \
--enable=ansible-2-for-rhel-8-x86_64-rpms

Rerun the ansible playbook.

Verify the changed states of various tasks and check active tuned profile

Posted on Leave a comment

Extend swap size on Redhat – Installer up to 128GB

If you try to allocate more than 128GB on swap partition for a Redhat installation you will notice that is not possible through installer. This is a known bug on Redhat bugzilla that is mentioned as resolved. However I tried to allocate 256GB swap with a RedHat 8.2 installer and I got the maximum size which is 128GB. In this article you will learn how to increase swap size manually.

First validate that there is available space on the volume group. (140g available on my case)

Then extend the swap logical volume

Deactivate swap file

format swap

Reactivate swap partition.

You can verify swap space with

free -g
Posted on Leave a comment

Create and manage users with Ansible – automatically create sudo users

Creating users is a very trivial task that requires time, especially if there is not a Active Directory mechanism integrated with the Linux servers. In order to make your life easier as an administrator you can run the below playbook that will create users based on a list and add them sudo capabilities.

Task 1
creates the users that have been specified on the loop section.

Task 2
creates the appropriate sudoers file

  1 ---               
  2 - name: create sudoers users based on request
  3   hosts: localhost
  4   become: true    
  5   tasks:          
  6     - name: create users based on a list
  7       user:       
  8         name: "{{ item }}"
  9         password: "{{ '#Passw0rd#' | password_hash('sha512') }}"
 10         shell: /bin/bash
 11       loop:       
 12         - user1
 13         - user2
 14                   
 15     - name: create sudoers file for user
 16       copy:       
 17         content: '{{ item }} ALL = (ALL) ALL'
 18         dest: "/etc/sudoers.d/{{item}}"
 19       loop:       
 20         - user1
 21         - user2

Run the playbook and verify that the password is correct and user has sudo capabilities.

ansible-playbook createusers.yml

Posted on Leave a comment

Cannot change boot order VMware – items cannot be modified in user mode

Recently I had a problem changing the boot order on a Windows VM hosted on vSphere 6.7 with BIOS configured as boot software.

When I tried to change the boot order I could locate the message:

All items on this menu cannot be modified in user mode. If any items require changes, please consult your system Supervisor.

As a result I could not boot from the CD device. This happens because the boot order is defined on the .vmx file of the virtual machine. In more detail the bios.bootOrder attribute should be changed accordingly.

Download and edit .vmx. You should add cdrom as the first option.

Rename the existing .vmx for backup purposes


Force a BIOS boot on setup screen

Upload the .vmx file on VM datastore folder.

Then the boot will be performed from CD as expected.