0

VM image introspection

Image formats RAW – Unstructured disk image format. QCOW2 – Disk format supported by QEMU emulator. ISO – Sector-by-sector copy of the data on a disk, stored in a binary file. AKI – Indicates an Amazon Kernel Image. AMI – Indicates an Amazon Machine Image. ARI – Indicates an Amazon RAMDisk Image. VDI – Disk format supported by VirtualBox virtual machine monitor and the QEMU emulator. VHD – Common disk format used by virtual machine monitors from VMWare, VirtualBox, and others. VMDK – Disk format supported by many common virtual machine monitors. Every image format comes with a set a… Continue Reading

0

who is using the most memory

simple sort to show which application is using the most memory. ps -elf | awk ‘{print $10, $3, $4, $15, $16}’| sort -nr | head 572923 mysql 1246 /usr/libexec/mysqld –basedir=/usr 257775 root 6260 /usr/bin/python /usr/bin/fail2ban-server 176636 clamav 1086 clamd 146010 2001 27443 /usr/sbin/httpd 122691 apache 30546 /usr/sbin/httpd 121580 apache 27444 /usr/sbin/httpd 121410 apache 6437 /usr/sbin/httpd 121362 apache 6438 /usr/sbin/httpd 121223 apache 6439 /usr/sbin/httpd 121222 apache 6428 /usr/sbin/httpd in my case its mysqld.

15

racadm quick dirty cheatsheet

iDRAC racadm quick and dirty cheatsheet. racadm command can be issues via iDRAC/CMC/OS if svradmin-racadm is installed. Also you can specify -h option to access remote servers RAC as long as you have network access. Also if you are having problems with racadm “Failed to initialize transport” install openssl-devel. full documentation for iDRAC7 can be found here. % Get all iDRAC settings in a file racadm get -f config.txt If you like you can change the contents of config.txt and apply it back to iDRAC racadm set -f config.txt % Set password for root user racadm set iDRAC.Users.2.Password PASSWORD” %… Continue Reading

0

Dell SUU on 64bit CentOS/RHEL

Dell SUU (Server Update Utility) is a tool provided as an ISO from Dell that runs on windows and linux to search for drivers and firmware updates. In 32bit CentOS/RHEL SUU runs without problems however in 64bit correct pre-reqs are required for SUU to work correctly. SUU manual is located here. yum -y install glibc.i686 compat-libstdc++-33.i686 libstdc++.i686 zlib.i686 libxml2.i686 libXp.i686 libXtst.i686 ncurses-libs pam.i686 procmail mount the ISO. you can do this 2 ways. #1 using virtual media in the IDRAC or #2 loop mounting the iso from the OS after transferring the ISO to the OS. Check for updates ./suu… Continue Reading

0

LDAP MD5 Cert Error on RHEL/CentOS 6.4+

With the update of nss-3.14.0 LDAP stopped using the MD5 signed certificate. nss-3.14.0 update deems that MD5 as unsecure. The change causes authentication of users using LDAP to fail. There are 4 possible ways to fix this problem 1) update the LDAP certificate to use other type of encryption than MD5 2) modify each kernel line in /etc/grub.conf to add support for MD5 and also in create nss.sh in /etc/profile.d in /etc/grub.conf add to the end of each kernel line systemd.setenv=NSS_HASH_ALG_SUPPORT=+MD5 in /etc/profile.d create nss.sh with export NSS_HASH_ALG_SUPPORT=+MD5 REBOOT 3) export the correct options to /etc/sysconfig/init in /etc/sysconfig/init add export… Continue Reading

0

Docker Common Commands: 101 Part 2

The comprehensive Docker command line reference is located here. However we will cover some basic commands. Image Build an image docker build -rm=true . Install an image docker pull ${IMAGE} List of installed images docker images docker images –tree (tree view) docker images -no-trunc (detailed listing) Remove an image docker rmi ${IMAGE_ID} Remove all untagged images docker rmi $(docker images | grep “^” awk ‘{ print $3 }’) Remove all images docker rm $(docker ps -aq) Container Run a container docker run (many other options on this) List containers docker ps docker ps -a (list all containers) Stop a container… Continue Reading

0

Docker on CentOS/RHEL7 101 Part 1

My journey with Docker. Installing Docker on CentOS/RHEL7 $ sudo yum install docker $ sudo systemctl start docker $ sudo systemctl enable docker NOTE: if you are using firewalld make sure that firewalld is started before Docker. Also if firewalld is restarted please make sure to restart Docker afterwards. Now that Docker is installed lets pull a image and play with it a bit. $ sudo docker pull centos # pulls the latest centos7 container Trying to pull repository docker.io/centos … fd44297e2ddb: Download complete 6941bfcbbfca: Download complete 41459f052977: Download complete Status: Image is up to date for docker.io/centos:latest $ sudo… Continue Reading

0

shrink sparse qcow2 file

When a vm’s been running for a while the sparse file will get bigger and bigger. If a cleanup has been done and the space usage is back down to minimal the sparse file will remain the largest size it was before. you can shrink the sparse file back down to minimal space usage by issuing the following. Please note that VM should be off during this. mv myqcow2file.qcow2 myqcow2file.qcow2.bak qemu-img convert -O qcow2 myqcow2file.qcow2.bak myqcow2file.qcow2 start up the VM and everything should be back to normal and the space of the sparse qcow2 file should be much less.

3

Running the latest kernel CentOS7

I decided to start using the ML kernel for my kvm host for performance gains on my kvm guests. You can easily install the ML or the LT kernels easily on CentOS7 using the ELrepo. kernel-MT – mainline stable kernel kernel-LT – long term support kernel Steps: rpm –import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm yum remove kernel-headers kernel-tools kernel-tools-libs edit /etc/yum.repos.d/elrepo.repo and enable=1 the elrepo-kernel. change the ml to lt to install the long term support kernel. yum install kernel-ml.x86_64 kernel-ml-devel.x86_64 kernel-ml-headers.x86_64 kernel-ml-tools.x86_64 kernel-ml-tools-libs.x86_64 kernel-ml-tools-libs-devel.x86_64 time to get grub settled awk -F’ ‘$1==”menuentry ” {print $2}’ /etc/grub2.cfg it should list all… Continue Reading

0

Reset root password on RHEL/CentOS 7

much have changed since 4/5/6 days since RHEL/CentOS7 uses grub2 to boot. root password recovery is now very different than before. start/reboot the system and on the GRUB2 boot screen press the e key for edit. scroll down to the linux* line (could be linux/linux16/linuxefi) and remove rhgb and quiet and add init=/bin/sh to the end of the line. For some virtual hosts you might have to use rb.break instead of init=/bin/sh. Press CTRL-X to boot the system and it a shell prompt will be presented. Once booted the / filesystem will be in read only mode please issue mount… Continue Reading