November 18

Linux: Red Hat Satellite with VMWARE

Refresh satellites knowledge of the vm servers on the ESXI hosts
systemctl stop virt-who
virt-who --one-shot 
systemctl start virt-who

Configuration of virt-who on the satellite server:
/etc/virt-who.d/one.conf

[one]
type=esx
hypervisor_id=hostname
server=vcenter.companyname.com
username=domainname\username
encrypted_password=5cd54deb8b1ebfb61fa04a9512bd97ed
owner=OrganizationalNameUsedInSatellite
env=Library
filter_hosts=esxidev.companyname.com,esxidev2.companyname.com,esxidev3.companyname.com,esxidev4.companyname.com,esxidev5.companyname.com,esxidev6.companyname.com,esxiprod1,esxiprod2.companyname.com,esxiprod3,esxiprod4.companyname.com,esxiprod5.companyname.com,esxiprod6.companyname.com,esxidev.companyname.com,esxidev1.companyname.com
rhsm_hostname=servername.companyname.com
rhsm_username=admin
rhsm_encrypted_password=456adc0cafa8ed065c021ce32bf64273
rhsm_prefix=/rhsm
Category: Linux | Comments Off on Linux: Red Hat Satellite with VMWARE
November 18

Linux: Red Hat Satellite job for updating and rebooting without a failed status

yum -y update ; shutdown -r +1 &

A “fail safe” option would be to run this from screen. This helps to protect system corruption in the event of a network drop.
screen -AmdS bash_shell bash ; screen -S bash_shell -p 0 -X stuff $’yum update -y\r’ ; screen -S bash_shell -p 0 -X stuff $’reboot\r’

The problem with this option is it always shows everything ran successfully.

Category: Linux | Comments Off on Linux: Red Hat Satellite job for updating and rebooting without a failed status
November 18

Linux: Red Hat subscription manager options

subscription-manager unregister
subscription-manager clean
subscription-manager register
subscription-manager subscribe --auto

subscription-manager identity
subscription-manager list --consumed
subscription-manager list --available
subscription-manager repos --list
subscription-manager repos --refresh

subscription-manager repos --enable=repoid
subscription-manager repos --disable=repoid
Category: Linux | Comments Off on Linux: Red Hat subscription manager options
November 18

Linux: Fedora – systemd-nspawn

systemd-nspawn - starts a namespace/chroot container environment (A Docker like environment)

1. Create a directory you want to install your container into
	mkdir /opt/DebianJessie
2. debootstrap --arch=amd64 stable /opt/DebianJessie - installs DebianJessie
3. systemd-nspawn -D opt/DebianJessie - start the container as root
	Add a b in front of the D = -bD to start the container without root

Fedora Eg.: dnf --releasever=24 --installroot=/absolute/path/ install systemd passwd dnf fedora-release - to install Fedora
Category: Linux | Comments Off on Linux: Fedora – systemd-nspawn
November 18

Linux: Script to load mpi modules on Fedora

loadmpi.sh 
#!/bin/bash
module load mpi
export PYTHONPATH=:/usr/lib64/python2.7/site-packages/openmpi:/usr/lib64/python2.7/site-packages/openmpi:/usr/lib64/python2.7/site-packages/openmpi
python -c "import mpi4py"
Category: Linux | Comments Off on Linux: Script to load mpi modules on Fedora